Removed generated code, made code load dynamically

This commit is contained in:
Marek Kubica 2011-10-29 23:07:11 +09:00
parent 8bae09fee2
commit 74a1eca4f0
6 changed files with 9 additions and 357 deletions

View File

@ -14,12 +14,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from PyQt4 import QtGui
from ui.about_ui import Ui_DialogAbout
from PyQt4 import QtGui, uic
class DialogAbout(QtGui.QDialog, Ui_DialogAbout):
class DialogAbout(QtGui.QDialog):
def __init__(self, parent):
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
ui = uic.loadUi('dev/ui/about.ui', self)

View File

@ -15,14 +15,13 @@
import os
from PyQt4 import QtGui, QtCore, QtXml
from PyQt4 import QtGui, QtCore, QtXml, uic
import image
from image import ImageFlags
from about import DialogAbout
from options import DialogOptions
from convert import DialogConvert
from ui.book_ui import Ui_MainWindowBook
class Book:
@ -105,10 +104,10 @@ class Book:
self.images.append(item.attribute('filename'))
class MainWindowBook(QtGui.QMainWindow, Ui_MainWindowBook):
class MainWindowBook(QtGui.QMainWindow):
def __init__(self, filename=None):
QtGui.QMainWindow.__init__(self)
self.setupUi(self)
ui = uic.loadUi('dev/ui/book.ui', self)
self.connect(self.actionFileNew, QtCore.SIGNAL('triggered()'), self.onFileNew)
self.connect(self.actionFileOpen, QtCore.SIGNAL('triggered()'), self.onFileOpen)
self.connect(self.actionFileSave, QtCore.SIGNAL('triggered()'), self.onFileSave)

View File

@ -14,17 +14,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from PyQt4 import QtGui, QtCore
from PyQt4 import QtGui, QtCore, uic
from image import ImageFlags
from ui.options_ui import Ui_DialogOptions
class DialogOptions(QtGui.QDialog, Ui_DialogOptions):
class DialogOptions(QtGui.QDialog):
def __init__(self, parent, book):
QtGui.QDialog.__init__(self, parent)
self.book = book
self.setupUi(self)
ui = uic.loadUi('dev/ui/options.ui', self)
self.connect(self, QtCore.SIGNAL('accepted()'), self.onAccept)
self.moveOptionsToDialog()

View File

@ -1,70 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dev/ui/about.ui'
#
# Created: Sun Aug 28 16:12:10 2011
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_DialogAbout(object):
def setupUi(self, DialogAbout):
DialogAbout.setObjectName(_fromUtf8("DialogAbout"))
DialogAbout.resize(470, 200)
DialogAbout.setWindowTitle(QtGui.QApplication.translate("DialogAbout", "About", None, QtGui.QApplication.UnicodeUTF8))
self.horizontalLayout = QtGui.QHBoxLayout(DialogAbout)
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.horizontalLayout.setMargin(0)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.label = QtGui.QLabel(DialogAbout)
self.label.setPixmap(QtGui.QPixmap(_fromUtf8(":/img/img/banner_about.png")))
self.label.setObjectName(_fromUtf8("label"))
self.horizontalLayout.addWidget(self.label)
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setMargin(9)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.labelReadme = QtGui.QLabel(DialogAbout)
self.labelReadme.setMinimumSize(QtCore.QSize(350, 0))
self.labelReadme.setText(QtGui.QApplication.translate("DialogAbout", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<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:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:14pt;\">Mangle</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Version 2.2</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Manga processor by Alex Yatskov for the Kindle e-book reader. Please see <span style=\" font-style:italic;\">license.txt</span> for licensing information. Visit the homepage at <a href=\"http://foosoft.net/mangle\"><span style=\" text-decoration: underline; color:#0000ff;\">http://foosoft.net/mangle</span></a>.</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.labelReadme.setWordWrap(True)
self.labelReadme.setOpenExternalLinks(True)
self.labelReadme.setObjectName(_fromUtf8("labelReadme"))
self.verticalLayout.addWidget(self.labelReadme)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.verticalLayout.addItem(spacerItem)
spacerItem1 = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem1)
self.buttonBox = QtGui.QDialogButtonBox(DialogAbout)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
self.buttonBox.setSizePolicy(sizePolicy)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.verticalLayout.addWidget(self.buttonBox)
self.horizontalLayout.addLayout(self.verticalLayout)
self.retranslateUi(DialogAbout)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), DialogAbout.accept)
QtCore.QMetaObject.connectSlotsByName(DialogAbout)
def retranslateUi(self, DialogAbout):
pass
import resources_rc

View File

@ -1,182 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dev/ui/book.ui'
#
# Created: Sat Aug 7 12:28:58 2010
# by: PyQt4 UI code generator 4.7.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_MainWindowBook(object):
def setupUi(self, MainWindowBook):
MainWindowBook.setObjectName("MainWindowBook")
MainWindowBook.resize(800, 600)
MainWindowBook.setAcceptDrops(True)
self.centralwidget = QtGui.QWidget(MainWindowBook)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget)
self.horizontalLayout.setObjectName("horizontalLayout")
self.listWidgetFiles = QtGui.QListWidget(self.centralwidget)
self.listWidgetFiles.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.listWidgetFiles.setObjectName("listWidgetFiles")
self.horizontalLayout.addWidget(self.listWidgetFiles)
MainWindowBook.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindowBook)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25))
self.menubar.setObjectName("menubar")
self.menu_File = QtGui.QMenu(self.menubar)
self.menu_File.setObjectName("menu_File")
self.menu_Book = QtGui.QMenu(self.menubar)
self.menu_Book.setObjectName("menu_Book")
self.menu_Add = QtGui.QMenu(self.menu_Book)
self.menu_Add.setObjectName("menu_Add")
self.menu_Shift = QtGui.QMenu(self.menu_Book)
self.menu_Shift.setObjectName("menu_Shift")
self.menu_Help = QtGui.QMenu(self.menubar)
self.menu_Help.setObjectName("menu_Help")
MainWindowBook.setMenuBar(self.menubar)
self.toolBar = QtGui.QToolBar(MainWindowBook)
self.toolBar.setObjectName("toolBar")
MainWindowBook.addToolBar(QtCore.Qt.ToolBarArea(QtCore.Qt.TopToolBarArea), self.toolBar)
self.actionFileNew = QtGui.QAction(MainWindowBook)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/img/img/file_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionFileNew.setIcon(icon)
self.actionFileNew.setObjectName("actionFileNew")
self.actionFileOpen = QtGui.QAction(MainWindowBook)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/img/img/file_open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionFileOpen.setIcon(icon1)
self.actionFileOpen.setObjectName("actionFileOpen")
self.actionFileSave = QtGui.QAction(MainWindowBook)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/img/img/save_file.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionFileSave.setIcon(icon2)
self.actionFileSave.setObjectName("actionFileSave")
self.actionFileSaveAs = QtGui.QAction(MainWindowBook)
self.actionFileSaveAs.setObjectName("actionFileSaveAs")
self.actionFileExit = QtGui.QAction(MainWindowBook)
self.actionFileExit.setObjectName("actionFileExit")
self.actionBookOptions = QtGui.QAction(MainWindowBook)
self.actionBookOptions.setObjectName("actionBookOptions")
self.actionBookRemove = QtGui.QAction(MainWindowBook)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/img/img/remove_files.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBookRemove.setIcon(icon3)
self.actionBookRemove.setObjectName("actionBookRemove")
self.actionBookExport = QtGui.QAction(MainWindowBook)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/img/img/export_book.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBookExport.setIcon(icon4)
self.actionBookExport.setObjectName("actionBookExport")
self.actionHelpHomepage = QtGui.QAction(MainWindowBook)
self.actionHelpHomepage.setObjectName("actionHelpHomepage")
self.actionHelpAbout = QtGui.QAction(MainWindowBook)
self.actionHelpAbout.setObjectName("actionHelpAbout")
self.actionBookAddFiles = QtGui.QAction(MainWindowBook)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/img/img/add_file.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBookAddFiles.setIcon(icon5)
self.actionBookAddFiles.setObjectName("actionBookAddFiles")
self.actionBookAddDirectory = QtGui.QAction(MainWindowBook)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/img/img/add_directory.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBookAddDirectory.setIcon(icon6)
self.actionBookAddDirectory.setObjectName("actionBookAddDirectory")
self.actionBookShiftUp = QtGui.QAction(MainWindowBook)
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/img/img/shift_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBookShiftUp.setIcon(icon7)
self.actionBookShiftUp.setObjectName("actionBookShiftUp")
self.actionBookShiftDown = QtGui.QAction(MainWindowBook)
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/img/img/shift_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBookShiftDown.setIcon(icon8)
self.actionBookShiftDown.setObjectName("actionBookShiftDown")
self.menu_File.addAction(self.actionFileNew)
self.menu_File.addAction(self.actionFileOpen)
self.menu_File.addAction(self.actionFileSave)
self.menu_File.addAction(self.actionFileSaveAs)
self.menu_File.addSeparator()
self.menu_File.addAction(self.actionFileExit)
self.menu_Add.addAction(self.actionBookAddFiles)
self.menu_Add.addAction(self.actionBookAddDirectory)
self.menu_Shift.addAction(self.actionBookShiftUp)
self.menu_Shift.addAction(self.actionBookShiftDown)
self.menu_Book.addAction(self.actionBookOptions)
self.menu_Book.addSeparator()
self.menu_Book.addAction(self.menu_Add.menuAction())
self.menu_Book.addAction(self.actionBookRemove)
self.menu_Book.addAction(self.menu_Shift.menuAction())
self.menu_Book.addSeparator()
self.menu_Book.addAction(self.actionBookExport)
self.menu_Help.addAction(self.actionHelpHomepage)
self.menu_Help.addAction(self.actionHelpAbout)
self.menubar.addAction(self.menu_File.menuAction())
self.menubar.addAction(self.menu_Book.menuAction())
self.menubar.addAction(self.menu_Help.menuAction())
self.toolBar.addAction(self.actionFileNew)
self.toolBar.addAction(self.actionFileOpen)
self.toolBar.addAction(self.actionFileSave)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionBookAddFiles)
self.toolBar.addAction(self.actionBookAddDirectory)
self.toolBar.addAction(self.actionBookRemove)
self.toolBar.addAction(self.actionBookShiftUp)
self.toolBar.addAction(self.actionBookShiftDown)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionBookExport)
self.retranslateUi(MainWindowBook)
QtCore.QObject.connect(self.actionFileExit, QtCore.SIGNAL("triggered()"), MainWindowBook.close)
QtCore.QMetaObject.connectSlotsByName(MainWindowBook)
def retranslateUi(self, MainWindowBook):
MainWindowBook.setWindowTitle(QtGui.QApplication.translate("MainWindowBook", "Mangle", None, QtGui.QApplication.UnicodeUTF8))
self.menu_File.setTitle(QtGui.QApplication.translate("MainWindowBook", "&File", None, QtGui.QApplication.UnicodeUTF8))
self.menu_Book.setTitle(QtGui.QApplication.translate("MainWindowBook", "&Book", None, QtGui.QApplication.UnicodeUTF8))
self.menu_Add.setTitle(QtGui.QApplication.translate("MainWindowBook", "&Add", None, QtGui.QApplication.UnicodeUTF8))
self.menu_Shift.setTitle(QtGui.QApplication.translate("MainWindowBook", "&Shift", None, QtGui.QApplication.UnicodeUTF8))
self.menu_Help.setTitle(QtGui.QApplication.translate("MainWindowBook", "&Help", None, QtGui.QApplication.UnicodeUTF8))
self.toolBar.setWindowTitle(QtGui.QApplication.translate("MainWindowBook", "toolBar", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileNew.setText(QtGui.QApplication.translate("MainWindowBook", "&New", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileNew.setToolTip(QtGui.QApplication.translate("MainWindowBook", "New book", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileNew.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+N", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileOpen.setText(QtGui.QApplication.translate("MainWindowBook", "&Open...", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileOpen.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Open book", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileOpen.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+O", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileSave.setText(QtGui.QApplication.translate("MainWindowBook", "&Save", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileSave.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Save book", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileSave.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+S", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileSaveAs.setText(QtGui.QApplication.translate("MainWindowBook", "Save &as...", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileSaveAs.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Save book as", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileSaveAs.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+Shift+S", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileExit.setText(QtGui.QApplication.translate("MainWindowBook", "&Exit", None, QtGui.QApplication.UnicodeUTF8))
self.actionFileExit.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookOptions.setText(QtGui.QApplication.translate("MainWindowBook", "&Options...", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookRemove.setText(QtGui.QApplication.translate("MainWindowBook", "&Remove", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookRemove.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Remove files", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookRemove.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Del", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookExport.setText(QtGui.QApplication.translate("MainWindowBook", "&Export...", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookExport.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Export book", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookExport.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+E", None, QtGui.QApplication.UnicodeUTF8))
self.actionHelpHomepage.setText(QtGui.QApplication.translate("MainWindowBook", "&Homepage...", None, QtGui.QApplication.UnicodeUTF8))
self.actionHelpAbout.setText(QtGui.QApplication.translate("MainWindowBook", "&About...", None, QtGui.QApplication.UnicodeUTF8))
self.actionHelpAbout.setToolTip(QtGui.QApplication.translate("MainWindowBook", "About", None, QtGui.QApplication.UnicodeUTF8))
self.actionHelpAbout.setShortcut(QtGui.QApplication.translate("MainWindowBook", "F1", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookAddFiles.setText(QtGui.QApplication.translate("MainWindowBook", "&Files...", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookAddFiles.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Add files", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookAddFiles.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+F", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookAddDirectory.setText(QtGui.QApplication.translate("MainWindowBook", "&Directory...", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookAddDirectory.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Add directory", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookAddDirectory.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+D", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookShiftUp.setText(QtGui.QApplication.translate("MainWindowBook", "&Up", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookShiftUp.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Shift files up", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookShiftUp.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+PgUp", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookShiftDown.setText(QtGui.QApplication.translate("MainWindowBook", "&Down", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookShiftDown.setToolTip(QtGui.QApplication.translate("MainWindowBook", "Shift files down", None, QtGui.QApplication.UnicodeUTF8))
self.actionBookShiftDown.setShortcut(QtGui.QApplication.translate("MainWindowBook", "Ctrl+PgDown", None, QtGui.QApplication.UnicodeUTF8))
import resources_rc

View File

@ -1,92 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dev/ui/options.ui'
#
# Created: Sat Sep 11 12:04:56 2010
# by: PyQt4 UI code generator 4.7.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_DialogOptions(object):
def setupUi(self, DialogOptions):
DialogOptions.setObjectName("DialogOptions")
DialogOptions.resize(350, 350)
self.verticalLayout = QtGui.QVBoxLayout(DialogOptions)
self.verticalLayout.setObjectName("verticalLayout")
self.groupBox = QtGui.QGroupBox(DialogOptions)
self.groupBox.setFlat(False)
self.groupBox.setObjectName("groupBox")
self.formLayout = QtGui.QFormLayout(self.groupBox)
self.formLayout.setObjectName("formLayout")
self.label = QtGui.QLabel(self.groupBox)
self.label.setObjectName("label")
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label)
self.lineEditTitle = QtGui.QLineEdit(self.groupBox)
self.lineEditTitle.setObjectName("lineEditTitle")
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.lineEditTitle)
self.verticalLayout.addWidget(self.groupBox)
self.groupBox_2 = QtGui.QGroupBox(DialogOptions)
self.groupBox_2.setObjectName("groupBox_2")
self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox_2)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.formLayout_2 = QtGui.QFormLayout()
self.formLayout_2.setObjectName("formLayout_2")
self.label_2 = QtGui.QLabel(self.groupBox_2)
self.label_2.setObjectName("label_2")
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_2)
self.comboBoxDevice = QtGui.QComboBox(self.groupBox_2)
self.comboBoxDevice.setObjectName("comboBoxDevice")
self.comboBoxDevice.addItem("")
self.comboBoxDevice.addItem("")
self.comboBoxDevice.addItem("")
self.comboBoxDevice.addItem("")
self.comboBoxDevice.addItem("")
self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.comboBoxDevice)
self.verticalLayout_2.addLayout(self.formLayout_2)
self.checkboxOverwrite = QtGui.QCheckBox(self.groupBox_2)
self.checkboxOverwrite.setObjectName("checkboxOverwrite")
self.verticalLayout_2.addWidget(self.checkboxOverwrite)
self.checkboxOrient = QtGui.QCheckBox(self.groupBox_2)
self.checkboxOrient.setObjectName("checkboxOrient")
self.verticalLayout_2.addWidget(self.checkboxOrient)
self.checkboxResize = QtGui.QCheckBox(self.groupBox_2)
self.checkboxResize.setObjectName("checkboxResize")
self.verticalLayout_2.addWidget(self.checkboxResize)
self.checkboxQuantize = QtGui.QCheckBox(self.groupBox_2)
self.checkboxQuantize.setObjectName("checkboxQuantize")
self.verticalLayout_2.addWidget(self.checkboxQuantize)
self.checkboxFrame = QtGui.QCheckBox(self.groupBox_2)
self.checkboxFrame.setObjectName("checkboxFrame")
self.verticalLayout_2.addWidget(self.checkboxFrame)
self.verticalLayout.addWidget(self.groupBox_2)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.buttonBox = QtGui.QDialogButtonBox(DialogOptions)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(DialogOptions)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), DialogOptions.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), DialogOptions.reject)
QtCore.QMetaObject.connectSlotsByName(DialogOptions)
def retranslateUi(self, DialogOptions):
DialogOptions.setWindowTitle(QtGui.QApplication.translate("DialogOptions", "Options", None, QtGui.QApplication.UnicodeUTF8))
self.groupBox.setTitle(QtGui.QApplication.translate("DialogOptions", "Book", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("DialogOptions", "Title", None, QtGui.QApplication.UnicodeUTF8))
self.groupBox_2.setTitle(QtGui.QApplication.translate("DialogOptions", "Export", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("DialogOptions", "Device", None, QtGui.QApplication.UnicodeUTF8))
self.comboBoxDevice.setItemText(0, QtGui.QApplication.translate("DialogOptions", "Kindle 1", None, QtGui.QApplication.UnicodeUTF8))
self.comboBoxDevice.setItemText(1, QtGui.QApplication.translate("DialogOptions", "Kindle 2", None, QtGui.QApplication.UnicodeUTF8))
self.comboBoxDevice.setItemText(2, QtGui.QApplication.translate("DialogOptions", "Kindle 3", None, QtGui.QApplication.UnicodeUTF8))
self.comboBoxDevice.setItemText(3, QtGui.QApplication.translate("DialogOptions", "Kindle DX", None, QtGui.QApplication.UnicodeUTF8))
self.comboBoxDevice.setItemText(4, QtGui.QApplication.translate("DialogOptions", "Kindle DXG", None, QtGui.QApplication.UnicodeUTF8))
self.checkboxOverwrite.setText(QtGui.QApplication.translate("DialogOptions", "Overwrite existing files", None, QtGui.QApplication.UnicodeUTF8))
self.checkboxOrient.setText(QtGui.QApplication.translate("DialogOptions", "Orient images to match aspect ratio", None, QtGui.QApplication.UnicodeUTF8))
self.checkboxResize.setText(QtGui.QApplication.translate("DialogOptions", "Resize images to center on screen", None, QtGui.QApplication.UnicodeUTF8))
self.checkboxQuantize.setText(QtGui.QApplication.translate("DialogOptions", "Dither images to match device palette", None, QtGui.QApplication.UnicodeUTF8))
self.checkboxFrame.setText(QtGui.QApplication.translate("DialogOptions", "Draw frame around images", None, QtGui.QApplication.UnicodeUTF8))