home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_1306 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-10-31  |  11.0 KB  |  280 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from PyQt4 import QtCore, QtGui
  5.  
  6. try:
  7.     _fromUtf8 = QtCore.QString.fromUtf8
  8. except AttributeError:
  9.     
  10.     _fromUtf8 = lambda s: s
  11.  
  12.  
  13. class Ui_Dialog(object):
  14.     
  15.     def setupUi(self, Dialog):
  16.         Dialog.setObjectName(_fromUtf8('Dialog'))
  17.         Dialog.resize(738, 640)
  18.         icon = QtGui.QIcon()
  19.         icon.addPixmap(QtGui.QPixmap(_fromUtf8(I('user_profile.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  20.         Dialog.setWindowIcon(icon)
  21.         self.verticalLayout_4 = QtGui.QVBoxLayout(Dialog)
  22.         self.verticalLayout_4.setObjectName(_fromUtf8('verticalLayout_4'))
  23.         self.scrollArea = QtGui.QScrollArea(Dialog)
  24.         self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
  25.         self.scrollArea.setLineWidth(0)
  26.         self.scrollArea.setWidgetResizable(True)
  27.         self.scrollArea.setObjectName(_fromUtf8('scrollArea'))
  28.         self.scrollAreaWidgetContents = QtGui.QWidget(self.scrollArea)
  29.         self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 730, 600))
  30.         self.scrollAreaWidgetContents.setObjectName(_fromUtf8('scrollAreaWidgetContents'))
  31.         self.verticalLayout_3 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
  32.         self.verticalLayout_3.setMargin(0)
  33.         self.verticalLayout_3.setObjectName(_fromUtf8('verticalLayout_3'))
  34.         self.central_widget = QtGui.QWidget(self.scrollAreaWidgetContents)
  35.         self.central_widget.setMinimumSize(QtCore.QSize(580, 550))
  36.         self.central_widget.setObjectName(_fromUtf8('central_widget'))
  37.         self.horizontalLayout = QtGui.QHBoxLayout(self.central_widget)
  38.         self.horizontalLayout.setMargin(0)
  39.         self.horizontalLayout.setObjectName(_fromUtf8('horizontalLayout'))
  40.         self.groupBox = QtGui.QGroupBox(self.central_widget)
  41.         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
  42.         sizePolicy.setHorizontalStretch(1)
  43.         sizePolicy.setVerticalStretch(0)
  44.         sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
  45.         self.groupBox.setSizePolicy(sizePolicy)
  46.         self.groupBox.setObjectName(_fromUtf8('groupBox'))
  47.         self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
  48.         self.verticalLayout_2.setObjectName(_fromUtf8('verticalLayout_2'))
  49.         self.available_profiles = QtGui.QListView(self.groupBox)
  50.         self.available_profiles.setObjectName(_fromUtf8('available_profiles'))
  51.         self.verticalLayout_2.addWidget(self.available_profiles)
  52.         self.add_profile_button = QtGui.QPushButton(self.groupBox)
  53.         icon1 = QtGui.QIcon()
  54.         icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I('plus.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  55.         self.add_profile_button.setIcon(icon1)
  56.         self.add_profile_button.setObjectName(_fromUtf8('add_profile_button'))
  57.         self.verticalLayout_2.addWidget(self.add_profile_button)
  58.         self.remove_profile_button = QtGui.QPushButton(self.groupBox)
  59.         icon2 = QtGui.QIcon()
  60.         icon2.addPixmap(QtGui.QPixmap(_fromUtf8(I('list_remove.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  61.         self.remove_profile_button.setIcon(icon2)
  62.         self.remove_profile_button.setObjectName(_fromUtf8('remove_profile_button'))
  63.         self.verticalLayout_2.addWidget(self.remove_profile_button)
  64.         self.share_button = QtGui.QPushButton(self.groupBox)
  65.         icon3 = QtGui.QIcon()
  66.         icon3.addPixmap(QtGui.QPixmap(_fromUtf8(I('forward.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  67.         self.share_button.setIcon(icon3)
  68.         self.share_button.setObjectName(_fromUtf8('share_button'))
  69.         self.verticalLayout_2.addWidget(self.share_button)
  70.         self.builtin_recipe_button = QtGui.QPushButton(self.groupBox)
  71.         icon4 = QtGui.QIcon()
  72.         icon4.addPixmap(QtGui.QPixmap(_fromUtf8(I('news.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  73.         self.builtin_recipe_button.setIcon(icon4)
  74.         self.builtin_recipe_button.setObjectName(_fromUtf8('builtin_recipe_button'))
  75.         self.verticalLayout_2.addWidget(self.builtin_recipe_button)
  76.         self.load_button = QtGui.QPushButton(self.groupBox)
  77.         icon5 = QtGui.QIcon()
  78.         icon5.addPixmap(QtGui.QPixmap(_fromUtf8(I('chapters.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  79.         self.load_button.setIcon(icon5)
  80.         self.load_button.setObjectName(_fromUtf8('load_button'))
  81.         self.verticalLayout_2.addWidget(self.load_button)
  82.         self.horizontalLayout.addWidget(self.groupBox)
  83.         self.frame = QtGui.QFrame(self.central_widget)
  84.         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
  85.         sizePolicy.setHorizontalStretch(10)
  86.         sizePolicy.setVerticalStretch(0)
  87.         sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
  88.         self.frame.setSizePolicy(sizePolicy)
  89.         self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
  90.         self.frame.setFrameShadow(QtGui.QFrame.Raised)
  91.         self.frame.setObjectName(_fromUtf8('frame'))
  92.         self.verticalLayout = QtGui.QVBoxLayout(self.frame)
  93.         self.verticalLayout.setObjectName(_fromUtf8('verticalLayout'))
  94.         self.toggle_mode_button = QtGui.QPushButton(self.frame)
  95.         self.toggle_mode_button.setObjectName(_fromUtf8('toggle_mode_button'))
  96.         self.verticalLayout.addWidget(self.toggle_mode_button)
  97.         self.stacks = QtGui.QStackedWidget(self.frame)
  98.         self.stacks.setObjectName(_fromUtf8('stacks'))
  99.         self.page = QtGui.QWidget()
  100.         self.page.setObjectName(_fromUtf8('page'))
  101.         self.verticalLayout_5 = QtGui.QVBoxLayout(self.page)
  102.         self.verticalLayout_5.setObjectName(_fromUtf8('verticalLayout_5'))
  103.         self.label = QtGui.QLabel(self.page)
  104.         self.label.setTextFormat(QtCore.Qt.RichText)
  105.         self.label.setWordWrap(True)
  106.         self.label.setObjectName(_fromUtf8('label'))
  107.         self.verticalLayout_5.addWidget(self.label)
  108.         self.gridlayout = QtGui.QGridLayout()
  109.         self.gridlayout.setObjectName(_fromUtf8('gridlayout'))
  110.         self.label_2 = QtGui.QLabel(self.page)
  111.         self.label_2.setObjectName(_fromUtf8('label_2'))
  112.         self.gridlayout.addWidget(self.label_2, 0, 0, 1, 1)
  113.         self.profile_title = EnLineEdit(self.page)
  114.         font = QtGui.QFont()
  115.         font.setWeight(75)
  116.         font.setBold(True)
  117.         self.profile_title.setFont(font)
  118.         self.profile_title.setObjectName(_fromUtf8('profile_title'))
  119.         self.gridlayout.addWidget(self.profile_title, 0, 1, 1, 2)
  120.         self.label_6 = QtGui.QLabel(self.page)
  121.         self.label_6.setObjectName(_fromUtf8('label_6'))
  122.         self.gridlayout.addWidget(self.label_6, 2, 0, 1, 1)
  123.         self.oldest_article = QtGui.QSpinBox(self.page)
  124.         self.oldest_article.setMinimum(1)
  125.         self.oldest_article.setMaximum(365)
  126.         self.oldest_article.setProperty(_fromUtf8('value'), 7)
  127.         self.oldest_article.setObjectName(_fromUtf8('oldest_article'))
  128.         self.gridlayout.addWidget(self.oldest_article, 2, 2, 1, 1)
  129.         self.label_7 = QtGui.QLabel(self.page)
  130.         self.label_7.setObjectName(_fromUtf8('label_7'))
  131.         self.gridlayout.addWidget(self.label_7, 3, 0, 1, 1)
  132.         self.max_articles = QtGui.QSpinBox(self.page)
  133.         self.max_articles.setMinimum(5)
  134.         self.max_articles.setMaximum(100)
  135.         self.max_articles.setProperty(_fromUtf8('value'), 10)
  136.         self.max_articles.setObjectName(_fromUtf8('max_articles'))
  137.         self.gridlayout.addWidget(self.max_articles, 3, 2, 1, 1)
  138.         self.verticalLayout_5.addLayout(self.gridlayout)
  139.         self.groupBox_2 = QtGui.QGroupBox(self.page)
  140.         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
  141.         sizePolicy.setHorizontalStretch(100)
  142.         sizePolicy.setVerticalStretch(0)
  143.         sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
  144.         self.groupBox_2.setSizePolicy(sizePolicy)
  145.         self.groupBox_2.setObjectName(_fromUtf8('groupBox_2'))
  146.         self.hboxlayout = QtGui.QHBoxLayout(self.groupBox_2)
  147.         self.hboxlayout.setObjectName(_fromUtf8('hboxlayout'))
  148.         self.added_feeds = BasicList(self.groupBox_2)
  149.         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
  150.         sizePolicy.setHorizontalStretch(100)
  151.         sizePolicy.setVerticalStretch(0)
  152.         sizePolicy.setHeightForWidth(self.added_feeds.sizePolicy().hasHeightForWidth())
  153.         self.added_feeds.setSizePolicy(sizePolicy)
  154.         self.added_feeds.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
  155.         self.added_feeds.setObjectName(_fromUtf8('added_feeds'))
  156.         self.hboxlayout.addWidget(self.added_feeds)
  157.         self.vboxlayout = QtGui.QVBoxLayout()
  158.         self.vboxlayout.setObjectName(_fromUtf8('vboxlayout'))
  159.         self.up_button = QtGui.QToolButton(self.groupBox_2)
  160.         icon6 = QtGui.QIcon()
  161.         icon6.addPixmap(QtGui.QPixmap(_fromUtf8(I('arrow-up.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  162.         self.up_button.setIcon(icon6)
  163.         self.up_button.setObjectName(_fromUtf8('up_button'))
  164.         self.vboxlayout.addWidget(self.up_button)
  165.         self.remove_feed_button = QtGui.QToolButton(self.groupBox_2)
  166.         self.remove_feed_button.setIcon(icon2)
  167.         self.remove_feed_button.setObjectName(_fromUtf8('remove_feed_button'))
  168.         self.vboxlayout.addWidget(self.remove_feed_button)
  169.         self.down_button = QtGui.QToolButton(self.groupBox_2)
  170.         icon7 = QtGui.QIcon()
  171.         icon7.addPixmap(QtGui.QPixmap(_fromUtf8(I('arrow-down.png'))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
  172.         self.down_button.setIcon(icon7)
  173.         self.down_button.setObjectName(_fromUtf8('down_button'))
  174.         self.vboxlayout.addWidget(self.down_button)
  175.         self.hboxlayout.addLayout(self.vboxlayout)
  176.         self.verticalLayout_5.addWidget(self.groupBox_2)
  177.         self.groupBox_3 = QtGui.QGroupBox(self.page)
  178.         self.groupBox_3.setObjectName(_fromUtf8('groupBox_3'))
  179.         self.gridlayout1 = QtGui.QGridLayout(self.groupBox_3)
  180.         self.gridlayout1.setObjectName(_fromUtf8('gridlayout1'))
  181.         self.label_4 = QtGui.QLabel(self.groupBox_3)
  182.         self.label_4.setObjectName(_fromUtf8('label_4'))
  183.         self.gridlayout1.addWidget(self.label_4, 0, 0, 1, 1)
  184.         self.feed_title = EnLineEdit(self.groupBox_3)
  185.         self.feed_title.setObjectName(_fromUtf8('feed_title'))
  186.         self.gridlayout1.addWidget(self.feed_title, 0, 1, 1, 1)
  187.         self.label_5 = QtGui.QLabel(self.groupBox_3)
  188.         self.label_5.setObjectName(_fromUtf8('label_5'))
  189.         self.gridlayout1.addWidget(self.label_5, 1, 0, 1, 1)
  190.         self.feed_url = QtGui.QLineEdit(self.groupBox_3)
  191.         self.feed_url.setObjectName(_fromUtf8('feed_url'))
  192.         self.gridlayout1.addWidget(self.feed_url, 1, 1, 1, 1)
  193.         self.add_feed_button = QtGui.QPushButton(self.groupBox_3)
  194.         self.add_feed_button.setIcon(icon1)
  195.         self.add_feed_button.setObjectName(_fromUtf8('add_feed_button'))
  196.         self.gridlayout1.addWidget(self.add_feed_button, 2, 0, 1, 2)
  197.         self.verticalLayout_5.addWidget(self.groupBox_3)
  198.         self.stacks.addWidget(self.page)
  199.         self.page_2 = QtGui.QWidget()
  200.         self.page_2.setObjectName(_fromUtf8('page_2'))
  201.         self.vboxlayout1 = QtGui.QVBoxLayout(self.page_2)
  202.         self.vboxlayout1.setObjectName(_fromUtf8('vboxlayout1'))
  203.         self.label_8 = QtGui.QLabel(self.page_2)
  204.         self.label_8.setWordWrap(True)
  205.         self.label_8.setOpenExternalLinks(True)
  206.         self.label_8.setObjectName(_fromUtf8('label_8'))
  207.         self.vboxlayout1.addWidget(self.label_8)
  208.         self.groupBox_4 = QtGui.QGroupBox(self.page_2)
  209.         self.groupBox_4.setObjectName(_fromUtf8('groupBox_4'))
  210.         self.vboxlayout2 = QtGui.QVBoxLayout(self.groupBox_4)
  211.         self.vboxlayout2.setObjectName(_fromUtf8('vboxlayout2'))
  212.         self.source_code = QtGui.QTextEdit(self.groupBox_4)
  213.         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
  214.         sizePolicy.setHorizontalStretch(100)
  215.         sizePolicy.setVerticalStretch(0)
  216.         sizePolicy.setHeightForWidth(self.source_code.sizePolicy().hasHeightForWidth())
  217.         self.source_code.setSizePolicy(sizePolicy)
  218.         font = QtGui.QFont()
  219.         font.setFamily(_fromUtf8('DejaVu Sans Mono'))
  220.         self.source_code.setFont(font)
  221.         self.source_code.setLineWrapMode(QtGui.QTextEdit.NoWrap)
  222.         self.source_code.setAcceptRichText(False)
  223.         self.source_code.setObjectName(_fromUtf8('source_code'))
  224.         self.vboxlayout2.addWidget(self.source_code)
  225.         self.vboxlayout1.addWidget(self.groupBox_4)
  226.         self.stacks.addWidget(self.page_2)
  227.         self.verticalLayout.addWidget(self.stacks)
  228.         self.horizontalLayout.addWidget(self.frame)
  229.         self.verticalLayout_3.addWidget(self.central_widget)
  230.         self.scrollArea.setWidget(self.scrollAreaWidgetContents)
  231.         self.verticalLayout_4.addWidget(self.scrollArea)
  232.         self.buttonBox = QtGui.QDialogButtonBox(Dialog)
  233.         self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
  234.         self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
  235.         self.buttonBox.setObjectName(_fromUtf8('buttonBox'))
  236.         self.verticalLayout_4.addWidget(self.buttonBox)
  237.         self.label_2.setBuddy(self.profile_title)
  238.         self.label_6.setBuddy(self.oldest_article)
  239.         self.label_7.setBuddy(self.max_articles)
  240.         self.label_4.setBuddy(self.feed_title)
  241.         self.label_5.setBuddy(self.feed_url)
  242.         self.retranslateUi(Dialog)
  243.         self.stacks.setCurrentIndex(0)
  244.         QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8('accepted()')), Dialog.accept)
  245.         QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8('rejected()')), Dialog.reject)
  246.         QtCore.QMetaObject.connectSlotsByName(Dialog)
  247.  
  248.     
  249.     def retranslateUi(self, Dialog):
  250.         Dialog.setWindowTitle(_('Add custom news source'))
  251.         self.groupBox.setTitle(_('Available user recipes'))
  252.         self.add_profile_button.setText(_('Add/Update &recipe'))
  253.         self.remove_profile_button.setText(_('&Remove recipe'))
  254.         self.share_button.setText(_('&Share recipe'))
  255.         self.builtin_recipe_button.setText(_('Customize &builtin recipe'))
  256.         self.load_button.setText(_('&Load recipe from file'))
  257.         self.toggle_mode_button.setText(_('Switch to Advanced mode'))
  258.         self.label.setText(_('<html><head><meta name="qrichtext" content="1" /><style type="text/css">\np, 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>'))
  259.         self.label_2.setText(_('Recipe &title:'))
  260.         self.label_6.setText(_('&Oldest article:'))
  261.         self.oldest_article.setToolTip(_('The oldest article to download'))
  262.         self.oldest_article.setSuffix(_(' days'))
  263.         self.label_7.setText(_('&Max. number of articles per feed:'))
  264.         self.max_articles.setToolTip(_('Maximum number of articles to download per feed.'))
  265.         self.groupBox_2.setTitle(_('Feeds in recipe'))
  266.         self.up_button.setText(_('...'))
  267.         self.remove_feed_button.setToolTip(_('Remove feed from recipe'))
  268.         self.remove_feed_button.setText(_('...'))
  269.         self.down_button.setText(_('...'))
  270.         self.groupBox_3.setTitle(_('Add feed to recipe'))
  271.         self.label_4.setText(_('&Feed title:'))
  272.         self.label_5.setText(_('Feed &URL:'))
  273.         self.add_feed_button.setToolTip(_('Add feed to recipe'))
  274.         self.add_feed_button.setText(_('&Add feed'))
  275.         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>'))
  276.         self.groupBox_4.setTitle(_('Recipe source code (python)'))
  277.  
  278.  
  279. from calibre.gui2.widgets import EnLineEdit, BasicList
  280.