forked from openlp/openlp
r1323
This commit is contained in:
commit
557d5a9d27
@ -63,10 +63,10 @@ from splashscreen import SplashScreen
|
|||||||
from generaltab import GeneralTab
|
from generaltab import GeneralTab
|
||||||
from themestab import ThemesTab
|
from themestab import ThemesTab
|
||||||
from advancedtab import AdvancedTab
|
from advancedtab import AdvancedTab
|
||||||
from displaytagtab import DisplayTagTab
|
|
||||||
from aboutform import AboutForm
|
from aboutform import AboutForm
|
||||||
from pluginform import PluginForm
|
from pluginform import PluginForm
|
||||||
from settingsform import SettingsForm
|
from settingsform import SettingsForm
|
||||||
|
from displaytagform import DisplayTagForm
|
||||||
from shortcutlistform import ShortcutListForm
|
from shortcutlistform import ShortcutListForm
|
||||||
from mediadockmanager import MediaDockManager
|
from mediadockmanager import MediaDockManager
|
||||||
from servicemanager import ServiceManager
|
from servicemanager import ServiceManager
|
||||||
|
153
openlp/core/ui/displaytagdialog.py
Normal file
153
openlp/core/ui/displaytagdialog.py
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||||
|
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
|
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||||
|
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||||
|
# Carsten Tinggaard, Frode Woldsund #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
from openlp.core.lib import translate, build_icon
|
||||||
|
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box
|
||||||
|
|
||||||
|
class Ui_DisplayTagDialog(object):
|
||||||
|
|
||||||
|
def setupUi(self, displayTagDialog):
|
||||||
|
displayTagDialog.setObjectName(u'displayTagDialog')
|
||||||
|
displayTagDialog.resize(725, 548)
|
||||||
|
self.widget = QtGui.QWidget(displayTagDialog)
|
||||||
|
self.widget.setGeometry(QtCore.QRect(10, 10, 701, 521))
|
||||||
|
self.widget.setObjectName(u'widget')
|
||||||
|
self.listdataGridLayout = QtGui.QGridLayout(self.widget)
|
||||||
|
self.listdataGridLayout.setMargin(0)
|
||||||
|
self.listdataGridLayout.setObjectName(u'listdataGridLayout')
|
||||||
|
self.tagTableWidget = QtGui.QTableWidget(self.widget)
|
||||||
|
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.listdataGridLayout.addWidget(self.tagTableWidget, 0, 0, 1, 1)
|
||||||
|
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||||
|
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
||||||
|
spacerItem = QtGui.QSpacerItem(40, 20,
|
||||||
|
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
|
self.horizontalLayout.addItem(spacerItem)
|
||||||
|
self.defaultPushButton = QtGui.QPushButton(self.widget)
|
||||||
|
self.defaultPushButton.setObjectName(u'defaultPushButton')
|
||||||
|
self.horizontalLayout.addWidget(self.defaultPushButton)
|
||||||
|
self.deletePushButton = QtGui.QPushButton(self.widget)
|
||||||
|
self.deletePushButton.setObjectName(u'deletePushButton')
|
||||||
|
self.horizontalLayout.addWidget(self.deletePushButton)
|
||||||
|
self.listdataGridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
|
||||||
|
self.editGroupBox = QtGui.QGroupBox(self.widget)
|
||||||
|
self.editGroupBox.setObjectName(u'editGroupBox')
|
||||||
|
self.dataGridLayout = QtGui.QGridLayout(self.editGroupBox)
|
||||||
|
self.dataGridLayout.setObjectName(u'dataGridLayout')
|
||||||
|
self.descriptionLabel = QtGui.QLabel(self.editGroupBox)
|
||||||
|
self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.descriptionLabel.setObjectName(u'descriptionLabel')
|
||||||
|
self.dataGridLayout.addWidget(self.descriptionLabel, 0, 0, 1, 1)
|
||||||
|
self.descriptionLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||||
|
self.descriptionLineEdit.setObjectName(u'descriptionLineEdit')
|
||||||
|
self.dataGridLayout.addWidget(self.descriptionLineEdit, 0, 1, 2, 1)
|
||||||
|
self.newPushButton = QtGui.QPushButton(self.editGroupBox)
|
||||||
|
self.newPushButton.setObjectName(u'newPushButton')
|
||||||
|
self.dataGridLayout.addWidget(self.newPushButton, 0, 2, 2, 1)
|
||||||
|
self.tagLabel = QtGui.QLabel(self.editGroupBox)
|
||||||
|
self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.tagLabel.setObjectName(u'tagLabel')
|
||||||
|
self.dataGridLayout.addWidget(self.tagLabel, 2, 0, 1, 1)
|
||||||
|
self.tagLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||||
|
self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||||
|
self.tagLineEdit.setMaxLength(5)
|
||||||
|
self.tagLineEdit.setObjectName(u'tagLineEdit')
|
||||||
|
self.dataGridLayout.addWidget(self.tagLineEdit, 2, 1, 1, 1)
|
||||||
|
self.startTagLabel = QtGui.QLabel(self.editGroupBox)
|
||||||
|
self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.startTagLabel.setObjectName(u'startTagLabel')
|
||||||
|
self.dataGridLayout.addWidget(self.startTagLabel, 3, 0, 1, 1)
|
||||||
|
self.startTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||||
|
self.startTagLineEdit.setObjectName(u'startTagLineEdit')
|
||||||
|
self.dataGridLayout.addWidget(self.startTagLineEdit, 3, 1, 1, 1)
|
||||||
|
self.endTagLabel = QtGui.QLabel(self.editGroupBox)
|
||||||
|
self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.endTagLabel.setObjectName(u'endTagLabel')
|
||||||
|
self.dataGridLayout.addWidget(self.endTagLabel, 4, 0, 1, 1)
|
||||||
|
self.endTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||||
|
self.endTagLineEdit.setObjectName(u'endTagLineEdit')
|
||||||
|
self.dataGridLayout.addWidget(self.endTagLineEdit, 4, 1, 1, 1)
|
||||||
|
self.updatePushButton = QtGui.QPushButton(self.editGroupBox)
|
||||||
|
self.updatePushButton.setObjectName(u'updatePushButton')
|
||||||
|
self.dataGridLayout.addWidget(self.updatePushButton, 4, 2, 1, 1)
|
||||||
|
self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
|
||||||
|
self.buttonBox = create_accept_reject_button_box(displayTagDialog)
|
||||||
|
self.listdataGridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
|
||||||
|
|
||||||
|
self.retranslateUi(displayTagDialog)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(displayTagDialog)
|
||||||
|
|
||||||
|
def retranslateUi(self, displayTagDialog):
|
||||||
|
displayTagDialog.setWindowTitle(translate('OpenLP.displayTagDialog',
|
||||||
|
'Configure Display Tags'))
|
||||||
|
self.editGroupBox.setTitle(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Edit Selection'))
|
||||||
|
self.updatePushButton.setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Update'))
|
||||||
|
self.descriptionLabel.setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Description'))
|
||||||
|
self.tagLabel.setText(translate('OpenLP.DisplayTagDialog', 'Tag'))
|
||||||
|
self.startTagLabel.setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Start tag'))
|
||||||
|
self.endTagLabel.setText(translate('OpenLP.DisplayTagDialog', 'End tag'))
|
||||||
|
self.deletePushButton.setText(UiStrings.Delete)
|
||||||
|
self.defaultPushButton.setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Default'))
|
||||||
|
self.newPushButton.setText(UiStrings.New)
|
||||||
|
self.tagTableWidget.horizontalHeaderItem(0).setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Description'))
|
||||||
|
self.tagTableWidget.horizontalHeaderItem(1).setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Tag id'))
|
||||||
|
self.tagTableWidget.horizontalHeaderItem(2).setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'Start Html'))
|
||||||
|
self.tagTableWidget.horizontalHeaderItem(3).setText(
|
||||||
|
translate('OpenLP.DisplayTagDialog', 'End Html'))
|
||||||
|
self.tagTableWidget.setColumnWidth(0, 120)
|
||||||
|
self.tagTableWidget.setColumnWidth(1, 40)
|
||||||
|
self.tagTableWidget.setColumnWidth(2, 240)
|
||||||
|
self.tagTableWidget.setColumnWidth(3, 240)
|
@ -33,154 +33,21 @@ import cPickle
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import SettingsTab, translate, DisplayTags
|
from openlp.core.lib import translate, DisplayTags
|
||||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
||||||
|
from openlp.core.ui.displaytagdialog import Ui_DisplayTagDialog
|
||||||
|
|
||||||
class DisplayTagTab(SettingsTab):
|
class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||||
"""
|
"""
|
||||||
The :class:`DisplayTagTab` manages the settings tab .
|
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)
|
||||||
def resizeEvent(self, event=None):
|
self.preLoad()
|
||||||
pass
|
|
||||||
|
|
||||||
def preLoad(self):
|
|
||||||
"""
|
|
||||||
Initialise values before the Load takes place
|
|
||||||
"""
|
|
||||||
# Create initial copy from master
|
|
||||||
DisplayTags.reset_html_tags()
|
|
||||||
user_expands = QtCore.QSettings().value(u'displayTags/html_tags',
|
|
||||||
QtCore.QVariant(u'')).toString()
|
|
||||||
# cPickle only accepts str not unicode strings
|
|
||||||
user_expands_string = str(unicode(user_expands).encode(u'utf8'))
|
|
||||||
if user_expands_string:
|
|
||||||
user_tags = cPickle.loads(user_expands_string)
|
|
||||||
# If we have some user ones added them as well
|
|
||||||
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.QObject.connect(self.tagTableWidget,
|
||||||
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
|
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
|
||||||
QtCore.QObject.connect(self.defaultPushButton,
|
QtCore.QObject.connect(self.defaultPushButton,
|
||||||
@ -192,35 +59,35 @@ class DisplayTagTab(SettingsTab):
|
|||||||
QtCore.QObject.connect(self.deletePushButton,
|
QtCore.QObject.connect(self.deletePushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onDeletePushed)
|
QtCore.SIGNAL(u'pressed()'), self.onDeletePushed)
|
||||||
|
|
||||||
def load(self):
|
def exec_(self):
|
||||||
"""
|
"""
|
||||||
Load Display and set field state.
|
Load Display and set field state.
|
||||||
"""
|
"""
|
||||||
self.newPushButton.setEnabled(True)
|
# Create initial copy from master
|
||||||
self.updatePushButton.setEnabled(False)
|
self.preLoad()
|
||||||
self.deletePushButton.setEnabled(False)
|
self._resetTable()
|
||||||
for linenumber, html in enumerate(DisplayTags.get_html_tags()):
|
self.selected = -1
|
||||||
self.tagTableWidget.setRowCount(
|
return QtGui.QDialog.exec_(self)
|
||||||
self.tagTableWidget.rowCount() + 1)
|
|
||||||
self.tagTableWidget.setItem(linenumber, 0,
|
|
||||||
QtGui.QTableWidgetItem(html[u'desc']))
|
|
||||||
self.tagTableWidget.setItem(linenumber, 1,
|
|
||||||
QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
|
|
||||||
self.tagTableWidget.setItem(linenumber, 2,
|
|
||||||
QtGui.QTableWidgetItem(html[u'start html']))
|
|
||||||
self.tagTableWidget.setItem(linenumber, 3,
|
|
||||||
QtGui.QTableWidgetItem(html[u'end html']))
|
|
||||||
self.tagTableWidget.resizeRowsToContents()
|
|
||||||
self.descriptionLineEdit.setText(u'')
|
|
||||||
self.tagLineEdit.setText(u'')
|
|
||||||
self.startTagLineEdit.setText(u'')
|
|
||||||
self.endTagLineEdit.setText(u'')
|
|
||||||
self.descriptionLineEdit.setEnabled(False)
|
|
||||||
self.tagLineEdit.setEnabled(False)
|
|
||||||
self.startTagLineEdit.setEnabled(False)
|
|
||||||
self.endTagLineEdit.setEnabled(False)
|
|
||||||
|
|
||||||
def save(self):
|
def preLoad(self):
|
||||||
|
"""
|
||||||
|
Load the Tags from store so can be used in the system or used to
|
||||||
|
update the display. If Cancel was selected this is needed to reset the
|
||||||
|
dsiplay to the correct version.
|
||||||
|
"""
|
||||||
|
# Initial Load of the Tags
|
||||||
|
DisplayTags.reset_html_tags()
|
||||||
|
user_expands = QtCore.QSettings().value(u'displayTags/html_tags',
|
||||||
|
QtCore.QVariant(u'')).toString()
|
||||||
|
# cPickle only accepts str not unicode strings
|
||||||
|
user_expands_string = str(unicode(user_expands).encode(u'utf8'))
|
||||||
|
if user_expands_string:
|
||||||
|
user_tags = cPickle.loads(user_expands_string)
|
||||||
|
# If we have some user ones added them as well
|
||||||
|
for t in user_tags:
|
||||||
|
DisplayTags.add_html_tag(t)
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
"""
|
"""
|
||||||
Save Custom tags in a pickle .
|
Save Custom tags in a pickle .
|
||||||
"""
|
"""
|
||||||
@ -235,13 +102,14 @@ class DisplayTagTab(SettingsTab):
|
|||||||
else:
|
else:
|
||||||
QtCore.QSettings().setValue(u'displayTags/html_tags',
|
QtCore.QSettings().setValue(u'displayTags/html_tags',
|
||||||
QtCore.QVariant(u''))
|
QtCore.QVariant(u''))
|
||||||
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
def cancel(self):
|
def reject(self):
|
||||||
"""
|
"""
|
||||||
Reset Custom tags from Settings.
|
Reset Custom tags from Settings.
|
||||||
"""
|
"""
|
||||||
self.preLoad()
|
|
||||||
self._resetTable()
|
self._resetTable()
|
||||||
|
return QtGui.QDialog.reject(self)
|
||||||
|
|
||||||
def onRowSelected(self):
|
def onRowSelected(self):
|
||||||
"""
|
"""
|
||||||
@ -288,6 +156,7 @@ class DisplayTagTab(SettingsTab):
|
|||||||
self._resetTable()
|
self._resetTable()
|
||||||
# Highlight new row
|
# Highlight new row
|
||||||
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
|
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
|
||||||
|
self.onRowSelected()
|
||||||
|
|
||||||
def onDefaultPushed(self):
|
def onDefaultPushed(self):
|
||||||
"""
|
"""
|
||||||
@ -335,7 +204,29 @@ class DisplayTagTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
self.tagTableWidget.clearContents()
|
self.tagTableWidget.clearContents()
|
||||||
self.tagTableWidget.setRowCount(0)
|
self.tagTableWidget.setRowCount(0)
|
||||||
self.load()
|
self.newPushButton.setEnabled(True)
|
||||||
|
self.updatePushButton.setEnabled(False)
|
||||||
|
self.deletePushButton.setEnabled(False)
|
||||||
|
for linenumber, html in enumerate(DisplayTags.get_html_tags()):
|
||||||
|
self.tagTableWidget.setRowCount(
|
||||||
|
self.tagTableWidget.rowCount() + 1)
|
||||||
|
self.tagTableWidget.setItem(linenumber, 0,
|
||||||
|
QtGui.QTableWidgetItem(html[u'desc']))
|
||||||
|
self.tagTableWidget.setItem(linenumber, 1,
|
||||||
|
QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
|
||||||
|
self.tagTableWidget.setItem(linenumber, 2,
|
||||||
|
QtGui.QTableWidgetItem(html[u'start html']))
|
||||||
|
self.tagTableWidget.setItem(linenumber, 3,
|
||||||
|
QtGui.QTableWidgetItem(html[u'end html']))
|
||||||
|
self.tagTableWidget.resizeRowsToContents()
|
||||||
|
self.descriptionLineEdit.setText(u'')
|
||||||
|
self.tagLineEdit.setText(u'')
|
||||||
|
self.startTagLineEdit.setText(u'')
|
||||||
|
self.endTagLineEdit.setText(u'')
|
||||||
|
self.descriptionLineEdit.setEnabled(False)
|
||||||
|
self.tagLineEdit.setEnabled(False)
|
||||||
|
self.startTagLineEdit.setEnabled(False)
|
||||||
|
self.endTagLineEdit.setEnabled(False)
|
||||||
|
|
||||||
def _strip(self, tag):
|
def _strip(self, tag):
|
||||||
"""
|
"""
|
@ -34,7 +34,7 @@ from openlp.core.lib.ui import UiStrings, base_action, checkable_action, \
|
|||||||
icon_action
|
icon_action
|
||||||
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \
|
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \
|
||||||
ThemeManager, SlideController, PluginForm, MediaDockManager, \
|
ThemeManager, SlideController, PluginForm, MediaDockManager, \
|
||||||
ShortcutListForm
|
ShortcutListForm, DisplayTagForm
|
||||||
from openlp.core.utils import AppLocation, add_actions, LanguageManager, \
|
from openlp.core.utils import AppLocation, add_actions, LanguageManager, \
|
||||||
ActionList
|
ActionList
|
||||||
|
|
||||||
@ -242,6 +242,8 @@ class Ui_MainWindow(object):
|
|||||||
self.SettingsShortcutsItem = icon_action(mainWindow,
|
self.SettingsShortcutsItem = icon_action(mainWindow,
|
||||||
u'SettingsShortcutsItem',
|
u'SettingsShortcutsItem',
|
||||||
u':/system/system_configure_shortcuts.png')
|
u':/system/system_configure_shortcuts.png')
|
||||||
|
self.DisplayTagItem = icon_action(mainWindow,
|
||||||
|
u'DisplayTagItem', u':/system/tag_editor.png')
|
||||||
self.SettingsConfigureItem = icon_action(mainWindow,
|
self.SettingsConfigureItem = icon_action(mainWindow,
|
||||||
u'SettingsConfigureItem', u':/system/system_settings.png')
|
u'SettingsConfigureItem', u':/system/system_settings.png')
|
||||||
mainWindow.actionList.add_action(self.SettingsShortcutsItem,
|
mainWindow.actionList.add_action(self.SettingsShortcutsItem,
|
||||||
@ -277,7 +279,8 @@ class Ui_MainWindow(object):
|
|||||||
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions())
|
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions())
|
||||||
add_actions(self.SettingsMenu, (self.settingsPluginListItem,
|
add_actions(self.SettingsMenu, (self.settingsPluginListItem,
|
||||||
self.SettingsLanguageMenu.menuAction(), None,
|
self.SettingsLanguageMenu.menuAction(), None,
|
||||||
self.SettingsShortcutsItem, self.SettingsConfigureItem))
|
self.SettingsShortcutsItem, self.DisplayTagItem,
|
||||||
|
self.SettingsConfigureItem))
|
||||||
add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None))
|
add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None))
|
||||||
add_actions(self.ToolsMenu, (self.ToolsOpenDataFolder, None))
|
add_actions(self.ToolsMenu, (self.ToolsOpenDataFolder, None))
|
||||||
add_actions(self.HelpMenu, (self.HelpDocumentationItem,
|
add_actions(self.HelpMenu, (self.HelpDocumentationItem,
|
||||||
@ -361,6 +364,8 @@ class Ui_MainWindow(object):
|
|||||||
translate('OpenLP.MainWindow', '&Language'))
|
translate('OpenLP.MainWindow', '&Language'))
|
||||||
self.SettingsShortcutsItem.setText(
|
self.SettingsShortcutsItem.setText(
|
||||||
translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
|
translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
|
||||||
|
self.DisplayTagItem.setText(
|
||||||
|
translate('OpenLP.MainWindow', '&Configure Display Tags'))
|
||||||
self.SettingsConfigureItem.setText(
|
self.SettingsConfigureItem.setText(
|
||||||
translate('OpenLP.MainWindow', '&Configure OpenLP...'))
|
translate('OpenLP.MainWindow', '&Configure OpenLP...'))
|
||||||
self.ViewMediaManagerItem.setText(
|
self.ViewMediaManagerItem.setText(
|
||||||
@ -476,6 +481,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.settingsmanager = SettingsManager(screens)
|
self.settingsmanager = SettingsManager(screens)
|
||||||
self.aboutForm = AboutForm(self, applicationVersion)
|
self.aboutForm = AboutForm(self, applicationVersion)
|
||||||
self.settingsForm = SettingsForm(self.screens, self, self)
|
self.settingsForm = SettingsForm(self.screens, self, self)
|
||||||
|
self.displayTagForm = DisplayTagForm(self)
|
||||||
self.shortcutForm = ShortcutListForm(self)
|
self.shortcutForm = ShortcutListForm(self)
|
||||||
self.recentFiles = QtCore.QStringList()
|
self.recentFiles = QtCore.QStringList()
|
||||||
# Set up the path with plugins
|
# Set up the path with plugins
|
||||||
@ -523,6 +529,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.SIGNAL(u'triggered()'), self.onToolsOpenDataFolderClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onToolsOpenDataFolderClicked)
|
||||||
QtCore.QObject.connect(self.settingsPluginListItem,
|
QtCore.QObject.connect(self.settingsPluginListItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
||||||
|
QtCore.QObject.connect(self.DisplayTagItem,
|
||||||
|
QtCore.SIGNAL(u'triggered()'), self.onDisplayTagItemClicked)
|
||||||
QtCore.QObject.connect(self.SettingsConfigureItem,
|
QtCore.QObject.connect(self.SettingsConfigureItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onSettingsConfigureItemClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onSettingsConfigureItemClicked)
|
||||||
QtCore.QObject.connect(self.SettingsShortcutsItem,
|
QtCore.QObject.connect(self.SettingsShortcutsItem,
|
||||||
@ -716,6 +724,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
path = AppLocation.get_data_path()
|
path = AppLocation.get_data_path()
|
||||||
QtGui.QDesktopServices.openUrl(QtCore.QUrl("file:///" + path))
|
QtGui.QDesktopServices.openUrl(QtCore.QUrl("file:///" + path))
|
||||||
|
|
||||||
|
def onDisplayTagItemClicked(self):
|
||||||
|
"""
|
||||||
|
Show the Settings dialog
|
||||||
|
"""
|
||||||
|
self.displayTagForm.exec_()
|
||||||
|
|
||||||
def onSettingsConfigureItemClicked(self):
|
def onSettingsConfigureItemClicked(self):
|
||||||
"""
|
"""
|
||||||
Show the Settings dialog
|
Show the Settings dialog
|
||||||
|
@ -31,7 +31,7 @@ import logging
|
|||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Receiver
|
from openlp.core.lib import Receiver
|
||||||
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab, DisplayTagTab
|
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab
|
||||||
from settingsdialog import Ui_SettingsDialog
|
from settingsdialog import Ui_SettingsDialog
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -47,17 +47,14 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
QtGui.QDialog.__init__(self, parent)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
# General tab
|
# General tab
|
||||||
self.generalTab = GeneralTab(screens)
|
generalTab = GeneralTab(screens)
|
||||||
self.addTab(u'General', self.generalTab)
|
self.addTab(u'General', generalTab)
|
||||||
# Themes tab
|
# Themes tab
|
||||||
self.themesTab = ThemesTab(mainWindow)
|
themesTab = ThemesTab(mainWindow)
|
||||||
self.addTab(u'Themes', self.themesTab)
|
self.addTab(u'Themes', themesTab)
|
||||||
# Advanced tab
|
# Advanced tab
|
||||||
self.advancedTab = AdvancedTab()
|
advancedTab = AdvancedTab()
|
||||||
self.addTab(u'Advanced', self.advancedTab)
|
self.addTab(u'Advanced', advancedTab)
|
||||||
# Edit Display Tags tab
|
|
||||||
self.displayTagTab = DisplayTagTab()
|
|
||||||
self.addTab(u'Display Tags', self.displayTagTab)
|
|
||||||
|
|
||||||
def addTab(self, name, tab):
|
def addTab(self, name, tab):
|
||||||
"""
|
"""
|
||||||
@ -71,9 +68,9 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
Add a tab to the form at a specific location
|
Add a tab to the form at a specific location
|
||||||
"""
|
"""
|
||||||
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
||||||
# 15 : There are 4 tables currently and locations starts at -10
|
# 14 : There are 3 tables currently and locations starts at -10
|
||||||
self.settingsTabWidget.insertTab(
|
self.settingsTabWidget.insertTab(
|
||||||
location + 15, tab, tab.tabTitleVisible)
|
location + 14, tab, tab.tabTitleVisible)
|
||||||
|
|
||||||
def removeTab(self, tab):
|
def removeTab(self, tab):
|
||||||
"""
|
"""
|
||||||
|
@ -68,11 +68,13 @@ class HttpServer(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'Start TCP server')
|
log.debug(u'Start TCP server')
|
||||||
port = QtCore.QSettings().value(
|
port = QtCore.QSettings().value(
|
||||||
self.parent.settingsSection + u'/remote port',
|
self.parent.settingsSection + u'/port',
|
||||||
QtCore.QVariant(4316)).toInt()[0]
|
QtCore.QVariant(4316)).toInt()[0]
|
||||||
|
address = QtCore.QSettings().value(
|
||||||
|
self.parent.settingsSection + u'/ip address',
|
||||||
|
QtCore.QVariant(u'0.0.0.0')).toString()
|
||||||
self.server = QtNetwork.QTcpServer()
|
self.server = QtNetwork.QTcpServer()
|
||||||
self.server.listen(QtNetwork.QHostAddress(QtNetwork.QHostAddress.Any),
|
self.server.listen(QtNetwork.QHostAddress(address), port)
|
||||||
port)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'slidecontroller_live_changed'),
|
QtCore.SIGNAL(u'slidecontroller_live_changed'),
|
||||||
self.slide_change)
|
self.slide_change)
|
||||||
|
206
resources/forms/displaytabdialog.ui
Normal file
206
resources/forms/displaytabdialog.ui
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>displayTagEdit</class>
|
||||||
|
<widget class="QWidget" name="displayTagEdit">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>725</width>
|
||||||
|
<height>548</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>701</width>
|
||||||
|
<height>521</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTableWidget" name="tagTableWidget">
|
||||||
|
<property name="horizontalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::SingleSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
|
<property name="cornerButtonEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Description</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Key</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Start Tag</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>End Tag</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="defaultPushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="deletePushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="editGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Edit Selection</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="descriptionLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Description</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" rowspan="2">
|
||||||
|
<widget class="QLineEdit" name="descriptionLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="addPushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" rowspan="2">
|
||||||
|
<widget class="QPushButton" name="newPushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>New</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="tagLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tag</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="tagLineEdit">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maxLength">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="startTagLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Start tag</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="startTagLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="endTagLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>End tag</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLineEdit" name="endTagLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2">
|
||||||
|
<widget class="QPushButton" name="updatePushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Update</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@ -1,209 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>displayTagEdit</class>
|
|
||||||
<widget class="QWidget" name="displayTagEdit">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>717</width>
|
|
||||||
<height>554</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QGroupBox" name="editGroupBox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>320</y>
|
|
||||||
<width>691</width>
|
|
||||||
<height>181</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Edit Selection</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QPushButton" name="updatePushButton">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>600</x>
|
|
||||||
<y>140</y>
|
|
||||||
<width>73</width>
|
|
||||||
<height>26</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Update</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="layoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>20</x>
|
|
||||||
<y>50</y>
|
|
||||||
<width>571</width>
|
|
||||||
<height>114</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="descriptionLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Description</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="descriptionLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="tagLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Tag</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="tagLineEdit">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="startTagLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Start tag</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="startTagLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="endTagLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>End tag</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="endTagLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>540</x>
|
|
||||||
<y>510</y>
|
|
||||||
<width>162</width>
|
|
||||||
<height>26</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QPushButton" name="deletePushButton">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>530</x>
|
|
||||||
<y>280</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>26</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<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>
|
|
||||||
<x>10</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>691</width>
|
|
||||||
<height>271</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
|
||||||
</property>
|
|
||||||
<property name="editTriggers">
|
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
|
||||||
</property>
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::SingleSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="selectionBehavior">
|
|
||||||
<enum>QAbstractItemView::SelectRows</enum>
|
|
||||||
</property>
|
|
||||||
<property name="cornerButtonEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Description</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Key</string>
|
|
||||||
</property>
|
|
||||||
<property name="textAlignment">
|
|
||||||
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Start Tag</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>End Tag</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -116,6 +116,7 @@
|
|||||||
<file>system_exit.png</file>
|
<file>system_exit.png</file>
|
||||||
<file>settings_plugin_list.png</file>
|
<file>settings_plugin_list.png</file>
|
||||||
<file>system_settings.png</file>
|
<file>system_settings.png</file>
|
||||||
|
<file>tag_editor.png</file>
|
||||||
<file>system_configure.png</file>
|
<file>system_configure.png</file>
|
||||||
<file>system_edit_copy.png</file>
|
<file>system_edit_copy.png</file>
|
||||||
<file>system_configure_shortcuts.png</file>
|
<file>system_configure_shortcuts.png</file>
|
||||||
|
BIN
resources/images/tag_editor.png
Normal file
BIN
resources/images/tag_editor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user