Logo Search packages:      
Sourcecode: calibre version File versions  Download package

user_profiles_ui.py

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

# Form implementation generated from reading ui file '/home/kovid/work/trunk/src/calibre/gui2/dialogs/user_profiles.ui'
#
# Created: Sun May  2 09:18:38 2010
#      by: PyQt4 UI code generator 4.7.3
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

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.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Dialog.setWindowIcon(icon)
        self.verticalLayout_4 = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.scrollArea = QtGui.QScrollArea(Dialog)
        self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
        self.scrollArea.setLineWidth(0)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtGui.QWidget(self.scrollArea)
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 730, 600))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout_3.setMargin(0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.central_widget = QtGui.QWidget(self.scrollAreaWidgetContents)
        self.central_widget.setMinimumSize(QtCore.QSize(580, 550))
        self.central_widget.setObjectName("central_widget")
        self.horizontalLayout = QtGui.QHBoxLayout(self.central_widget)
        self.horizontalLayout.setMargin(0)
        self.horizontalLayout.setObjectName("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("groupBox")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.available_profiles = QtGui.QListView(self.groupBox)
        self.available_profiles.setObjectName("available_profiles")
        self.verticalLayout_2.addWidget(self.available_profiles)
        self.add_profile_button = QtGui.QPushButton(self.groupBox)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(I("plus.svg")), 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 = QtGui.QPushButton(self.groupBox)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(I("list_remove.svg")), 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 = QtGui.QPushButton(self.groupBox)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(I("forward.svg")), 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.builtin_recipe_button = QtGui.QPushButton(self.groupBox)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(I("news.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.builtin_recipe_button.setIcon(icon4)
        self.builtin_recipe_button.setObjectName("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(I("chapters.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.load_button.setIcon(icon5)
        self.load_button.setObjectName("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("frame")
        self.verticalLayout = QtGui.QVBoxLayout(self.frame)
        self.verticalLayout.setObjectName("verticalLayout")
        self.toggle_mode_button = QtGui.QPushButton(self.frame)
        self.toggle_mode_button.setObjectName("toggle_mode_button")
        self.verticalLayout.addWidget(self.toggle_mode_button)
        self.stacks = QtGui.QStackedWidget(self.frame)
        self.stacks.setObjectName("stacks")
        self.page = QtGui.QWidget()
        self.page.setObjectName("page")
        self.verticalLayout_5 = QtGui.QVBoxLayout(self.page)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.label = QtGui.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 = QtGui.QGridLayout()
        self.gridlayout.setObjectName("gridlayout")
        self.label_2 = QtGui.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.setWeight(75)
        font.setBold(True)
        self.profile_title.setFont(font)
        self.profile_title.setObjectName("profile_title")
        self.gridlayout.addWidget(self.profile_title, 0, 1, 1, 2)
        self.label_6 = QtGui.QLabel(self.page)
        self.label_6.setObjectName("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("value", 7)
        self.oldest_article.setObjectName("oldest_article")
        self.gridlayout.addWidget(self.oldest_article, 2, 2, 1, 1)
        self.label_7 = QtGui.QLabel(self.page)
        self.label_7.setObjectName("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("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 = 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("groupBox_2")
        self.hboxlayout = QtGui.QHBoxLayout(self.groupBox_2)
        self.hboxlayout.setObjectName("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("added_feeds")
        self.hboxlayout.addWidget(self.added_feeds)
        self.vboxlayout = QtGui.QVBoxLayout()
        self.vboxlayout.setObjectName("vboxlayout")
        self.up_button = QtGui.QToolButton(self.groupBox_2)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(I("arrow-up.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.up_button.setIcon(icon6)
        self.up_button.setObjectName("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("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(I("arrow-down.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.down_button.setIcon(icon7)
        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 = QtGui.QGroupBox(self.page)
        self.groupBox_3.setObjectName("groupBox_3")
        self.gridlayout1 = QtGui.QGridLayout(self.groupBox_3)
        self.gridlayout1.setObjectName("gridlayout1")
        self.label_4 = QtGui.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 = QtGui.QLabel(self.groupBox_3)
        self.label_5.setObjectName("label_5")
        self.gridlayout1.addWidget(self.label_5, 1, 0, 1, 1)
        self.feed_url = QtGui.QLineEdit(self.groupBox_3)
        self.feed_url.setObjectName("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("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("page_2")
        self.vboxlayout1 = QtGui.QVBoxLayout(self.page_2)
        self.vboxlayout1.setObjectName("vboxlayout1")
        self.label_8 = QtGui.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 = QtGui.QGroupBox(self.page_2)
        self.groupBox_4.setObjectName("groupBox_4")
        self.vboxlayout2 = QtGui.QVBoxLayout(self.groupBox_4)
        self.vboxlayout2.setObjectName("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("DejaVu Sans Mono")
        self.source_code.setFont(font)
        self.source_code.setLineWrapMode(QtGui.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 = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.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)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("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.kovidgoyal.net/user_manual/news.html\">User Recipes</a>"))
        self.groupBox_4.setTitle(_("Recipe source code (python)"))

from calibre.gui2.widgets import EnLineEdit, BasicList


Generated by  Doxygen 1.6.0   Back to index