New bible import form

Start of default theme handling
Add Transparent backgrounds
This commit is contained in:
Tim Bentley 2009-08-07 18:19:32 +01:00
parent b38553bffe
commit 06ff5ec618
6 changed files with 503 additions and 491 deletions

View File

@ -267,6 +267,9 @@ class Renderer(object):
log.debug(u'render background %s start', self._theme.background_type)
painter = QtGui.QPainter()
painter.begin(self._bg_frame)
if self._theme.background_mode == u'transparent':
painter.fillRect(self._frame.rect(), QtCore.Qt.transparent)
else:
if self._theme.background_type == u'solid':
painter.fillRect(self._frame.rect(), QtGui.QColor(self._theme.background_color))
elif self._theme.background_type == u'gradient':

View File

@ -331,6 +331,11 @@ class ThemeXML(object):
for element in iter:
if len(element.getchildren()) > 0:
master = element.tag + u'_'
else:
#background transparent tags have no children so special case
if element.tag == u'background':
for e in element.attrib.iteritems():
setattr(self, element.tag + u'_' + e[0], e[1])
if len(element.attrib) > 0:
for e in element.attrib.iteritems():
if master == u'font_' and e[0] == u'type':

View File

@ -108,6 +108,9 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
new_theme.new_document(theme_name)
save_from = None
save_to = None
if self.theme.background_mode == u'transparent':
new_theme.add_background_transparent()
else:
if self.theme.background_type == u'solid':
new_theme.add_background_solid(unicode(self.theme.background_color))
elif self.theme.background_type == u'gradient':

View File

@ -146,7 +146,11 @@ class ThemeManager(QtGui.QWidget):
if os.path.exists(theme):
(path, filename) = os.path.split(unicode(file))
textName = os.path.splitext(name)[0]
item_name = QtGui.QListWidgetItem(textName)
if textName == self.global_theme:
name = (u'(%s):%s' % (translate(u'ThemeManager', u'default'), textName))
else:
name = textName
item_name = QtGui.QListWidgetItem(name)
item_name.setIcon(buildIcon(theme))
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(textName))
self.ThemeListWidget.addItem(item_name)
@ -163,6 +167,7 @@ class ThemeManager(QtGui.QWidget):
xml_file = os.path.join(self.path, unicode(themename), unicode(themename) + u'.xml')
try:
xml = file_to_xml(xml_file)
#print xml
except:
newtheme = ThemeXML()
newtheme.new_document(u'New Theme')
@ -173,7 +178,9 @@ class ThemeManager(QtGui.QWidget):
unicode(0), unicode(0), unicode(0))
xml = newtheme.extract_xml()
theme = ThemeXML()
#print theme
theme.parse(xml)
#print "A ", theme
theme.extend_image_filename(self.path)
return theme

View File

@ -2,140 +2,22 @@
# Form implementation generated from reading ui file 'bibleimportdialog.ui'
#
# Created: Fri Feb 20 05:45:22 2009
# Created: Fri Aug 7 06:07:06 2009
# by: PyQt4 UI code generator 4.4.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_BibleImportDialog(object):
def setupUi(self, BibleImportDialog):
BibleImportDialog.setObjectName(u'BibleImportDialog')
BibleImportDialog.resize(494, 725)
BibleImportDialog.resize(500, 686)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
BibleImportDialog.setWindowIcon(icon)
self.ImportToolBox = QtGui.QToolBox(BibleImportDialog)
self.ImportToolBox.setGeometry(QtCore.QRect(20, 20, 451, 401))
self.ImportToolBox.setFrameShape(QtGui.QFrame.StyledPanel)
self.ImportToolBox.setObjectName(u'ImportToolBox')
self.FileImportPage = QtGui.QWidget()
self.FileImportPage.setGeometry(QtCore.QRect(0, 0, 447, 337))
self.FileImportPage.setObjectName(u'FileImportPage')
self.OSISGroupBox = QtGui.QGroupBox(self.FileImportPage)
self.OSISGroupBox.setGeometry(QtCore.QRect(18, 65, 411, 81))
self.OSISGroupBox.setObjectName(u'OSISGroupBox')
self.gridLayout_2 = QtGui.QGridLayout(self.OSISGroupBox)
self.gridLayout_2.setMargin(8)
self.gridLayout_2.setSpacing(8)
self.gridLayout_2.setObjectName(u'gridLayout_2')
self.LocatioLabel = QtGui.QLabel(self.OSISGroupBox)
self.LocatioLabel.setObjectName(u'LocatioLabel')
self.gridLayout_2.addWidget(self.LocatioLabel, 0, 0, 1, 1)
self.OSISLocationEdit = QtGui.QLineEdit(self.OSISGroupBox)
self.OSISLocationEdit.setObjectName(u'OSISLocationEdit')
self.gridLayout_2.addWidget(self.OSISLocationEdit, 0, 1, 1, 1)
self.OsisFileButton = QtGui.QPushButton(self.OSISGroupBox)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.OsisFileButton.setIcon(icon1)
self.OsisFileButton.setObjectName(u'OsisFileButton')
self.gridLayout_2.addWidget(self.OsisFileButton, 0, 2, 1, 1)
self.CVSGroupBox = QtGui.QGroupBox(self.FileImportPage)
self.CVSGroupBox.setGeometry(QtCore.QRect(20, 170, 411, 191))
self.CVSGroupBox.setObjectName(u'CVSGroupBox')
self.gridLayout = QtGui.QGridLayout(self.CVSGroupBox)
self.gridLayout.setMargin(8)
self.gridLayout.setSpacing(8)
self.gridLayout.setObjectName(u'gridLayout')
self.BooksLocationLabel = QtGui.QLabel(self.CVSGroupBox)
self.BooksLocationLabel.setObjectName(u'BooksLocationLabel')
self.gridLayout.addWidget(self.BooksLocationLabel, 0, 0, 1, 1)
self.VerseLocationLabel = QtGui.QLabel(self.CVSGroupBox)
self.VerseLocationLabel.setObjectName(u'VerseLocationLabel')
self.gridLayout.addWidget(self.VerseLocationLabel, 4, 0, 1, 1)
self.VerseLocationEdit = QtGui.QLineEdit(self.CVSGroupBox)
self.VerseLocationEdit.setObjectName(u'VerseLocationEdit')
self.gridLayout.addWidget(self.VerseLocationEdit, 4, 1, 1, 1)
self.BooksLocationEdit = QtGui.QLineEdit(self.CVSGroupBox)
self.BooksLocationEdit.setObjectName(u'BooksLocationEdit')
self.gridLayout.addWidget(self.BooksLocationEdit, 0, 1, 1, 1)
self.BooksFileButton = QtGui.QPushButton(self.CVSGroupBox)
self.BooksFileButton.setIcon(icon1)
self.BooksFileButton.setObjectName(u'BooksFileButton')
self.gridLayout.addWidget(self.BooksFileButton, 0, 2, 1, 1)
self.VersesFileButton = QtGui.QPushButton(self.CVSGroupBox)
self.VersesFileButton.setIcon(icon1)
self.VersesFileButton.setObjectName(u'VersesFileButton')
self.gridLayout.addWidget(self.VersesFileButton, 4, 2, 1, 1)
self.BibleNameEdit = QtGui.QLineEdit(self.FileImportPage)
self.BibleNameEdit.setGeometry(QtCore.QRect(100, 20, 280, 28))
self.BibleNameEdit.setObjectName(u'BibleNameEdit')
self.BibleNameLabel = QtGui.QLabel(self.FileImportPage)
self.BibleNameLabel.setGeometry(QtCore.QRect(18, 20, 98, 22))
self.BibleNameLabel.setObjectName(u'BibleNameLabel')
self.ImportToolBox.addItem(self.FileImportPage, u'')
self.WebBiblePage = QtGui.QWidget()
self.WebBiblePage.setGeometry(QtCore.QRect(0, 0, 447, 337))
self.WebBiblePage.setObjectName(u'WebBiblePage')
self.WebBibleLayout = QtGui.QVBoxLayout(self.WebBiblePage)
self.WebBibleLayout.setSpacing(8)
self.WebBibleLayout.setMargin(8)
self.WebBibleLayout.setObjectName(u'WebBibleLayout')
self.OptionsGroupBox = QtGui.QGroupBox(self.WebBiblePage)
self.OptionsGroupBox.setObjectName(u'OptionsGroupBox')
self.formLayout_2 = QtGui.QFormLayout(self.OptionsGroupBox)
self.formLayout_2.setObjectName(u'formLayout_2')
self.LocationLabel = QtGui.QLabel(self.OptionsGroupBox)
self.LocationLabel.setObjectName(u'LocationLabel')
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.LocationLabel)
self.LocationComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.LocationComboBox.setObjectName(u'LocationComboBox')
self.LocationComboBox.addItem(QtCore.QString())
self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.LocationComboBox)
self.BibleLabel = QtGui.QLabel(self.OptionsGroupBox)
self.BibleLabel.setObjectName(u'BibleLabel')
self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.BibleLabel)
self.BibleComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.BibleComboBox.setObjectName(u'BibleComboBox')
self.BibleComboBox.addItem(QtCore.QString())
self.BibleComboBox.setItemText(0, u'')
self.BibleComboBox.addItem(QtCore.QString())
self.BibleComboBox.addItem(QtCore.QString())
self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.BibleComboBox)
self.WebBibleLayout.addWidget(self.OptionsGroupBox)
self.ProxyGroupBox = QtGui.QGroupBox(self.WebBiblePage)
self.ProxyGroupBox.setObjectName(u'ProxyGroupBox')
self.ProxySettingsLayout = QtGui.QFormLayout(self.ProxyGroupBox)
self.ProxySettingsLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
self.ProxySettingsLayout.setMargin(8)
self.ProxySettingsLayout.setSpacing(8)
self.ProxySettingsLayout.setObjectName(u'ProxySettingsLayout')
self.AddressLabel = QtGui.QLabel(self.ProxyGroupBox)
self.AddressLabel.setObjectName(u'AddressLabel')
self.ProxySettingsLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.AddressLabel)
self.AddressEdit = QtGui.QLineEdit(self.ProxyGroupBox)
self.AddressEdit.setObjectName(u'AddressEdit')
self.ProxySettingsLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.AddressEdit)
self.UsernameLabel = QtGui.QLabel(self.ProxyGroupBox)
self.UsernameLabel.setObjectName(u'UsernameLabel')
self.ProxySettingsLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.UsernameLabel)
self.UsernameEdit = QtGui.QLineEdit(self.ProxyGroupBox)
self.UsernameEdit.setObjectName(u'UsernameEdit')
self.ProxySettingsLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.UsernameEdit)
self.PasswordLabel = QtGui.QLabel(self.ProxyGroupBox)
self.PasswordLabel.setObjectName(u'PasswordLabel')
self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.PasswordLabel)
self.PasswordEdit = QtGui.QLineEdit(self.ProxyGroupBox)
self.PasswordEdit.setEchoMode(QtGui.QLineEdit.Password)
self.PasswordEdit.setObjectName(u'PasswordEdit')
self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.PasswordEdit)
self.WebBibleLayout.addWidget(self.ProxyGroupBox)
self.ImportToolBox.addItem(self.WebBiblePage, u'')
self.LicenceDetailsGroupBox = QtGui.QGroupBox(BibleImportDialog)
self.LicenceDetailsGroupBox.setGeometry(QtCore.QRect(10, 435, 471, 151))
self.LicenceDetailsGroupBox.setGeometry(QtCore.QRect(10, 400, 480, 151))
self.LicenceDetailsGroupBox.setMinimumSize(QtCore.QSize(0, 123))
self.LicenceDetailsGroupBox.setObjectName(u'LicenceDetailsGroupBox')
self.formLayout = QtGui.QFormLayout(self.LicenceDetailsGroupBox)
@ -164,7 +46,7 @@ class Ui_BibleImportDialog(object):
self.MessageLabel.setGeometry(QtCore.QRect(20, 670, 271, 17))
self.MessageLabel.setObjectName(u'MessageLabel')
self.ProgressGroupBox = QtGui.QGroupBox(BibleImportDialog)
self.ProgressGroupBox.setGeometry(QtCore.QRect(10, 600, 471, 70))
self.ProgressGroupBox.setGeometry(QtCore.QRect(10, 550, 480, 70))
self.ProgressGroupBox.setObjectName(u'ProgressGroupBox')
self.gridLayout_3 = QtGui.QGridLayout(self.ProgressGroupBox)
self.gridLayout_3.setObjectName(u'gridLayout_3')
@ -174,7 +56,7 @@ class Ui_BibleImportDialog(object):
self.ProgressBar.setObjectName(u'ProgressBar')
self.gridLayout_3.addWidget(self.ProgressBar, 0, 0, 1, 1)
self.layoutWidget = QtGui.QWidget(BibleImportDialog)
self.layoutWidget.setGeometry(QtCore.QRect(300, 680, 180, 38))
self.layoutWidget.setGeometry(QtCore.QRect(310, 630, 180, 38))
self.layoutWidget.setObjectName(u'layoutWidget')
self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget)
self.horizontalLayout.setMargin(6)
@ -185,10 +67,131 @@ class Ui_BibleImportDialog(object):
self.CancelButton = QtGui.QPushButton(self.layoutWidget)
self.CancelButton.setObjectName(u'CancelButton')
self.horizontalLayout.addWidget(self.CancelButton)
self.tabWidget = QtGui.QTabWidget(BibleImportDialog)
self.tabWidget.setGeometry(QtCore.QRect(10, 30, 480, 361))
self.tabWidget.setObjectName(u'tabWidget')
self.OsisTab = QtGui.QWidget()
self.OsisTab.setObjectName(u'OsisTab')
self.OSISGroupBox = QtGui.QGroupBox(self.OsisTab)
self.OSISGroupBox.setGeometry(QtCore.QRect(10, 10, 460, 141))
self.OSISGroupBox.setObjectName(u'OSISGroupBox')
self.gridLayout_2 = QtGui.QGridLayout(self.OSISGroupBox)
self.gridLayout_2.setObjectName(u'gridLayout_2')
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
self.BibleNameLabel = QtGui.QLabel(self.OSISGroupBox)
self.BibleNameLabel.setObjectName(u'BibleNameLabel')
self.horizontalLayout_2.addWidget(self.BibleNameLabel)
self.BibleNameEdit = QtGui.QLineEdit(self.OSISGroupBox)
self.BibleNameEdit.setObjectName(u'BibleNameEdit')
self.horizontalLayout_2.addWidget(self.BibleNameEdit)
self.gridLayout_2.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setObjectName(u'horizontalLayout_3')
self.LocatioLabel = QtGui.QLabel(self.OSISGroupBox)
self.LocatioLabel.setObjectName(u'LocatioLabel')
self.horizontalLayout_3.addWidget(self.LocatioLabel)
self.OSISLocationEdit = QtGui.QLineEdit(self.OSISGroupBox)
self.OSISLocationEdit.setObjectName(u'OSISLocationEdit')
self.horizontalLayout_3.addWidget(self.OSISLocationEdit)
self.OsisFileButton = QtGui.QPushButton(self.OSISGroupBox)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.OsisFileButton.setIcon(icon1)
self.OsisFileButton.setObjectName(u'OsisFileButton')
self.horizontalLayout_3.addWidget(self.OsisFileButton)
self.gridLayout_2.addLayout(self.horizontalLayout_3, 1, 0, 1, 1)
self.tabWidget.addTab(self.OsisTab, u'')
self.CsvTab = QtGui.QWidget()
self.CsvTab.setObjectName(u'CsvTab')
self.CVSGroupBox = QtGui.QGroupBox(self.CsvTab)
self.CVSGroupBox.setGeometry(QtCore.QRect(10, 10, 460, 191))
self.CVSGroupBox.setObjectName(u'CVSGroupBox')
self.gridLayout = QtGui.QGridLayout(self.CVSGroupBox)
self.gridLayout.setMargin(8)
self.gridLayout.setSpacing(8)
self.gridLayout.setObjectName(u'gridLayout')
self.BooksLocationLabel = QtGui.QLabel(self.CVSGroupBox)
self.BooksLocationLabel.setObjectName(u'BooksLocationLabel')
self.gridLayout.addWidget(self.BooksLocationLabel, 0, 0, 1, 1)
self.VerseLocationLabel = QtGui.QLabel(self.CVSGroupBox)
self.VerseLocationLabel.setObjectName(u'VerseLocationLabel')
self.gridLayout.addWidget(self.VerseLocationLabel, 4, 0, 1, 1)
self.VerseLocationEdit = QtGui.QLineEdit(self.CVSGroupBox)
self.VerseLocationEdit.setObjectName(u'VerseLocationEdit')
self.gridLayout.addWidget(self.VerseLocationEdit, 4, 1, 1, 1)
self.BooksLocationEdit = QtGui.QLineEdit(self.CVSGroupBox)
self.BooksLocationEdit.setObjectName(u'BooksLocationEdit')
self.gridLayout.addWidget(self.BooksLocationEdit, 0, 1, 1, 1)
self.BooksFileButton = QtGui.QPushButton(self.CVSGroupBox)
self.BooksFileButton.setIcon(icon1)
self.BooksFileButton.setObjectName(u'BooksFileButton')
self.gridLayout.addWidget(self.BooksFileButton, 0, 2, 1, 1)
self.VersesFileButton = QtGui.QPushButton(self.CVSGroupBox)
self.VersesFileButton.setIcon(icon1)
self.VersesFileButton.setObjectName(u'VersesFileButton')
self.gridLayout.addWidget(self.VersesFileButton, 4, 2, 1, 1)
self.tabWidget.addTab(self.CsvTab, u'')
self.HttpTab = QtGui.QWidget()
self.HttpTab.setObjectName(u'HttpTab')
self.OptionsGroupBox = QtGui.QGroupBox(self.HttpTab)
self.OptionsGroupBox.setGeometry(QtCore.QRect(10, 10, 460, 141))
self.OptionsGroupBox.setObjectName(u'OptionsGroupBox')
self.verticalLayout = QtGui.QVBoxLayout(self.OptionsGroupBox)
self.verticalLayout.setObjectName(u'verticalLayout')
self.horizontalLayout_4 = QtGui.QHBoxLayout()
self.horizontalLayout_4.setObjectName(u'horizontalLayout_4')
self.LocationLabel = QtGui.QLabel(self.OptionsGroupBox)
self.LocationLabel.setObjectName(u'LocationLabel')
self.horizontalLayout_4.addWidget(self.LocationLabel)
self.LocationComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.LocationComboBox.setObjectName(u'LocationComboBox')
self.LocationComboBox.addItem(QtCore.QString())
self.horizontalLayout_4.addWidget(self.LocationComboBox)
self.verticalLayout.addLayout(self.horizontalLayout_4)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.horizontalLayout_5.setObjectName(u'horizontalLayout_5')
self.BibleLabel = QtGui.QLabel(self.OptionsGroupBox)
self.BibleLabel.setObjectName(u'BibleLabel')
self.horizontalLayout_5.addWidget(self.BibleLabel)
self.BibleComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.BibleComboBox.setObjectName(u'BibleComboBox')
self.BibleComboBox.addItem(QtCore.QString())
self.BibleComboBox.setItemText(0, u'')
self.BibleComboBox.addItem(QtCore.QString())
self.BibleComboBox.addItem(QtCore.QString())
self.horizontalLayout_5.addWidget(self.BibleComboBox)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.ProxyGroupBox = QtGui.QGroupBox(self.HttpTab)
self.ProxyGroupBox.setGeometry(QtCore.QRect(10, 160, 460, 161))
self.ProxyGroupBox.setObjectName(u'ProxyGroupBox')
self.ProxySettingsLayout = QtGui.QFormLayout(self.ProxyGroupBox)
self.ProxySettingsLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
self.ProxySettingsLayout.setMargin(8)
self.ProxySettingsLayout.setSpacing(8)
self.ProxySettingsLayout.setObjectName(u'ProxySettingsLayout')
self.AddressLabel = QtGui.QLabel(self.ProxyGroupBox)
self.AddressLabel.setObjectName(u'AddressLabel')
self.ProxySettingsLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.AddressLabel)
self.AddressEdit = QtGui.QLineEdit(self.ProxyGroupBox)
self.AddressEdit.setObjectName(u'AddressEdit')
self.ProxySettingsLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.AddressEdit)
self.UsernameLabel = QtGui.QLabel(self.ProxyGroupBox)
self.UsernameLabel.setObjectName(u'UsernameLabel')
self.ProxySettingsLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.UsernameLabel)
self.UsernameEdit = QtGui.QLineEdit(self.ProxyGroupBox)
self.UsernameEdit.setObjectName(u'UsernameEdit')
self.ProxySettingsLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.UsernameEdit)
self.PasswordLabel = QtGui.QLabel(self.ProxyGroupBox)
self.PasswordLabel.setObjectName(u'PasswordLabel')
self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.PasswordLabel)
self.PasswordEdit = QtGui.QLineEdit(self.ProxyGroupBox)
self.PasswordEdit.setObjectName(u'PasswordEdit')
self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.PasswordEdit)
self.tabWidget.addTab(self.HttpTab, u'')
self.retranslateUi(BibleImportDialog)
self.ImportToolBox.setCurrentIndex(1)
self.tabWidget.setCurrentIndex(2)
QtCore.QMetaObject.connectSlotsByName(BibleImportDialog)
BibleImportDialog.setTabOrder(self.BibleNameEdit, self.OSISLocationEdit)
BibleImportDialog.setTabOrder(self.OSISLocationEdit, self.OsisFileButton)
@ -206,30 +209,31 @@ class Ui_BibleImportDialog(object):
BibleImportDialog.setTabOrder(self.CopyrightEdit, self.PermisionEdit)
def retranslateUi(self, BibleImportDialog):
BibleImportDialog.setWindowTitle(translate(u'BibleImportDialog', u'Bible Registration'))
self.OSISGroupBox.setTitle(translate(u'BibleImportDialog', u'OSIS Bible'))
self.LocatioLabel.setText(translate(u'BibleImportDialog', u'File Location:'))
self.CVSGroupBox.setTitle(translate(u'BibleImportDialog', u'CVS Bible'))
self.BooksLocationLabel.setText(translate(u'BibleImportDialog', u'Books Location:'))
self.VerseLocationLabel.setText(translate(u'BibleImportDialog', u'Verse Location:'))
self.BibleNameLabel.setText(translate(u'BibleImportDialog', u'Bible Name:'))
self.ImportToolBox.setItemText(self.ImportToolBox.indexOf(self.FileImportPage), translate(u'BibleImportDialog', u'File Import Page'))
self.OptionsGroupBox.setTitle(translate(u'BibleImportDialog', u'Download Options'))
self.LocationLabel.setText(translate(u'BibleImportDialog', u'Location:'))
self.LocationComboBox.setItemText(0, translate(u'BibleImportDialog', u'Crosswalk'))
self.BibleLabel.setText(translate(u'BibleImportDialog', u'Bible:'))
self.BibleComboBox.setItemText(1, translate(u'BibleImportDialog', u'NIV'))
self.BibleComboBox.setItemText(2, translate(u'BibleImportDialog', u'KJV'))
self.ProxyGroupBox.setTitle(translate(u'BibleImportDialog', u'Proxy Settings (Optional)'))
self.AddressLabel.setText(translate(u'BibleImportDialog', u'Proxy Address:'))
self.UsernameLabel.setText(translate(u'BibleImportDialog', u'Username:'))
self.PasswordLabel.setText(translate(u'BibleImportDialog', u'Password:'))
self.ImportToolBox.setItemText(self.ImportToolBox.indexOf(self.WebBiblePage), translate(u'BibleImportDialog', u'Web Bible Import page'))
self.LicenceDetailsGroupBox.setTitle(translate(u'BibleImportDialog', u'Licence Details'))
self.VersionNameLabel.setText(translate(u'BibleImportDialog', u'Version Name:'))
self.CopyrightLabel.setText(translate(u'BibleImportDialog', u'Copyright:'))
self.PermisionLabel.setText(translate(u'BibleImportDialog', u'Permission:'))
self.ProgressGroupBox.setTitle(translate(u'BibleImportDialog', u'Import Progress'))
self.ProgressBar.setFormat(translate(u'BibleImportDialog', u'%p'))
self.ImportButton.setText(translate(u'BibleImportDialog', u'Import'))
self.CancelButton.setText(translate(u'BibleImportDialog', u'Cancel'))
BibleImportDialog.setWindowTitle(QtGui.QApplication.translate(u'BibleImportDialog', u'Bible Registration', None, QtGui.QApplication.UnicodeUTF8))
self.LicenceDetailsGroupBox.setTitle(QtGui.QApplication.translate(u'BibleImportDialog', u'Licence Details', None, QtGui.QApplication.UnicodeUTF8))
self.VersionNameLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Version Name:', None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Copyright:', None, QtGui.QApplication.UnicodeUTF8))
self.PermisionLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Permission:', None, QtGui.QApplication.UnicodeUTF8))
self.ProgressGroupBox.setTitle(QtGui.QApplication.translate(u'BibleImportDialog', u'Import Progress', None, QtGui.QApplication.UnicodeUTF8))
self.ProgressBar.setFormat(QtGui.QApplication.translate(u'BibleImportDialog', u'%p', None, QtGui.QApplication.UnicodeUTF8))
self.ImportButton.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Import', None, QtGui.QApplication.UnicodeUTF8))
self.CancelButton.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Cancel', None, QtGui.QApplication.UnicodeUTF8))
self.OSISGroupBox.setTitle(QtGui.QApplication.translate(u'BibleImportDialog', u'OSIS Bible', None, QtGui.QApplication.UnicodeUTF8))
self.BibleNameLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Bible Name:', None, QtGui.QApplication.UnicodeUTF8))
self.LocatioLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'File Location:', None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.OsisTab), QtGui.QApplication.translate(u'BibleImportDialog', u'Osis (Sword) Imports', None, QtGui.QApplication.UnicodeUTF8))
self.CVSGroupBox.setTitle(QtGui.QApplication.translate(u'BibleImportDialog', u'CVS Bible', None, QtGui.QApplication.UnicodeUTF8))
self.BooksLocationLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Books Location:', None, QtGui.QApplication.UnicodeUTF8))
self.VerseLocationLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Verse Location:', None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.CsvTab), QtGui.QApplication.translate(u'BibleImportDialog', u'CSV File Imports', None, QtGui.QApplication.UnicodeUTF8))
self.OptionsGroupBox.setTitle(QtGui.QApplication.translate(u'BibleImportDialog', u'Download Options', None, QtGui.QApplication.UnicodeUTF8))
self.LocationLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Location:', None, QtGui.QApplication.UnicodeUTF8))
self.LocationComboBox.setItemText(0, QtGui.QApplication.translate(u'BibleImportDialog', u'Crosswalk', None, QtGui.QApplication.UnicodeUTF8))
self.BibleLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Bible:', None, QtGui.QApplication.UnicodeUTF8))
self.BibleComboBox.setItemText(1, QtGui.QApplication.translate(u'BibleImportDialog', u'NIV', None, QtGui.QApplication.UnicodeUTF8))
self.BibleComboBox.setItemText(2, QtGui.QApplication.translate(u'BibleImportDialog', u'KJV', None, QtGui.QApplication.UnicodeUTF8))
self.ProxyGroupBox.setTitle(QtGui.QApplication.translate(u'BibleImportDialog', u'Proxy Settings (Optional)', None, QtGui.QApplication.UnicodeUTF8))
self.AddressLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Proxy Address:', None, QtGui.QApplication.UnicodeUTF8))
self.UsernameLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Username:', None, QtGui.QApplication.UnicodeUTF8))
self.PasswordLabel.setText(QtGui.QApplication.translate(u'BibleImportDialog', u'Password:', None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.HttpTab), QtGui.QApplication.translate(u'BibleImportDialog', u'Web Downloads', None, QtGui.QApplication.UnicodeUTF8))

View File

@ -6,307 +6,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>494</width>
<height>725</height>
<width>500</width>
<height>686</height>
</rect>
</property>
<property name="windowTitle">
<string>Bible Registration</string>
</property>
<property name="windowIcon">
<iconset resource="../images/openlp-2.qrc">
<iconset>
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
</property>
<widget class="QToolBox" name="ImportToolBox">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>451</width>
<height>401</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="FileImportPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>447</width>
<height>337</height>
</rect>
</property>
<attribute name="label">
<string>File Import Page</string>
</attribute>
<widget class="QGroupBox" name="OSISGroupBox">
<property name="geometry">
<rect>
<x>18</x>
<y>65</y>
<width>411</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>OSIS Bible</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>8</number>
</property>
<property name="spacing">
<number>8</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="LocatioLabel">
<property name="text">
<string>File Location:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="OSISLocationEdit"/>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="OsisFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="CVSGroupBox">
<property name="geometry">
<rect>
<x>20</x>
<y>170</y>
<width>411</width>
<height>191</height>
</rect>
</property>
<property name="title">
<string>CVS Bible</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>8</number>
</property>
<property name="spacing">
<number>8</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="BooksLocationLabel">
<property name="text">
<string>Books Location:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="VerseLocationLabel">
<property name="text">
<string>Verse Location:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="VerseLocationEdit"/>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="BooksLocationEdit"/>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="BooksFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="VersesFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QLineEdit" name="BibleNameEdit">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>280</width>
<height>28</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="BibleNameLabel">
<property name="geometry">
<rect>
<x>18</x>
<y>20</y>
<width>98</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Bible Name:</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="WebBiblePage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>447</width>
<height>337</height>
</rect>
</property>
<attribute name="label">
<string>Web Bible Import page</string>
</attribute>
<layout class="QVBoxLayout" name="WebBibleLayout">
<property name="spacing">
<number>8</number>
</property>
<property name="margin">
<number>8</number>
</property>
<item>
<widget class="QGroupBox" name="OptionsGroupBox">
<property name="title">
<string>Download Options</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="LocationLabel">
<property name="text">
<string>Location:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="LocationComboBox">
<item>
<property name="text">
<string>Crosswalk</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="BibleLabel">
<property name="text">
<string>Bible:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="BibleComboBox">
<item>
<property name="text">
<string/>
</property>
</item>
<item>
<property name="text">
<string>NIV</string>
</property>
</item>
<item>
<property name="text">
<string>KJV</string>
</property>
</item>
</widget>
</item>
</layout>
<zorder>BibleComboBox</zorder>
<zorder>LocationLabel</zorder>
<zorder>BibleLabel</zorder>
<zorder>LocationComboBox</zorder>
</widget>
</item>
<item>
<widget class="QGroupBox" name="ProxyGroupBox">
<property name="title">
<string>Proxy Settings (Optional)</string>
</property>
<layout class="QFormLayout" name="ProxySettingsLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="horizontalSpacing">
<number>8</number>
</property>
<property name="verticalSpacing">
<number>8</number>
</property>
<property name="margin">
<number>8</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="AddressLabel">
<property name="text">
<string>Proxy Address:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="AddressEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="UsernameLabel">
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="UsernameEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="PasswordLabel">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="PasswordEdit"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="LicenceDetailsGroupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>435</y>
<width>471</width>
<y>400</y>
<width>480</width>
<height>151</height>
</rect>
</property>
@ -375,8 +91,8 @@
<property name="geometry">
<rect>
<x>10</x>
<y>600</y>
<width>471</width>
<y>550</y>
<width>480</width>
<height>70</height>
</rect>
</property>
@ -402,8 +118,8 @@
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>300</x>
<y>680</y>
<x>310</x>
<y>630</y>
<width>180</width>
<height>38</height>
</rect>
@ -428,6 +144,280 @@
</item>
</layout>
</widget>
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>480</width>
<height>361</height>
</rect>
</property>
<property name="currentIndex">
<number>2</number>
</property>
<widget class="QWidget" name="OsisTab">
<attribute name="title">
<string>Osis (Sword) Imports</string>
</attribute>
<widget class="QGroupBox" name="OSISGroupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>460</width>
<height>141</height>
</rect>
</property>
<property name="title">
<string>OSIS Bible</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="BibleNameLabel">
<property name="text">
<string>Bible Name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="BibleNameEdit"/>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="LocatioLabel">
<property name="text">
<string>File Location:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="OSISLocationEdit"/>
</item>
<item>
<widget class="QPushButton" name="OsisFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="CsvTab">
<attribute name="title">
<string>CSV File Imports</string>
</attribute>
<widget class="QGroupBox" name="CVSGroupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>460</width>
<height>191</height>
</rect>
</property>
<property name="title">
<string>CVS Bible</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>8</number>
</property>
<property name="spacing">
<number>8</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="BooksLocationLabel">
<property name="text">
<string>Books Location:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="VerseLocationLabel">
<property name="text">
<string>Verse Location:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="VerseLocationEdit"/>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="BooksLocationEdit"/>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="BooksFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="VersesFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="HttpTab">
<attribute name="title">
<string>Web Downloads</string>
</attribute>
<widget class="QGroupBox" name="OptionsGroupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>460</width>
<height>141</height>
</rect>
</property>
<property name="title">
<string>Download Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="LocationLabel">
<property name="text">
<string>Location:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="LocationComboBox">
<item>
<property name="text">
<string>Crosswalk</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="BibleLabel">
<property name="text">
<string>Bible:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="BibleComboBox">
<item>
<property name="text">
<string/>
</property>
</item>
<item>
<property name="text">
<string>NIV</string>
</property>
</item>
<item>
<property name="text">
<string>KJV</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
<zorder>BibleComboBox</zorder>
<zorder>LocationLabel</zorder>
<zorder>BibleLabel</zorder>
<zorder>LocationComboBox</zorder>
</widget>
<widget class="QGroupBox" name="ProxyGroupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>460</width>
<height>161</height>
</rect>
</property>
<property name="title">
<string>Proxy Settings (Optional)</string>
</property>
<layout class="QFormLayout" name="ProxySettingsLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="horizontalSpacing">
<number>8</number>
</property>
<property name="verticalSpacing">
<number>8</number>
</property>
<property name="margin">
<number>8</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="AddressLabel">
<property name="text">
<string>Proxy Address:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="AddressEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="UsernameLabel">
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="UsernameEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="PasswordLabel">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="PasswordEdit"/>
</item>
</layout>
</widget>
<zorder>OptionsGroupBox</zorder>
<zorder>OptionsGroupBox</zorder>
<zorder>ProxyGroupBox</zorder>
</widget>
</widget>
</widget>
<tabstops>
<tabstop>BibleNameEdit</tabstop>