forked from openlp/openlp
DisplayTag Updates
This commit is contained in:
parent
29088db516
commit
338efdc543
@ -27,25 +27,234 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate, build_icon
|
||||
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
_fromUtf8 = lambda s: s
|
||||
|
||||
class Ui_DisplayTagDialog(object):
|
||||
def setupUi(self, settingsDialog):
|
||||
settingsDialog.setObjectName(u'settingsDialog')
|
||||
settingsDialog.resize(700, 500)
|
||||
settingsDialog.setWindowIcon(
|
||||
build_icon(u':/system/system_settings.png'))
|
||||
self.settingsLayout = QtGui.QVBoxLayout(settingsDialog)
|
||||
self.settingsLayout.setObjectName(u'settingsLayout')
|
||||
self.settingsTabWidget = QtGui.QTabWidget(settingsDialog)
|
||||
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
|
||||
self.settingsLayout.addWidget(self.settingsTabWidget)
|
||||
|
||||
self.buttonBox = create_accept_reject_button_box(settingsDialog, True)
|
||||
self.settingsLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(settingsDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
||||
def setupUi(self, displayTagDialog):
|
||||
# displayTagDialog.setObjectName(u'displayTagDialog')
|
||||
# displayTagDialog.resize(700, 500)
|
||||
# displayTagDialog.setWindowIcon(
|
||||
# build_icon(u':/system/system_settings.png'))
|
||||
# self.settingsLayout = QtGui.QVBoxLayout(displayTagDialog)
|
||||
# self.settingsLayout.setObjectName(u'settingsLayout')
|
||||
# self.editGroupBox = QtGui.QGroupBox(displayTagDialog)
|
||||
# self.editGroupBox.setGeometry(QtCore.QRect(10, 220, 650, 181))
|
||||
# self.editGroupBox.setObjectName(u'editGroupBox')
|
||||
# self.updatePushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
# self.updatePushButton.setGeometry(QtCore.QRect(550, 140, 71, 26))
|
||||
# self.updatePushButton.setObjectName(u'updatePushButton')
|
||||
# self.layoutWidget = QtGui.QWidget(self.editGroupBox)
|
||||
# self.layoutWidget.setGeometry(QtCore.QRect(5, 20, 571, 114))
|
||||
# self.layoutWidget.setObjectName(u'layoutWidget')
|
||||
# self.formLayout = QtGui.QFormLayout(self.layoutWidget)
|
||||
# self.formLayout.setObjectName(u'formLayout')
|
||||
# self.descriptionLabel = QtGui.QLabel(self.layoutWidget)
|
||||
# self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
# self.descriptionLabel.setObjectName(u'descriptionLabel')
|
||||
# self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
# self.descriptionLabel)
|
||||
# self.descriptionLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
# self.descriptionLineEdit.setObjectName(u'descriptionLineEdit')
|
||||
# self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
# self.descriptionLineEdit)
|
||||
# self.tagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
# self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
# self.tagLabel.setObjectName(u'tagLabel')
|
||||
# self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.tagLabel)
|
||||
# self.tagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
# self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||
# self.tagLineEdit.setMaxLength(5)
|
||||
# self.tagLineEdit.setObjectName(u'tagLineEdit')
|
||||
# self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
# self.tagLineEdit)
|
||||
# self.startTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
# self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
# self.startTagLabel.setObjectName(u'startTagLabel')
|
||||
# self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
# self.startTagLabel)
|
||||
# self.startTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
# self.startTagLineEdit.setObjectName(u'startTagLineEdit')
|
||||
# self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
# self.startTagLineEdit)
|
||||
# self.endTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
# self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
# self.endTagLabel.setObjectName(u'endTagLabel')
|
||||
# self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
# self.endTagLabel)
|
||||
# self.endTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
# self.endTagLineEdit.setObjectName(u'endTagLineEdit')
|
||||
# self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
# self.endTagLineEdit)
|
||||
# self.defaultPushButton = QtGui.QPushButton(displayTagDialog)
|
||||
# self.defaultPushButton.setGeometry(QtCore.QRect(430, 188, 71, 26))
|
||||
# self.defaultPushButton.setObjectName(u'updatePushButton')
|
||||
# self.deletePushButton = QtGui.QPushButton(displayTagDialog)
|
||||
# self.deletePushButton.setGeometry(QtCore.QRect(510, 188, 71, 26))
|
||||
# self.deletePushButton.setObjectName(u'deletePushButton')
|
||||
# self.newPushButton = QtGui.QPushButton(displayTagDialog)
|
||||
# self.newPushButton.setGeometry(QtCore.QRect(600, 188, 71, 26))
|
||||
# self.newPushButton.setObjectName(u'newPushButton')
|
||||
# self.tagTableWidget = QtGui.QTableWidget(displayTagDialog)
|
||||
# self.tagTableWidget.setGeometry(QtCore.QRect(10, 10, 650, 171))
|
||||
# self.tagTableWidget.setHorizontalScrollBarPolicy(
|
||||
# QtCore.Qt.ScrollBarAlwaysOff)
|
||||
# self.tagTableWidget.setEditTriggers(
|
||||
# QtGui.QAbstractItemView.NoEditTriggers)
|
||||
# self.tagTableWidget.setAlternatingRowColors(True)
|
||||
# self.tagTableWidget.setSelectionMode(
|
||||
# QtGui.QAbstractItemView.SingleSelection)
|
||||
# self.tagTableWidget.setSelectionBehavior(
|
||||
# QtGui.QAbstractItemView.SelectRows)
|
||||
# self.tagTableWidget.setCornerButtonEnabled(False)
|
||||
# self.tagTableWidget.setObjectName(u'tagTableWidget')
|
||||
# self.tagTableWidget.setColumnCount(4)
|
||||
# self.tagTableWidget.setRowCount(0)
|
||||
# item = QtGui.QTableWidgetItem()
|
||||
# self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
||||
# item = QtGui.QTableWidgetItem()
|
||||
# self.tagTableWidget.setHorizontalHeaderItem(1, item)
|
||||
# item = QtGui.QTableWidgetItem()
|
||||
# self.tagTableWidget.setHorizontalHeaderItem(2, item)
|
||||
# item = QtGui.QTableWidgetItem()
|
||||
# self.tagTableWidget.setHorizontalHeaderItem(3, item)
|
||||
#
|
||||
# self.buttonBox = create_accept_reject_button_box(displayTagDialog, True)
|
||||
# self.settingsLayout.addWidget(self.buttonBox)
|
||||
# self.retranslateUi(displayTagDialog)
|
||||
# QtCore.QMetaObject.connectSlotsByName(displayTagDialog)
|
||||
displayTagDialog.setObjectName(_fromUtf8("displayTagDialog"))
|
||||
displayTagDialog.resize(717, 554)
|
||||
self.editGroupBox = QtGui.QGroupBox(displayTagDialog)
|
||||
self.editGroupBox.setGeometry(QtCore.QRect(10, 320, 691, 181))
|
||||
self.editGroupBox.setObjectName(_fromUtf8("editGroupBox"))
|
||||
self.updatePushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
self.updatePushButton.setGeometry(QtCore.QRect(600, 140, 73, 26))
|
||||
self.updatePushButton.setObjectName(_fromUtf8("updatePushButton"))
|
||||
self.layoutWidget = QtGui.QWidget(self.editGroupBox)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(20, 50, 571, 114))
|
||||
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
|
||||
self.formLayout = QtGui.QFormLayout(self.layoutWidget)
|
||||
self.formLayout.setMargin(0)
|
||||
self.formLayout.setObjectName(_fromUtf8("formLayout"))
|
||||
self.descriptionLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.descriptionLabel.setObjectName(_fromUtf8("descriptionLabel"))
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.descriptionLabel)
|
||||
self.descriptionLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.descriptionLineEdit.setObjectName(_fromUtf8("descriptionLineEdit"))
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.descriptionLineEdit)
|
||||
self.tagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tagLabel.setObjectName(_fromUtf8("tagLabel"))
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.tagLabel)
|
||||
self.tagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||
self.tagLineEdit.setMaxLength(5)
|
||||
self.tagLineEdit.setObjectName(_fromUtf8("tagLineEdit"))
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.tagLineEdit)
|
||||
self.startTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.startTagLabel.setObjectName(_fromUtf8("startTagLabel"))
|
||||
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.startTagLabel)
|
||||
self.startTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.startTagLineEdit.setObjectName(_fromUtf8("startTagLineEdit"))
|
||||
self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.startTagLineEdit)
|
||||
self.endTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.endTagLabel.setObjectName(_fromUtf8("endTagLabel"))
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.endTagLabel)
|
||||
self.endTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.endTagLineEdit.setObjectName(_fromUtf8("endTagLineEdit"))
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.endTagLineEdit)
|
||||
self.addPushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
self.addPushButton.setGeometry(QtCore.QRect(600, 40, 71, 26))
|
||||
self.addPushButton.setObjectName(_fromUtf8("addPushButton"))
|
||||
self.newPushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
self.newPushButton.setGeometry(QtCore.QRect(600, 70, 71, 26))
|
||||
self.newPushButton.setObjectName(_fromUtf8("newPushButton"))
|
||||
self.buttonBox = QtGui.QDialogButtonBox(displayTagDialog)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(540, 510, 162, 26))
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
|
||||
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
|
||||
self.deletePushButton = QtGui.QPushButton(displayTagDialog)
|
||||
self.deletePushButton.setGeometry(QtCore.QRect(630, 280, 71, 26))
|
||||
self.deletePushButton.setObjectName(_fromUtf8("deletePushButton"))
|
||||
self.tagTableWidget = QtGui.QTableWidget(displayTagDialog)
|
||||
self.tagTableWidget.setGeometry(QtCore.QRect(10, 10, 691, 271))
|
||||
self.tagTableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.tagTableWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
|
||||
self.tagTableWidget.setAlternatingRowColors(True)
|
||||
self.tagTableWidget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
|
||||
self.tagTableWidget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
|
||||
self.tagTableWidget.setCornerButtonEnabled(False)
|
||||
self.tagTableWidget.setObjectName(_fromUtf8("tagTableWidget"))
|
||||
self.tagTableWidget.setColumnCount(4)
|
||||
self.tagTableWidget.setRowCount(0)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(1, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(2, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(3, item)
|
||||
self.defaultPushButton = QtGui.QPushButton(displayTagDialog)
|
||||
self.defaultPushButton.setGeometry(QtCore.QRect(550, 280, 71, 26))
|
||||
self.defaultPushButton.setObjectName(_fromUtf8("defaultPushButton"))
|
||||
|
||||
self.retranslateUi(displayTagDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(displayTagDialog)
|
||||
|
||||
def retranslateUi(self, displayTagDialog):
|
||||
displayTagDialog.setWindowTitle(translate('OpenLP.displayTagForm',
|
||||
'Configure Display Tags'))
|
||||
self.editGroupBox.setTitle(
|
||||
translate('OpenLP.DisplayTagTab', 'Edit Selection'))
|
||||
self.updatePushButton.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Update'))
|
||||
self.descriptionLabel.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Description'))
|
||||
self.tagLabel.setText(translate('OpenLP.DisplayTagTab', 'Tag'))
|
||||
self.startTagLabel.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Start tag'))
|
||||
self.endTagLabel.setText(translate('OpenLP.DisplayTagTab', 'End tag'))
|
||||
self.deletePushButton.setText(UiStrings.Delete)
|
||||
self.defaultPushButton.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Default'))
|
||||
self.newPushButton.setText(UiStrings.New)
|
||||
self.tagTableWidget.horizontalHeaderItem(0)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Description'))
|
||||
self.tagTableWidget.horizontalHeaderItem(1)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Tag id'))
|
||||
self.tagTableWidget.horizontalHeaderItem(2)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Start Html'))
|
||||
self.tagTableWidget.horizontalHeaderItem(3)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'End Html'))
|
||||
self.tagTableWidget.setColumnWidth(0, 120)
|
||||
self.tagTableWidget.setColumnWidth(1, 40)
|
||||
self.tagTableWidget.setColumnWidth(2, 240)
|
||||
self.tagTableWidget.setColumnWidth(3, 200)
|
||||
|
||||
displayTagDialog.setWindowTitle(QtGui.QApplication.translate("displayTagDialog", "Form", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.editGroupBox.setTitle(QtGui.QApplication.translate("displayTagDialog", "Edit Selection", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.updatePushButton.setText(QtGui.QApplication.translate("displayTagDialog", "Update", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.descriptionLabel.setText(QtGui.QApplication.translate("displayTagDialog", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.tagLabel.setText(QtGui.QApplication.translate("displayTagDialog", "Tag", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.startTagLabel.setText(QtGui.QApplication.translate("displayTagDialog", "Start tag", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.endTagLabel.setText(QtGui.QApplication.translate("displayTagDialog", "End tag", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.addPushButton.setText(QtGui.QApplication.translate("displayTagDialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.newPushButton.setText(QtGui.QApplication.translate("displayTagDialog", "New", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.deletePushButton.setText(QtGui.QApplication.translate("displayTagDialog", "Delete", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.tagTableWidget.horizontalHeaderItem(0).setText(QtGui.QApplication.translate("displayTagDialog", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.tagTableWidget.horizontalHeaderItem(1).setText(QtGui.QApplication.translate("displayTagDialog", "Key", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.tagTableWidget.horizontalHeaderItem(2).setText(QtGui.QApplication.translate("displayTagDialog", "Start Tag", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.tagTableWidget.horizontalHeaderItem(3).setText(QtGui.QApplication.translate("displayTagDialog", "End Tag", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.defaultPushButton.setText(QtGui.QApplication.translate("displayTagDialog", "Default", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
|
||||
def retranslateUi(self, settingsDialog):
|
||||
settingsDialog.setWindowTitle(translate('OpenLP.SettingsForm',
|
||||
'Configure OpenLP'))
|
||||
|
@ -41,18 +41,26 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||
"""
|
||||
The :class:`DisplayTagTab` manages the settings tab .
|
||||
"""
|
||||
def __init__(self):
|
||||
def __init__(self, parent):
|
||||
"""
|
||||
Initialise the settings tab
|
||||
Constructor
|
||||
"""
|
||||
#SettingsTab.__init__(self, u'Display Tags')
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
QtCore.QObject.connect(self.tagTableWidget,
|
||||
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
|
||||
QtCore.QObject.connect(self.defaultPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onDefaultPushed)
|
||||
QtCore.QObject.connect(self.newPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onNewPushed)
|
||||
QtCore.QObject.connect(self.updatePushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onUpdatePushed)
|
||||
QtCore.QObject.connect(self.deletePushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onDeletePushed)
|
||||
|
||||
def resizeEvent(self, event=None):
|
||||
pass
|
||||
|
||||
def preLoad(self):
|
||||
def exec_(self):
|
||||
"""
|
||||
Initialise values before the Load takes place
|
||||
Load Display and set field state.
|
||||
"""
|
||||
# Create initial copy from master
|
||||
DisplayTags.reset_html_tags()
|
||||
@ -66,137 +74,10 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||
for t in user_tags:
|
||||
DisplayTags.add_html_tag(t)
|
||||
self.selected = -1
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
Configure the UI elements for the tab.
|
||||
"""
|
||||
self.setObjectName(u'DisplayTagTab')
|
||||
self.tabTitleVisible = \
|
||||
translate(u'OpenLP.DisplayTagTab', 'Display Tags')
|
||||
self.displayTagEdit = QtGui.QWidget(self)
|
||||
self.editGroupBox = QtGui.QGroupBox(self.displayTagEdit)
|
||||
self.editGroupBox.setGeometry(QtCore.QRect(10, 220, 650, 181))
|
||||
self.editGroupBox.setObjectName(u'editGroupBox')
|
||||
self.updatePushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
self.updatePushButton.setGeometry(QtCore.QRect(550, 140, 71, 26))
|
||||
self.updatePushButton.setObjectName(u'updatePushButton')
|
||||
self.layoutWidget = QtGui.QWidget(self.editGroupBox)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(5, 20, 571, 114))
|
||||
self.layoutWidget.setObjectName(u'layoutWidget')
|
||||
self.formLayout = QtGui.QFormLayout(self.layoutWidget)
|
||||
self.formLayout.setObjectName(u'formLayout')
|
||||
self.descriptionLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.descriptionLabel.setObjectName(u'descriptionLabel')
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.descriptionLabel)
|
||||
self.descriptionLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.descriptionLineEdit.setObjectName(u'descriptionLineEdit')
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.descriptionLineEdit)
|
||||
self.tagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tagLabel.setObjectName(u'tagLabel')
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.tagLabel)
|
||||
self.tagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||
self.tagLineEdit.setMaxLength(5)
|
||||
self.tagLineEdit.setObjectName(u'tagLineEdit')
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.tagLineEdit)
|
||||
self.startTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.startTagLabel.setObjectName(u'startTagLabel')
|
||||
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.startTagLabel)
|
||||
self.startTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.startTagLineEdit.setObjectName(u'startTagLineEdit')
|
||||
self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.startTagLineEdit)
|
||||
self.endTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.endTagLabel.setObjectName(u'endTagLabel')
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.endTagLabel)
|
||||
self.endTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.endTagLineEdit.setObjectName(u'endTagLineEdit')
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.endTagLineEdit)
|
||||
self.defaultPushButton = QtGui.QPushButton(self.displayTagEdit)
|
||||
self.defaultPushButton.setGeometry(QtCore.QRect(430, 188, 71, 26))
|
||||
self.defaultPushButton.setObjectName(u'updatePushButton')
|
||||
self.deletePushButton = QtGui.QPushButton(self.displayTagEdit)
|
||||
self.deletePushButton.setGeometry(QtCore.QRect(510, 188, 71, 26))
|
||||
self.deletePushButton.setObjectName(u'deletePushButton')
|
||||
self.newPushButton = QtGui.QPushButton(self.displayTagEdit)
|
||||
self.newPushButton.setGeometry(QtCore.QRect(600, 188, 71, 26))
|
||||
self.newPushButton.setObjectName(u'newPushButton')
|
||||
self.tagTableWidget = QtGui.QTableWidget(self.displayTagEdit)
|
||||
self.tagTableWidget.setGeometry(QtCore.QRect(10, 10, 650, 171))
|
||||
self.tagTableWidget.setHorizontalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.tagTableWidget.setEditTriggers(
|
||||
QtGui.QAbstractItemView.NoEditTriggers)
|
||||
self.tagTableWidget.setAlternatingRowColors(True)
|
||||
self.tagTableWidget.setSelectionMode(
|
||||
QtGui.QAbstractItemView.SingleSelection)
|
||||
self.tagTableWidget.setSelectionBehavior(
|
||||
QtGui.QAbstractItemView.SelectRows)
|
||||
self.tagTableWidget.setCornerButtonEnabled(False)
|
||||
self.tagTableWidget.setObjectName(u'tagTableWidget')
|
||||
self.tagTableWidget.setColumnCount(4)
|
||||
self.tagTableWidget.setRowCount(0)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(1, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(2, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(3, item)
|
||||
self.editGroupBox.setTitle(
|
||||
translate('OpenLP.DisplayTagTab', 'Edit Selection'))
|
||||
self.updatePushButton.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Update'))
|
||||
self.descriptionLabel.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Description'))
|
||||
self.tagLabel.setText(translate('OpenLP.DisplayTagTab', 'Tag'))
|
||||
self.startTagLabel.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Start tag'))
|
||||
self.endTagLabel.setText(translate('OpenLP.DisplayTagTab', 'End tag'))
|
||||
self.deletePushButton.setText(UiStrings.Delete)
|
||||
self.defaultPushButton.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Default'))
|
||||
self.newPushButton.setText(UiStrings.New)
|
||||
self.tagTableWidget.horizontalHeaderItem(0)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Description'))
|
||||
self.tagTableWidget.horizontalHeaderItem(1)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Tag id'))
|
||||
self.tagTableWidget.horizontalHeaderItem(2)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Start Html'))
|
||||
self.tagTableWidget.horizontalHeaderItem(3)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'End Html'))
|
||||
QtCore.QMetaObject.connectSlotsByName(self.displayTagEdit)
|
||||
self.tagTableWidget.setColumnWidth(0, 120)
|
||||
self.tagTableWidget.setColumnWidth(1, 40)
|
||||
self.tagTableWidget.setColumnWidth(2, 240)
|
||||
self.tagTableWidget.setColumnWidth(3, 200)
|
||||
QtCore.QObject.connect(self.tagTableWidget,
|
||||
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
|
||||
QtCore.QObject.connect(self.defaultPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onDefaultPushed)
|
||||
QtCore.QObject.connect(self.newPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onNewPushed)
|
||||
QtCore.QObject.connect(self.updatePushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onUpdatePushed)
|
||||
QtCore.QObject.connect(self.deletePushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onDeletePushed)
|
||||
self.load()
|
||||
return QtGui.QDialog.exec_(self)
|
||||
|
||||
def load(self):
|
||||
"""
|
||||
Load Display and set field state.
|
||||
"""
|
||||
self.newPushButton.setEnabled(True)
|
||||
self.updatePushButton.setEnabled(False)
|
||||
self.deletePushButton.setEnabled(False)
|
||||
|
@ -481,7 +481,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.settingsmanager = SettingsManager(screens)
|
||||
self.aboutForm = AboutForm(self, applicationVersion)
|
||||
self.settingsForm = SettingsForm(self.screens, self, self)
|
||||
self.displayTagForm = DisplayTagForm()
|
||||
self.displayTagForm = DisplayTagForm(self)
|
||||
self.shortcutForm = ShortcutListForm(self)
|
||||
self.recentFiles = QtCore.QStringList()
|
||||
# Set up the path with plugins
|
||||
|
@ -112,6 +112,32 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="addPushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>600</x>
|
||||
<y>40</y>
|
||||
<width>71</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="newPushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>600</x>
|
||||
<y>70</y>
|
||||
<width>71</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
@ -123,13 +149,13 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="deletePushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<x>630</x>
|
||||
<y>280</y>
|
||||
<width>71</width>
|
||||
<height>26</height>
|
||||
@ -139,19 +165,6 @@
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="addPushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>610</x>
|
||||
<y>280</y>
|
||||
<width>71</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTableWidget" name="tagTableWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@ -203,6 +216,19 @@
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="defaultPushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>550</x>
|
||||
<y>280</y>
|
||||
<width>71</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
Loading…
Reference in New Issue
Block a user