home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1286 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  10.4 KB  |  273 lines

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