# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/dialogs/user_profiles.ui'
#
# Created: Fri Nov  5 12:08:54 2010
#      by: PyQt4 UI code generator 4.8.1
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(738, 640)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("user_profile.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Dialog.setWindowIcon(icon)
        self.verticalLayout_4 = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
        self.scrollArea = QtGui.QScrollArea(Dialog)
        self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
        self.scrollArea.setLineWidth(0)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
        self.scrollAreaWidgetContents = QtGui.QWidget(self.scrollArea)
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 730, 600))
        self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout_3.setMargin(0)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.central_widget = QtGui.QWidget(self.scrollAreaWidgetContents)
        self.central_widget.setMinimumSize(QtCore.QSize(580, 550))
        self.central_widget.setObjectName(_fromUtf8("central_widget"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.central_widget)
        self.horizontalLayout.setMargin(0)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.groupBox = QtGui.QGroupBox(self.central_widget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
        self.groupBox.setSizePolicy(sizePolicy)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.available_profiles = QtGui.QListView(self.groupBox)
        self.available_profiles.setObjectName(_fromUtf8("available_profiles"))
        self.verticalLayout_2.addWidget(self.available_profiles)
        self.add_profile_button = QtGui.QPushButton(self.groupBox)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I("plus.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.add_profile_button.setIcon(icon1)
        self.add_profile_button.setObjectName(_fromUtf8("add_profile_button"))
        self.verticalLayout_2.addWidget(self.add_profile_button)
        self.remove_profile_button = QtGui.QPushButton(self.groupBox)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(I("list_remove.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.remove_profile_button.setIcon(icon2)
        self.remove_profile_button.setObjectName(_fromUtf8("remove_profile_button"))
        self.verticalLayout_2.addWidget(self.remove_profile_button)
        self.share_button = QtGui.QPushButton(self.groupBox)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(_fromUtf8(I("forward.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.share_button.setIcon(icon3)
        self.share_button.setObjectName(_fromUtf8("share_button"))
        self.verticalLayout_2.addWidget(self.share_button)
        self.builtin_recipe_button = QtGui.QPushButton(self.groupBox)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(_fromUtf8(I("news.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.builtin_recipe_button.setIcon(icon4)
        self.builtin_recipe_button.setObjectName(_fromUtf8("builtin_recipe_button"))
        self.verticalLayout_2.addWidget(self.builtin_recipe_button)
        self.load_button = QtGui.QPushButton(self.groupBox)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(_fromUtf8(I("chapters.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.load_button.setIcon(icon5)
        self.load_button.setObjectName(_fromUtf8("load_button"))
        self.verticalLayout_2.addWidget(self.load_button)
        self.horizontalLayout.addWidget(self.groupBox)
        self.frame = QtGui.QFrame(self.central_widget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
        self.frame.setSizePolicy(sizePolicy)
        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtGui.QFrame.Raised)
        self.frame.setObjectName(_fromUtf8("frame"))
        self.verticalLayout = QtGui.QVBoxLayout(self.frame)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.toggle_mode_button = QtGui.QPushButton(self.frame)
        self.toggle_mode_button.setObjectName(_fromUtf8("toggle_mode_button"))
        self.verticalLayout.addWidget(self.toggle_mode_button)
        self.stacks = QtGui.QStackedWidget(self.frame)
        self.stacks.setObjectName(_fromUtf8("stacks"))
        self.page = QtGui.QWidget()
        self.page.setObjectName(_fromUtf8("page"))
        self.verticalLayout_5 = QtGui.QVBoxLayout(self.page)
        self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
        self.label = QtGui.QLabel(self.page)
        self.label.setTextFormat(QtCore.Qt.RichText)
        self.label.setWordWrap(True)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout_5.addWidget(self.label)
        self.gridlayout = QtGui.QGridLayout()
        self.gridlayout.setObjectName(_fromUtf8("gridlayout"))
        self.label_2 = QtGui.QLabel(self.page)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridlayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.profile_title = EnLineEdit(self.page)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.profile_title.setFont(font)
        self.profile_title.setObjectName(_fromUtf8("profile_title"))
        self.gridlayout.addWidget(self.profile_title, 0, 1, 1, 2)
        self.label_6 = QtGui.QLabel(self.page)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridlayout.addWidget(self.label_6, 2, 0, 1, 1)
        self.oldest_article = QtGui.QSpinBox(self.page)
        self.oldest_article.setMinimum(1)
        self.oldest_article.setMaximum(365)
        self.oldest_article.setProperty(_fromUtf8("value"), 7)
        self.oldest_article.setObjectName(_fromUtf8("oldest_article"))
        self.gridlayout.addWidget(self.oldest_article, 2, 2, 1, 1)
        self.label_7 = QtGui.QLabel(self.page)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.gridlayout.addWidget(self.label_7, 3, 0, 1, 1)
        self.max_articles = QtGui.QSpinBox(self.page)
        self.max_articles.setMinimum(5)
        self.max_articles.setMaximum(100)
        self.max_articles.setProperty(_fromUtf8("value"), 10)
        self.max_articles.setObjectName(_fromUtf8("max_articles"))
        self.gridlayout.addWidget(self.max_articles, 3, 2, 1, 1)
        self.verticalLayout_5.addLayout(self.gridlayout)
        self.groupBox_2 = QtGui.QGroupBox(self.page)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
        self.groupBox_2.setSizePolicy(sizePolicy)
        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
        self.hboxlayout = QtGui.QHBoxLayout(self.groupBox_2)
        self.hboxlayout.setObjectName(_fromUtf8("hboxlayout"))
        self.added_feeds = BasicList(self.groupBox_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.added_feeds.sizePolicy().hasHeightForWidth())
        self.added_feeds.setSizePolicy(sizePolicy)
        self.added_feeds.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
        self.added_feeds.setObjectName(_fromUtf8("added_feeds"))
        self.hboxlayout.addWidget(self.added_feeds)
        self.vboxlayout = QtGui.QVBoxLayout()
        self.vboxlayout.setObjectName(_fromUtf8("vboxlayout"))
        self.up_button = QtGui.QToolButton(self.groupBox_2)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(_fromUtf8(I("arrow-up.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.up_button.setIcon(icon6)
        self.up_button.setObjectName(_fromUtf8("up_button"))
        self.vboxlayout.addWidget(self.up_button)
        self.remove_feed_button = QtGui.QToolButton(self.groupBox_2)
        self.remove_feed_button.setIcon(icon2)
        self.remove_feed_button.setObjectName(_fromUtf8("remove_feed_button"))
        self.vboxlayout.addWidget(self.remove_feed_button)
        self.down_button = QtGui.QToolButton(self.groupBox_2)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(_fromUtf8(I("arrow-down.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.down_button.setIcon(icon7)
        self.down_button.setObjectName(_fromUtf8("down_button"))
        self.vboxlayout.addWidget(self.down_button)
        self.hboxlayout.addLayout(self.vboxlayout)
        self.verticalLayout_5.addWidget(self.groupBox_2)
        self.groupBox_3 = QtGui.QGroupBox(self.page)
        self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
        self.gridlayout1 = QtGui.QGridLayout(self.groupBox_3)
        self.gridlayout1.setObjectName(_fromUtf8("gridlayout1"))
        self.label_4 = QtGui.QLabel(self.groupBox_3)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridlayout1.addWidget(self.label_4, 0, 0, 1, 1)
        self.feed_title = EnLineEdit(self.groupBox_3)
        self.feed_title.setObjectName(_fromUtf8("feed_title"))
        self.gridlayout1.addWidget(self.feed_title, 0, 1, 1, 1)
        self.label_5 = QtGui.QLabel(self.groupBox_3)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.gridlayout1.addWidget(self.label_5, 1, 0, 1, 1)
        self.feed_url = QtGui.QLineEdit(self.groupBox_3)
        self.feed_url.setObjectName(_fromUtf8("feed_url"))
        self.gridlayout1.addWidget(self.feed_url, 1, 1, 1, 1)
        self.add_feed_button = QtGui.QPushButton(self.groupBox_3)
        self.add_feed_button.setIcon(icon1)
        self.add_feed_button.setObjectName(_fromUtf8("add_feed_button"))
        self.gridlayout1.addWidget(self.add_feed_button, 2, 0, 1, 2)
        self.verticalLayout_5.addWidget(self.groupBox_3)
        self.stacks.addWidget(self.page)
        self.page_2 = QtGui.QWidget()
        self.page_2.setObjectName(_fromUtf8("page_2"))
        self.vboxlayout1 = QtGui.QVBoxLayout(self.page_2)
        self.vboxlayout1.setObjectName(_fromUtf8("vboxlayout1"))
        self.label_8 = QtGui.QLabel(self.page_2)
        self.label_8.setWordWrap(True)
        self.label_8.setOpenExternalLinks(True)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.vboxlayout1.addWidget(self.label_8)
        self.groupBox_4 = QtGui.QGroupBox(self.page_2)
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self.vboxlayout2 = QtGui.QVBoxLayout(self.groupBox_4)
        self.vboxlayout2.setObjectName(_fromUtf8("vboxlayout2"))
        self.source_code = QtGui.QTextEdit(self.groupBox_4)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.source_code.sizePolicy().hasHeightForWidth())
        self.source_code.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("DejaVu Sans Mono"))
        self.source_code.setFont(font)
        self.source_code.setLineWrapMode(QtGui.QTextEdit.NoWrap)
        self.source_code.setAcceptRichText(False)
        self.source_code.setObjectName(_fromUtf8("source_code"))
        self.vboxlayout2.addWidget(self.source_code)
        self.vboxlayout1.addWidget(self.groupBox_4)
        self.stacks.addWidget(self.page_2)
        self.verticalLayout.addWidget(self.stacks)
        self.horizontalLayout.addWidget(self.frame)
        self.verticalLayout_3.addWidget(self.central_widget)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.verticalLayout_4.addWidget(self.scrollArea)
        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout_4.addWidget(self.buttonBox)
        self.label_2.setBuddy(self.profile_title)
        self.label_6.setBuddy(self.oldest_article)
        self.label_7.setBuddy(self.max_articles)
        self.label_4.setBuddy(self.feed_title)
        self.label_5.setBuddy(self.feed_url)

        self.retranslateUi(Dialog)
        self.stacks.setCurrentIndex(0)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(_("Add custom news source"))
        self.groupBox.setTitle(_("Available user recipes"))
        self.add_profile_button.setText(_("Add/Update &recipe"))
        self.remove_profile_button.setText(_("&Remove recipe"))
        self.share_button.setText(_("&Share recipe"))
        self.builtin_recipe_button.setText(_("Customize &builtin recipe"))
        self.load_button.setText(_("&Load recipe from file"))
        self.toggle_mode_button.setText(_("Switch to Advanced mode"))
        self.label.setText(_("<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Create a basic news recipe, by adding RSS feeds to it. <br />For most feeds, you will have to use the \"Advanced mode\" to further customize the fetch process.</p></body></html>"))
        self.label_2.setText(_("Recipe &title:"))
        self.label_6.setText(_("&Oldest article:"))
        self.oldest_article.setToolTip(_("The oldest article to download"))
        self.oldest_article.setSuffix(_(" days"))
        self.label_7.setText(_("&Max. number of articles per feed:"))
        self.max_articles.setToolTip(_("Maximum number of articles to download per feed."))
        self.groupBox_2.setTitle(_("Feeds in recipe"))
        self.up_button.setText(_("..."))
        self.remove_feed_button.setToolTip(_("Remove feed from recipe"))
        self.remove_feed_button.setText(_("..."))
        self.down_button.setText(_("..."))
        self.groupBox_3.setTitle(_("Add feed to recipe"))
        self.label_4.setText(_("&Feed title:"))
        self.label_5.setText(_("Feed &URL:"))
        self.add_feed_button.setToolTip(_("Add feed to recipe"))
        self.add_feed_button.setText(_("&Add feed"))
        self.label_8.setText(_("For help with writing advanced news recipes, please visit <a href=\"http://calibre-ebook.com/user_manual/news.html\">User Recipes</a>"))
        self.groupBox_4.setTitle(_("Recipe source code (python)"))

from calibre.gui2.widgets import EnLineEdit, BasicList

