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

main_ui.py
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/main.ui'
#
# Created: Sun Jun 13 17:05:25 2010
#      by: PyQt4 UI code generator 4.7.3
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

00012 class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1012, 822)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        MainWindow.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("library.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.location_view = LocationView(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.location_view.sizePolicy().hasHeightForWidth())
        self.location_view.setSizePolicy(sizePolicy)
        self.location_view.setMaximumSize(QtCore.QSize(16777215, 75))
        self.location_view.setMouseTracking(True)
        self.location_view.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.location_view.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
        self.location_view.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.location_view.setTabKeyNavigation(True)
        self.location_view.setProperty("showDropIndicator", True)
        self.location_view.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
        self.location_view.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        self.location_view.setIconSize(QtCore.QSize(40, 40))
        self.location_view.setMovement(QtGui.QListView.Static)
        self.location_view.setFlow(QtGui.QListView.LeftToRight)
        self.location_view.setGridSize(QtCore.QSize(175, 90))
        self.location_view.setViewMode(QtGui.QListView.ListMode)
        self.location_view.setWordWrap(True)
        self.location_view.setObjectName("location_view")
        self.horizontalLayout_3.addWidget(self.location_view)
        self.donate_button = QtGui.QToolButton(self.centralwidget)
        self.donate_button.setCursor(QtCore.Qt.PointingHandCursor)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(I("donate.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.donate_button.setIcon(icon1)
        self.donate_button.setIconSize(QtCore.QSize(64, 64))
        self.donate_button.setAutoRaise(True)
        self.donate_button.setObjectName("donate_button")
        self.horizontalLayout_3.addWidget(self.donate_button)
        self.verticalLayout_3 = QtGui.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.vanity = QtGui.QLabel(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.vanity.sizePolicy().hasHeightForWidth())
        self.vanity.setSizePolicy(sizePolicy)
        self.vanity.setMaximumSize(QtCore.QSize(16777215, 90))
        self.vanity.setText("")
        self.vanity.setTextFormat(QtCore.Qt.RichText)
        self.vanity.setOpenExternalLinks(True)
        self.vanity.setObjectName("vanity")
        self.verticalLayout_3.addWidget(self.vanity)
        self.horizontalLayout_3.addLayout(self.verticalLayout_3)
        self.verticalLayout_2.addLayout(self.horizontalLayout_3)
        self.hl234 = QtGui.QHBoxLayout()
        self.hl234.setSpacing(6)
        self.hl234.setMargin(0)
        self.hl234.setObjectName("hl234")
        self.restriction_label = QtGui.QLabel(self.centralwidget)
        self.restriction_label.setObjectName("restriction_label")
        self.hl234.addWidget(self.restriction_label)
        self.search_restriction = QtGui.QComboBox(self.centralwidget)
        self.search_restriction.setMaximumSize(QtCore.QSize(150, 16777215))
        self.search_restriction.setObjectName("search_restriction")
        self.hl234.addWidget(self.search_restriction)
        self.search_count = QtGui.QLabel(self.centralwidget)
        self.search_count.setObjectName("search_count")
        self.hl234.addWidget(self.search_count)
        self.advanced_search_button = QtGui.QToolButton(self.centralwidget)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(I("search.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.advanced_search_button.setIcon(icon2)
        self.advanced_search_button.setObjectName("advanced_search_button")
        self.hl234.addWidget(self.advanced_search_button)
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setObjectName("label")
        self.hl234.addWidget(self.label)
        self.search = SearchBox2(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.search.sizePolicy().hasHeightForWidth())
        self.search.setSizePolicy(sizePolicy)
        self.search.setMaximumSize(QtCore.QSize(700, 16777215))
        self.search.setObjectName("search")
        self.hl234.addWidget(self.search)
        self.clear_button = QtGui.QToolButton(self.centralwidget)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(I("clear_left.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.clear_button.setIcon(icon3)
        self.clear_button.setObjectName("clear_button")
        self.hl234.addWidget(self.clear_button)
        self.saved_search = SavedSearchBox(self.centralwidget)
        self.saved_search.setMaximumSize(QtCore.QSize(150, 16777215))
        self.saved_search.setMinimumContentsLength(15)
        self.saved_search.setObjectName("saved_search")
        self.hl234.addWidget(self.saved_search)
        self.copy_search_button = QtGui.QToolButton(self.centralwidget)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(I("search_copy_saved.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.copy_search_button.setIcon(icon4)
        self.copy_search_button.setObjectName("copy_search_button")
        self.hl234.addWidget(self.copy_search_button)
        self.save_search_button = QtGui.QToolButton(self.centralwidget)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(I("search_add_saved.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.save_search_button.setIcon(icon5)
        self.save_search_button.setObjectName("save_search_button")
        self.hl234.addWidget(self.save_search_button)
        self.delete_search_button = QtGui.QToolButton(self.centralwidget)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(I("search_delete_saved.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.delete_search_button.setIcon(icon6)
        self.delete_search_button.setObjectName("delete_search_button")
        self.hl234.addWidget(self.delete_search_button)
        self.verticalLayout_2.addLayout(self.hl234)
        MainWindow.setCentralWidget(self.centralwidget)
        self.tool_bar = QtGui.QToolBar(MainWindow)
        self.tool_bar.setMinimumSize(QtCore.QSize(0, 0))
        self.tool_bar.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
        self.tool_bar.setMovable(False)
        self.tool_bar.setOrientation(QtCore.Qt.Horizontal)
        self.tool_bar.setIconSize(QtCore.QSize(48, 48))
        self.tool_bar.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)
        self.tool_bar.setObjectName("tool_bar")
        MainWindow.addToolBar(QtCore.Qt.ToolBarArea(QtCore.Qt.TopToolBarArea), self.tool_bar)
        self.action_add = QtGui.QAction(MainWindow)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(I("add_book.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_add.setIcon(icon7)
        self.action_add.setAutoRepeat(False)
        self.action_add.setObjectName("action_add")
        self.action_del = QtGui.QAction(MainWindow)
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap(I("trash.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_del.setIcon(icon8)
        self.action_del.setObjectName("action_del")
        self.action_edit = QtGui.QAction(MainWindow)
        icon9 = QtGui.QIcon()
        icon9.addPixmap(QtGui.QPixmap(I("edit_input.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_edit.setIcon(icon9)
        self.action_edit.setAutoRepeat(False)
        self.action_edit.setObjectName("action_edit")
        self.action_merge = QtGui.QAction(MainWindow)
        icon10 = QtGui.QIcon()
        icon10.addPixmap(QtGui.QPixmap(I("merge_books.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_merge.setIcon(icon10)
        self.action_merge.setAutoRepeat(False)
        self.action_merge.setObjectName("action_merge")
        self.action_sync = QtGui.QAction(MainWindow)
        self.action_sync.setEnabled(False)
        icon11 = QtGui.QIcon()
        icon11.addPixmap(QtGui.QPixmap(I("sync.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_sync.setIcon(icon11)
        self.action_sync.setObjectName("action_sync")
        self.action_save = QtGui.QAction(MainWindow)
        icon12 = QtGui.QIcon()
        icon12.addPixmap(QtGui.QPixmap(I("save.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_save.setIcon(icon12)
        self.action_save.setObjectName("action_save")
        self.action_news = QtGui.QAction(MainWindow)
        icon13 = QtGui.QIcon()
        icon13.addPixmap(QtGui.QPixmap(I("news.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_news.setIcon(icon13)
        self.action_news.setObjectName("action_news")
        self.action_convert = QtGui.QAction(MainWindow)
        icon14 = QtGui.QIcon()
        icon14.addPixmap(QtGui.QPixmap(I("convert.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_convert.setIcon(icon14)
        self.action_convert.setObjectName("action_convert")
        self.action_view = QtGui.QAction(MainWindow)
        icon15 = QtGui.QIcon()
        icon15.addPixmap(QtGui.QPixmap(I("view.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_view.setIcon(icon15)
        self.action_view.setObjectName("action_view")
        self.action_open_containing_folder = QtGui.QAction(MainWindow)
        icon16 = QtGui.QIcon()
        icon16.addPixmap(QtGui.QPixmap(I("document_open.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_open_containing_folder.setIcon(icon16)
        self.action_open_containing_folder.setObjectName("action_open_containing_folder")
        self.action_show_book_details = QtGui.QAction(MainWindow)
        icon17 = QtGui.QIcon()
        icon17.addPixmap(QtGui.QPixmap(I("dialog_information.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_show_book_details.setIcon(icon17)
        self.action_show_book_details.setObjectName("action_show_book_details")
        self.action_books_by_same_author = QtGui.QAction(MainWindow)
        icon18 = QtGui.QIcon()
        icon18.addPixmap(QtGui.QPixmap(I("user_profile.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_books_by_same_author.setIcon(icon18)
        self.action_books_by_same_author.setObjectName("action_books_by_same_author")
        self.action_books_in_this_series = QtGui.QAction(MainWindow)
        icon19 = QtGui.QIcon()
        icon19.addPixmap(QtGui.QPixmap(I("books_in_series.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_books_in_this_series.setIcon(icon19)
        self.action_books_in_this_series.setObjectName("action_books_in_this_series")
        self.action_books_by_this_publisher = QtGui.QAction(MainWindow)
        icon20 = QtGui.QIcon()
        icon20.addPixmap(QtGui.QPixmap(I("publisher.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_books_by_this_publisher.setIcon(icon20)
        self.action_books_by_this_publisher.setObjectName("action_books_by_this_publisher")
        self.action_books_with_the_same_tags = QtGui.QAction(MainWindow)
        icon21 = QtGui.QIcon()
        icon21.addPixmap(QtGui.QPixmap(I("tags.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_books_with_the_same_tags.setIcon(icon21)
        self.action_books_with_the_same_tags.setObjectName("action_books_with_the_same_tags")
        self.action_preferences = QtGui.QAction(MainWindow)
        icon22 = QtGui.QIcon()
        icon22.addPixmap(QtGui.QPixmap(I("config.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_preferences.setIcon(icon22)
        self.action_preferences.setObjectName("action_preferences")
        self.tool_bar.addAction(self.action_add)
        self.tool_bar.addAction(self.action_edit)
        self.tool_bar.addAction(self.action_convert)
        self.tool_bar.addAction(self.action_view)
        self.tool_bar.addAction(self.action_news)
        self.tool_bar.addSeparator()
        self.tool_bar.addAction(self.action_sync)
        self.tool_bar.addAction(self.action_save)
        self.tool_bar.addAction(self.action_del)
        self.tool_bar.addSeparator()
        self.tool_bar.addAction(self.action_preferences)
        self.restriction_label.setBuddy(self.search_restriction)
        self.label.setBuddy(self.search)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_("calibre"))
        self.donate_button.setText(_("..."))
        self.restriction_label.setText(_("&Restrict to:"))
        self.search_restriction.setToolTip(_("Books display will be restricted to those matching the selected saved search"))
        self.search_count.setText(_("set in ui.py"))
        self.advanced_search_button.setToolTip(_("Advanced search"))
        self.advanced_search_button.setText(_("..."))
        self.advanced_search_button.setShortcut(_("Alt+S"))
        self.label.setText(_("&Search:"))
        self.search.setToolTip(_("<p>Search the list of books by title, author, publisher, tags, comments, etc.<br><br>Words separated by spaces are ANDed"))
        self.search.setWhatsThis(_("<p>Search the list of books by title, author, publisher, tags, comments, etc.<br><br>Words separated by spaces are ANDed"))
        self.clear_button.setToolTip(_("Reset Quick Search"))
        self.clear_button.setText(_("..."))
        self.saved_search.setToolTip(_("Choose saved search or enter name for new saved search"))
        self.copy_search_button.setToolTip(_("Copy current search text (instead of search name)"))
        self.copy_search_button.setText(_("..."))
        self.save_search_button.setToolTip(_("Save current search under the name shown in the box"))
        self.save_search_button.setText(_("..."))
        self.delete_search_button.setToolTip(_("Delete current saved search"))
        self.delete_search_button.setText(_("..."))
        self.action_add.setText(_("Add books"))
        self.action_add.setShortcut(_("A"))
        self.action_del.setText(_("Remove books"))
        self.action_del.setToolTip(_("Remove books"))
        self.action_del.setShortcut(_("Del"))
        self.action_edit.setText(_("Edit meta information"))
        self.action_edit.setShortcut(_("E"))
        self.action_merge.setText(_("Merge book records"))
        self.action_merge.setShortcut(_("M"))
        self.action_sync.setText(_("Send to device"))
        self.action_save.setText(_("Save to disk"))
        self.action_save.setShortcut(_("S"))
        self.action_news.setText(_("Fetch news"))
        self.action_news.setShortcut(_("F"))
        self.action_convert.setText(_("Convert E-books"))
        self.action_convert.setShortcut(_("C"))
        self.action_view.setText(_("View"))
        self.action_view.setShortcut(_("V"))
        self.action_open_containing_folder.setText(_("Open containing folder"))
        self.action_show_book_details.setText(_("Show book details"))
        self.action_books_by_same_author.setText(_("Books by same author"))
        self.action_books_in_this_series.setText(_("Books in this series"))
        self.action_books_by_this_publisher.setText(_("Books by this publisher"))
        self.action_books_with_the_same_tags.setText(_("Books with the same tags"))
        self.action_preferences.setText(_("Preferences"))
        self.action_preferences.setToolTip(_("Configure calibre"))
        self.action_preferences.setShortcut(_("Ctrl+P"))

from calibre.gui2.widgets import LocationView
from calibre.gui2.search_box import SearchBox2, SavedSearchBox


Generated by  Doxygen 1.6.0   Back to index