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

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/dialogs/user_profiles.ui'
#
# Created by: PyQt5 UI code generator 5.5
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(738, 640)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("user_profile.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Dialog.setWindowIcon(icon)
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.scrollArea = QtWidgets.QScrollArea(Dialog)
        self.scrollArea.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.scrollArea.setLineWidth(0)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 726, 595))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.central_widget = QtWidgets.QWidget(self.scrollAreaWidgetContents)
        self.central_widget.setMinimumSize(QtCore.QSize(580, 550))
        self.central_widget.setObjectName("central_widget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.central_widget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.groupBox = QtWidgets.QGroupBox(self.central_widget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
        self.groupBox.setSizePolicy(sizePolicy)
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.available_profiles = QtWidgets.QListView(self.groupBox)
        self.available_profiles.setObjectName("available_profiles")
        self.verticalLayout_2.addWidget(self.available_profiles)
        self.add_profile_button = QtWidgets.QPushButton(self.groupBox)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(I("plus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.add_profile_button.setIcon(icon1)
        self.add_profile_button.setObjectName("add_profile_button")
        self.verticalLayout_2.addWidget(self.add_profile_button)
        self.remove_profile_button = QtWidgets.QPushButton(self.groupBox)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(I("list_remove.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.remove_profile_button.setIcon(icon2)
        self.remove_profile_button.setObjectName("remove_profile_button")
        self.verticalLayout_2.addWidget(self.remove_profile_button)
        self.share_button = QtWidgets.QPushButton(self.groupBox)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(I("forward.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.share_button.setIcon(icon3)
        self.share_button.setObjectName("share_button")
        self.verticalLayout_2.addWidget(self.share_button)
        self.show_recipe_files_button = QtWidgets.QPushButton(self.groupBox)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(I("document_open.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.show_recipe_files_button.setIcon(icon4)
        self.show_recipe_files_button.setObjectName("show_recipe_files_button")
        self.verticalLayout_2.addWidget(self.show_recipe_files_button)
        self.builtin_recipe_button = QtWidgets.QPushButton(self.groupBox)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(I("news.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.builtin_recipe_button.setIcon(icon5)
        self.builtin_recipe_button.setObjectName("builtin_recipe_button")
        self.verticalLayout_2.addWidget(self.builtin_recipe_button)
        self.load_button = QtWidgets.QPushButton(self.groupBox)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(I("chapters.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.load_button.setIcon(icon6)
        self.load_button.setObjectName("load_button")
        self.verticalLayout_2.addWidget(self.load_button)
        self.opml_button = QtWidgets.QPushButton(self.groupBox)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(I("mimetypes/opml.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.opml_button.setIcon(icon7)
        self.opml_button.setObjectName("opml_button")
        self.verticalLayout_2.addWidget(self.opml_button)
        self.horizontalLayout.addWidget(self.groupBox)
        self.frame = QtWidgets.QFrame(self.central_widget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
        self.frame.setSizePolicy(sizePolicy)
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.frame)
        self.verticalLayout.setObjectName("verticalLayout")
        self.toggle_mode_button = QtWidgets.QPushButton(self.frame)
        self.toggle_mode_button.setObjectName("toggle_mode_button")
        self.verticalLayout.addWidget(self.toggle_mode_button)
        self.stacks = QtWidgets.QStackedWidget(self.frame)
        self.stacks.setObjectName("stacks")
        self.page = QtWidgets.QWidget()
        self.page.setObjectName("page")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.page)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.label = QtWidgets.QLabel(self.page)
        self.label.setTextFormat(QtCore.Qt.RichText)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.verticalLayout_5.addWidget(self.label)
        self.gridlayout = QtWidgets.QGridLayout()
        self.gridlayout.setObjectName("gridlayout")
        self.label_2 = QtWidgets.QLabel(self.page)
        self.label_2.setObjectName("label_2")
        self.gridlayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.profile_title = EnLineEdit(self.page)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.profile_title.setFont(font)
        self.profile_title.setObjectName("profile_title")
        self.gridlayout.addWidget(self.profile_title, 0, 1, 1, 2)
        self.label_6 = QtWidgets.QLabel(self.page)
        self.label_6.setObjectName("label_6")
        self.gridlayout.addWidget(self.label_6, 2, 0, 1, 1)
        self.oldest_article = QtWidgets.QSpinBox(self.page)
        self.oldest_article.setMinimum(1)
        self.oldest_article.setMaximum(36500)
        self.oldest_article.setProperty("value", 7)
        self.oldest_article.setObjectName("oldest_article")
        self.gridlayout.addWidget(self.oldest_article, 2, 2, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.page)
        self.label_7.setObjectName("label_7")
        self.gridlayout.addWidget(self.label_7, 3, 0, 1, 1)
        self.max_articles = QtWidgets.QSpinBox(self.page)
        self.max_articles.setMinimum(5)
        self.max_articles.setMaximum(100)
        self.max_articles.setProperty("value", 10)
        self.max_articles.setObjectName("max_articles")
        self.gridlayout.addWidget(self.max_articles, 3, 2, 1, 1)
        self.verticalLayout_5.addLayout(self.gridlayout)
        self.groupBox_2 = QtWidgets.QGroupBox(self.page)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
        self.groupBox_2.setSizePolicy(sizePolicy)
        self.groupBox_2.setObjectName("groupBox_2")
        self.hboxlayout = QtWidgets.QHBoxLayout(self.groupBox_2)
        self.hboxlayout.setObjectName("hboxlayout")
        self.added_feeds = BasicList(self.groupBox_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.added_feeds.sizePolicy().hasHeightForWidth())
        self.added_feeds.setSizePolicy(sizePolicy)
        self.added_feeds.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.added_feeds.setObjectName("added_feeds")
        self.hboxlayout.addWidget(self.added_feeds)
        self.vboxlayout = QtWidgets.QVBoxLayout()
        self.vboxlayout.setObjectName("vboxlayout")
        self.up_button = QtWidgets.QToolButton(self.groupBox_2)
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap(I("arrow-up.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.up_button.setIcon(icon8)
        self.up_button.setObjectName("up_button")
        self.vboxlayout.addWidget(self.up_button)
        self.remove_feed_button = QtWidgets.QToolButton(self.groupBox_2)
        self.remove_feed_button.setIcon(icon2)
        self.remove_feed_button.setObjectName("remove_feed_button")
        self.vboxlayout.addWidget(self.remove_feed_button)
        self.down_button = QtWidgets.QToolButton(self.groupBox_2)
        icon9 = QtGui.QIcon()
        icon9.addPixmap(QtGui.QPixmap(I("arrow-down.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.down_button.setIcon(icon9)
        self.down_button.setObjectName("down_button")
        self.vboxlayout.addWidget(self.down_button)
        self.hboxlayout.addLayout(self.vboxlayout)
        self.verticalLayout_5.addWidget(self.groupBox_2)
        self.groupBox_3 = QtWidgets.QGroupBox(self.page)
        self.groupBox_3.setObjectName("groupBox_3")
        self.gridlayout1 = QtWidgets.QGridLayout(self.groupBox_3)
        self.gridlayout1.setObjectName("gridlayout1")
        self.label_4 = QtWidgets.QLabel(self.groupBox_3)
        self.label_4.setObjectName("label_4")
        self.gridlayout1.addWidget(self.label_4, 0, 0, 1, 1)
        self.feed_title = EnLineEdit(self.groupBox_3)
        self.feed_title.setObjectName("feed_title")
        self.gridlayout1.addWidget(self.feed_title, 0, 1, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.groupBox_3)
        self.label_5.setObjectName("label_5")
        self.gridlayout1.addWidget(self.label_5, 1, 0, 1, 1)
        self.feed_url = QtWidgets.QLineEdit(self.groupBox_3)
        self.feed_url.setObjectName("feed_url")
        self.gridlayout1.addWidget(self.feed_url, 1, 1, 1, 1)
        self.add_feed_button = QtWidgets.QPushButton(self.groupBox_3)
        self.add_feed_button.setIcon(icon1)
        self.add_feed_button.setObjectName("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 = QtWidgets.QWidget()
        self.page_2.setObjectName("page_2")
        self.vboxlayout1 = QtWidgets.QVBoxLayout(self.page_2)
        self.vboxlayout1.setObjectName("vboxlayout1")
        self.label_8 = QtWidgets.QLabel(self.page_2)
        self.label_8.setWordWrap(True)
        self.label_8.setOpenExternalLinks(True)
        self.label_8.setObjectName("label_8")
        self.vboxlayout1.addWidget(self.label_8)
        self.groupBox_4 = QtWidgets.QGroupBox(self.page_2)
        self.groupBox_4.setObjectName("groupBox_4")
        self.vboxlayout2 = QtWidgets.QVBoxLayout(self.groupBox_4)
        self.vboxlayout2.setObjectName("vboxlayout2")
        self.source_code = QtWidgets.QTextEdit(self.groupBox_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.source_code.sizePolicy().hasHeightForWidth())
        self.source_code.setSizePolicy(sizePolicy)
        self.source_code.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
        self.source_code.setAcceptRichText(False)
        self.source_code.setObjectName("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 = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("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)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(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.show_recipe_files_button.setText(_("S&how recipe files"))
        self.builtin_recipe_button.setText(_("Customize &builtin recipe"))
        self.load_button.setText(_("&Load recipe from file"))
        self.opml_button.setToolTip(_("Import a collection of RSS feeds in OPML format\n"
"Many RSS readers can export their subscribed RSS feeds\n"
"in OPML format"))
        self.opml_button.setText(_("Import &OPML"))
        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=\"https://manual.calibre-ebook.com/news.html\">User Recipes</a>"))
        self.groupBox_4.setTitle(_("Recipe source code (python)"))

from calibre.gui2.widgets import BasicList, EnLineEdit

