openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01437
[Merge] lp:~trb143/openlp/working into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/working into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Sort of works but more eyes would be nice.
Text over video works for alerts first time then not second without alt-tab help!
Same with presentations.
Start of Refactoring display api's so calls go through a manager for simplicity.
Refactor alert dialog as requested by Raoul (and drawn by Zak).
Other cleanups
Fix(!) abend for impress on exit sometimes.
--
https://code.launchpad.net/~trb143/openlp/working/+merge/23608
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw 2010-04-10 22:24:22 +0000
+++ openlp.pyw 2010-04-17 11:33:19 +0000
@@ -138,7 +138,7 @@
log.info(u'Screen %d found with resolution %s',
screen, self.desktop().availableGeometry(screen))
# start the main app window
- self.mainWindow = MainWindow(screens, app_version)
+ self.mainWindow = MainWindow(screens, app_version, self)
self.mainWindow.show()
if show_splash:
# now kill the splashscreen
=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py 2010-04-02 18:12:54 +0000
+++ openlp/core/lib/eventreceiver.py 2010-04-17 11:33:19 +0000
@@ -115,6 +115,9 @@
``version_check``
Version has changed so pop up window.
+ ``mainDisplay_active``
+ Version has changed so pop up window.
+
"""
def __init__(self):
"""
=== modified file 'openlp/core/ui/__init__.py'
--- openlp/core/ui/__init__.py 2010-04-10 10:28:57 +0000
+++ openlp/core/ui/__init__.py 2010-04-17 11:33:19 +0000
@@ -29,6 +29,7 @@
from screen import ScreenList
from maindisplay import MainDisplay
from maindisplay import VideoDisplay
+from maindisplay import DisplayManager
from amendthemeform import AmendThemeForm
from slidecontroller import SlideController
from splashscreen import SplashScreen
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2010-04-10 10:28:57 +0000
+++ openlp/core/ui/maindisplay.py 2010-04-17 11:33:19 +0000
@@ -34,6 +34,28 @@
log = logging.getLogger(__name__)
+
+class DisplayManager(QtGui.QWidget):
+ """
+ Wrapper class to hold the display widgets.
+ I will provide API's in future to access the screens allow for
+ extra displays to be added.
+ """
+ def __init__(self, screens):
+ QtGui.QWidget.__init__(self)
+ self.screens = screens
+ self.videoDisplay = VideoDisplay(self, screens)
+ self.mainDisplay = MainDisplay(self, screens)
+
+ def setup(self):
+ self.videoDisplay.setup()
+ self.mainDisplay.setup()
+
+ def close(self):
+ self.videoDisplay.close()
+ self.mainDisplay.close()
+
+
class DisplayWidget(QtGui.QWidget):
"""
Customised version of QTableWidget which can respond to keyboard
@@ -42,7 +64,7 @@
log.info(u'MainDisplay loaded')
def __init__(self, parent=None, name=None):
- QtGui.QWidget.__init__(self, parent)
+ QtGui.QWidget.__init__(self, None)
self.parent = parent
self.hotkey_map = {QtCore.Qt.Key_Return: 'servicemanager_next_item',
QtCore.Qt.Key_Space: 'live_slidecontroller_next_noloop',
@@ -92,11 +114,10 @@
The list of screens.
"""
log.debug(u'Initilisation started')
- DisplayWidget.__init__(self, None)
+ DisplayWidget.__init__(self, parent)
self.parent = parent
self.setWindowTitle(u'OpenLP Display')
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
- self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.screens = screens
self.display_image = QtGui.QLabel(self)
self.display_image.setScaledContents(True)
@@ -116,7 +137,7 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'live_slide_show'), self.showDisplay)
QtCore.QObject.connect(Receiver.get_receiver(),
- QtCore.SIGNAL(u'media_start'), self.onMediaQueue)
+ QtCore.SIGNAL(u'media_start'), self.hideDisplay)
def setup(self):
"""
@@ -184,6 +205,13 @@
self.display_image.setPixmap(self.transparent)
self.display_alert.setPixmap(self.transparent)
self.display_text.setPixmap(self.transparent)
+ self.moveToTop()
+
+ def moveToTop(self):
+ log.debug(u'moveToTop')
+ self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint \
+ | QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog)
+ self.show()
def showDisplay(self):
log.debug(u'showDisplay')
@@ -198,6 +226,7 @@
self.screen[u'size'].width(),
self.screen[u'size'].height() )
self.display_image.setPixmap(QtGui.QPixmap.fromImage(frame))
+ self.moveToTop()
def setAlertSize(self, top, height):
log.debug(u'setAlertSize')
@@ -211,6 +240,7 @@
self.display_alert.setPixmap(self.transparent)
else:
self.display_alert.setPixmap(frame)
+ self.moveToTop()
def frameView(self, frame, transition=False):
"""
@@ -266,11 +296,6 @@
elif self.display_frame:
self.frameView(self.display_frame)
- def onMediaQueue(self, message):
- log.debug(u'Queue new media message %s' % message)
- self.hideDisplay()
- self.activateWindow()
-
class VideoWidget(QtGui.QWidget):
"""
Customised version of QTableWidget which can respond to keyboard
@@ -281,31 +306,11 @@
def __init__(self, parent=None, name=None):
QtGui.QWidget.__init__(self, None)
self.parent = parent
- self.hotkey_map = {QtCore.Qt.Key_Return: 'servicemanager_next_item',
- QtCore.Qt.Key_Space: 'live_slidecontroller_next_noloop',
- QtCore.Qt.Key_Enter: 'live_slidecontroller_next_noloop',
- QtCore.Qt.Key_0: 'servicemanager_next_item',
- QtCore.Qt.Key_Backspace: 'live_slidecontroller_previous_noloop'}
def keyPressEvent(self, event):
if type(event) == QtGui.QKeyEvent:
#here accept the event and do something
- if event.key() == QtCore.Qt.Key_Up:
- Receiver.send_message(u'live_slidecontroller_previous')
- event.accept()
- elif event.key() == QtCore.Qt.Key_Down:
- Receiver.send_message(u'live_slidecontroller_next')
- event.accept()
- elif event.key() == QtCore.Qt.Key_PageUp:
- Receiver.send_message(u'live_slidecontroller_first')
- event.accept()
- elif event.key() == QtCore.Qt.Key_PageDown:
- Receiver.send_message(u'live_slidecontroller_last')
- event.accept()
- elif event.key() in self.hotkey_map:
- Receiver.send_message(self.hotkey_map[event.key()])
- event.accept()
- elif event.key() == QtCore.Qt.Key_Escape:
+ if event.key() == QtCore.Qt.Key_Escape:
self.resetDisplay()
event.accept()
event.ignore()
@@ -334,14 +339,12 @@
self.parent = parent
self.screens = screens
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
- self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.mediaObject = Phonon.MediaObject(self)
- self.video = Phonon.VideoWidget()
+ self.video = Phonon.VideoWidget(parent)
self.video.setVisible(False)
self.audio = Phonon.AudioOutput(Phonon.VideoCategory, self.mediaObject)
Phonon.createPath(self.mediaObject, self.video)
Phonon.createPath(self.mediaObject, self.audio)
- self.firstTime = True
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'media_start'), self.onMediaQueue)
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -368,30 +371,27 @@
def onMediaQueue(self, message):
log.debug(u'VideoDisplay Queue new media message %s' % message)
file = os.path.join(message[1], message[2])
- if self.firstTime:
- source = self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
- self.firstTime = False
- else:
- self.mediaObject.enqueue(Phonon.MediaSource(file))
+ source = self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
self.onMediaPlay()
def onMediaPlay(self):
log.debug(u'VideoDisplay Play the new media, Live ')
- self.firstTime = True
self.setWindowState(QtCore.Qt.WindowMinimized)
self.video.setFullScreen(True)
self.mediaObject.play()
self.setVisible(True)
- self.lower()
+ self.show()
def onMediaPause(self):
log.debug(u'VideoDisplay Media paused by user')
self.mediaObject.pause()
+ self.show()
def onMediaStop(self):
log.debug(u'VideoDisplay Media stopped by user')
self.mediaObject.stop()
self.onMediaFinish()
+ self.show()
def onMediaFinish(self):
log.debug(u'VideoDisplay Reached end of media playlist')
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-04-10 18:08:03 +0000
+++ openlp/core/ui/mainwindow.py 2010-04-17 11:33:19 +0000
@@ -29,8 +29,8 @@
from PyQt4 import QtCore, QtGui
from openlp.core.ui import AboutForm, SettingsForm, \
- ServiceManager, ThemeManager, MainDisplay, SlideController, \
- PluginForm, MediaDockManager, VideoDisplay
+ ServiceManager, ThemeManager, SlideController, \
+ PluginForm, MediaDockManager, DisplayManager
from openlp.core.lib import RenderManager, PluginConfig, build_icon, \
OpenLPDockWidget, SettingsManager, PluginManager, Receiver, str_to_bool
from openlp.core.utils import check_latest_version, AppLocation
@@ -74,7 +74,6 @@
if version != self.app_version[u'full']:
Receiver.send_message(u'version_check', u'%s' % version)
-
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
"""
@@ -432,7 +431,7 @@
"""
log.info(u'MainWindow loaded')
- def __init__(self, screens, applicationVersion):
+ def __init__(self, screens, applicationVersion, application):
"""
This constructor sets up the interface, the various managers, and the
plugins.
@@ -443,8 +442,7 @@
self.serviceNotSaved = False
self.settingsmanager = SettingsManager(screens)
self.generalConfig = PluginConfig(u'General')
- self.videoDisplay = VideoDisplay(self, screens)
- self.mainDisplay = MainDisplay(self, screens)
+ self.displayManager = DisplayManager(screens)
self.aboutForm = AboutForm(self, applicationVersion)
self.settingsForm = SettingsForm(self.screens, self, self)
# Set up the path with plugins
@@ -499,6 +497,8 @@
QtCore.SIGNAL(u'blank_check'), self.blankCheck)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'screen_changed'), self.screenChanged)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'status_message'), self.showStatusMessage)
QtCore.QObject.connect(self.FileNewItem,
QtCore.SIGNAL(u'triggered()'),
self.ServiceManagerContents.onNewService)
@@ -526,7 +526,7 @@
self.plugin_helpers[u'service'] = self.ServiceManagerContents
self.plugin_helpers[u'settings'] = self.settingsForm
self.plugin_helpers[u'toolbox'] = self.mediaDockManager
- self.plugin_helpers[u'maindisplay'] = self.mainDisplay
+ self.plugin_helpers[u'maindisplay'] = self.displayManager.mainDisplay
self.plugin_manager.find_plugins(pluginpath, self.plugin_helpers)
# hook methods have to happen after find_plugins. Find plugins needs
# the controllers hence the hooks have moved from setupUI() to here
@@ -555,6 +555,7 @@
def versionCheck(self, version):
"""
Checks the version of the Application called from openlp.pyw
+ Triggered by delay thread.
"""
app_version = self.applicationVersion[u'full']
version_text = unicode(self.trUtf8('Version %s of OpenLP is now '
@@ -572,17 +573,18 @@
"""
self.showMaximized()
#screen_number = self.getMonitorNumber()
- self.mainDisplay.setup()
- self.videoDisplay.setup()
- if self.mainDisplay.isVisible():
- self.mainDisplay.setFocus()
+ self.displayManager.setup()
+ if self.displayManager.mainDisplay.isVisible():
+ self.displayManager.mainDisplay.setFocus()
self.activateWindow()
if str_to_bool(self.generalConfig.get_config(u'auto open', False)):
self.ServiceManagerContents.onLoadService(True)
- self.videoDisplay.lower()
- self.mainDisplay.raise_()
def blankCheck(self):
+ """
+ Check and display message if screen blank on setup.
+ Triggered by delay thread.
+ """
if str_to_bool(self.generalConfig.get_config(u'screen blank', False)) \
and str_to_bool(self.generalConfig.get_config(u'blank warning', False)):
self.LiveController.onBlankDisplay(True)
@@ -593,6 +595,9 @@
QtGui.QMessageBox.Ok)
def versionThread(self):
+ """
+ Start an initial setup thread to delay notifications
+ """
vT = VersionThread(self, self.applicationVersion, self.generalConfig)
vT.start()
@@ -617,8 +622,13 @@
self.settingsForm.exec_()
def screenChanged(self):
+ """
+ The screen has changed to so tell the displays to update_display
+ their locations
+ """
self.RenderManager.update_display()
- self.mainDisplay.setup()
+ self.displayManager.setup()
+ self.setFocus()
self.activateWindow()
def closeEvent(self, event):
@@ -636,20 +646,14 @@
QtGui.QMessageBox.Save)
if ret == QtGui.QMessageBox.Save:
self.ServiceManagerContents.onSaveService()
- self.mainDisplay.close()
- self.videoDisplay.close()
self.cleanUp()
event.accept()
elif ret == QtGui.QMessageBox.Discard:
- self.mainDisplay.close()
- self.videoDisplay.close()
self.cleanUp()
event.accept()
else:
event.ignore()
else:
- self.mainDisplay.close()
- self.videoDisplay.close()
self.cleanUp()
event.accept()
@@ -662,10 +666,12 @@
# Call the cleanup method to shutdown plugins.
log.info(u'cleanup plugins')
self.plugin_manager.finalise_plugins()
+ #Close down the displays
+ self.displayManager.close()
def serviceChanged(self, reset=False, serviceName=None):
"""
- Hook to change the main window title when the service changes
+ Hook to change the main window title when the service chmainwindow.pyanges
``reset``
Shows if the service has been cleared or saved
@@ -685,6 +691,9 @@
title = u'%s - %s*' % (self.mainTitle, service_name)
self.setWindowTitle(title)
+ def showStatusMessage(self, message):
+ self.StatusBar.showMessage(message)
+
def defaultThemeChanged(self, theme):
self.DefaultThemeLabel.setText(
u'%s %s' % (self.defaultThemeText, theme))
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2010-04-10 10:28:57 +0000
+++ openlp/core/ui/slidecontroller.py 2010-04-17 11:33:19 +0000
@@ -635,7 +635,7 @@
self.SlidePreview.setPixmap(QtGui.QPixmap.fromImage(frame[u'main']))
log.log(15, u'Slide Rendering took %4s' % (time.time() - before))
if self.isLive:
- self.parent.mainDisplay.frameView(frame, True)
+ self.parent.displayManager.mainDisplay.frameView(frame, True)
self.selectedRow = row
def onSlideChange(self, row):
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2010-03-22 18:33:54 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2010-04-17 11:33:19 +0000
@@ -27,7 +27,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Plugin, build_icon, PluginStatus
+from openlp.core.lib import Plugin, build_icon, PluginStatus, Receiver
from openlp.plugins.alerts.lib import AlertsManager, DBManager
from openlp.plugins.alerts.forms import AlertsTab, AlertForm
@@ -88,6 +88,7 @@
def onAlertsTrigger(self):
self.alertForm.loadList()
self.alertForm.exec_()
+ Receiver.send_message(u'text_onTop')
def about(self):
about_text = self.trUtf8('<b>Alerts Plugin</b><br>This plugin '
=== modified file 'openlp/plugins/alerts/forms/alertdialog.py'
--- openlp/plugins/alerts/forms/alertdialog.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/alerts/forms/alertdialog.py 2010-04-17 11:33:19 +0000
@@ -1,87 +1,134 @@
# -*- coding: utf-8 -*-
-# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
-###############################################################################
-# OpenLP - Open Source Lyrics Projection #
-# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2010 Raoul Snyman #
-# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
-# Thompson, Jon Tibble, Carsten Tinggaard #
-# --------------------------------------------------------------------------- #
-# 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 #
-###############################################################################
+# Form implementation generated from reading ui file 'alertdialog.ui'
+#
+# Created: Sat Apr 17 08:07:40 2010
+# by: PyQt4 UI code generator 4.7
+#
+# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_AlertDialog(object):
- def setupUi(self, AlertForm):
- AlertForm.setObjectName(u'AlertDialog')
- AlertForm.resize(430, 320)
+ def setupUi(self, AlertDialog):
+ AlertDialog.setObjectName("AlertDialog")
+ AlertDialog.resize(567, 440)
icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- AlertForm.setWindowIcon(icon)
- self.AlertFormLayout = QtGui.QVBoxLayout(AlertForm)
+ icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ AlertDialog.setWindowIcon(icon)
+ self.AlertFormLayout = QtGui.QVBoxLayout(AlertDialog)
self.AlertFormLayout.setSpacing(8)
self.AlertFormLayout.setMargin(8)
- self.AlertFormLayout.setObjectName(u'AlertFormLayout')
- self.AlertEntryWidget = QtGui.QWidget(AlertForm)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.AlertEntryWidget.sizePolicy().hasHeightForWidth())
- self.AlertEntryWidget.setSizePolicy(sizePolicy)
- self.AlertEntryWidget.setObjectName(u'AlertEntryWidget')
- self.verticalLayout_2 = QtGui.QVBoxLayout(self.AlertEntryWidget)
- self.verticalLayout_2.setObjectName(u'verticalLayout_2')
- self.verticalLayout = QtGui.QVBoxLayout()
- self.verticalLayout.setObjectName(u'verticalLayout')
- self.AlertEntryLabel = QtGui.QLabel(self.AlertEntryWidget)
+ self.AlertFormLayout.setObjectName("AlertFormLayout")
+ self.AlertTextLayout = QtGui.QFormLayout()
+ self.AlertTextLayout.setContentsMargins(0, 0, -1, -1)
+ self.AlertTextLayout.setSpacing(8)
+ self.AlertTextLayout.setObjectName("AlertTextLayout")
+ self.AlertEntryLabel = QtGui.QLabel(AlertDialog)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AlertEntryLabel.sizePolicy().hasHeightForWidth())
self.AlertEntryLabel.setSizePolicy(sizePolicy)
- self.AlertEntryLabel.setObjectName(u'AlertEntryLabel')
- self.verticalLayout.addWidget(self.AlertEntryLabel)
- self.AlertEntryEditItem = QtGui.QLineEdit(self.AlertEntryWidget)
- self.AlertEntryEditItem.setObjectName(u'AlertEntryEditItem')
- self.verticalLayout.addWidget(self.AlertEntryEditItem)
- self.AlertListWidget = QtGui.QListWidget(self.AlertEntryWidget)
+ self.AlertEntryLabel.setObjectName("AlertEntryLabel")
+ self.AlertTextLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.AlertEntryLabel)
+ self.AlertParameter = QtGui.QLabel(AlertDialog)
+ self.AlertParameter.setObjectName("AlertParameter")
+ self.AlertTextLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.AlertParameter)
+ self.ParameterEdit = QtGui.QLineEdit(AlertDialog)
+ self.ParameterEdit.setObjectName("ParameterEdit")
+ self.AlertTextLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.ParameterEdit)
+ self.AlertTextEdit = QtGui.QLineEdit(AlertDialog)
+ self.AlertTextEdit.setObjectName("AlertTextEdit")
+ self.AlertTextLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.AlertTextEdit)
+ self.AlertFormLayout.addLayout(self.AlertTextLayout)
+ self.ManagementLayout = QtGui.QHBoxLayout()
+ self.ManagementLayout.setSpacing(8)
+ self.ManagementLayout.setContentsMargins(-1, -1, -1, 0)
+ self.ManagementLayout.setObjectName("ManagementLayout")
+ self.AlertListWidget = QtGui.QListWidget(AlertDialog)
self.AlertListWidget.setAlternatingRowColors(True)
- self.AlertListWidget.setObjectName(u'AlertListWidget')
- self.verticalLayout.addWidget(self.AlertListWidget)
- self.verticalLayout_2.addLayout(self.verticalLayout)
- self.horizontalLayout = QtGui.QHBoxLayout()
- self.horizontalLayout.setObjectName(u'horizontalLayout')
- spacerItem = QtGui.QSpacerItem(181, 38, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.horizontalLayout.addItem(spacerItem)
- self.DisplayButton = QtGui.QPushButton(self.AlertEntryWidget)
- self.DisplayButton.setObjectName(u'DisplayButton')
- self.horizontalLayout.addWidget(self.DisplayButton)
- self.CancelButton = QtGui.QPushButton(self.AlertEntryWidget)
- self.CancelButton.setObjectName(u'CancelButton')
- self.horizontalLayout.addWidget(self.CancelButton)
- self.verticalLayout_2.addLayout(self.horizontalLayout)
- self.AlertFormLayout.addWidget(self.AlertEntryWidget)
-
- self.retranslateUi(AlertForm)
- QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL(u'clicked()'), self.close)
- QtCore.QMetaObject.connectSlotsByName(AlertForm)
-
- def retranslateUi(self, AlertForm):
- AlertForm.setWindowTitle(self.trUtf8('Alert Message'))
- self.AlertEntryLabel.setText(self.trUtf8('Alert Text:'))
- self.DisplayButton.setText(self.trUtf8('Display'))
- self.CancelButton.setText(self.trUtf8('Cancel'))
+ self.AlertListWidget.setObjectName("AlertListWidget")
+ self.ManagementLayout.addWidget(self.AlertListWidget)
+ self.ManageButtonLayout = QtGui.QVBoxLayout()
+ self.ManageButtonLayout.setSpacing(8)
+ self.ManageButtonLayout.setObjectName("ManageButtonLayout")
+ self.NewButton = QtGui.QPushButton(AlertDialog)
+ icon1 = QtGui.QIcon()
+ icon1.addPixmap(QtGui.QPixmap(":/general/general_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.NewButton.setIcon(icon1)
+ self.NewButton.setObjectName("NewButton")
+ self.ManageButtonLayout.addWidget(self.NewButton)
+ self.SaveButton = QtGui.QPushButton(AlertDialog)
+ self.SaveButton.setEnabled(False)
+ icon2 = QtGui.QIcon()
+ icon2.addPixmap(QtGui.QPixmap(":/general/general_save.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.SaveButton.setIcon(icon2)
+ self.SaveButton.setObjectName("SaveButton")
+ self.ManageButtonLayout.addWidget(self.SaveButton)
+ self.EditButton = QtGui.QPushButton(AlertDialog)
+ icon3 = QtGui.QIcon()
+ icon3.addPixmap(QtGui.QPixmap(":/general/general_edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.EditButton.setIcon(icon3)
+ self.EditButton.setObjectName("EditButton")
+ self.ManageButtonLayout.addWidget(self.EditButton)
+ self.DeleteButton = QtGui.QPushButton(AlertDialog)
+ icon4 = QtGui.QIcon()
+ icon4.addPixmap(QtGui.QPixmap(":/general/general_delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.DeleteButton.setIcon(icon4)
+ self.DeleteButton.setObjectName("DeleteButton")
+ self.ManageButtonLayout.addWidget(self.DeleteButton)
+ spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.ManageButtonLayout.addItem(spacerItem)
+ self.ManagementLayout.addLayout(self.ManageButtonLayout)
+ self.AlertFormLayout.addLayout(self.ManagementLayout)
+ self.AlertButtonLayout = QtGui.QHBoxLayout()
+ self.AlertButtonLayout.setSpacing(8)
+ self.AlertButtonLayout.setObjectName("AlertButtonLayout")
+ spacerItem1 = QtGui.QSpacerItem(181, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.AlertButtonLayout.addItem(spacerItem1)
+ self.DisplayButton = QtGui.QPushButton(AlertDialog)
+ icon5 = QtGui.QIcon()
+ icon5.addPixmap(QtGui.QPixmap(":/general/general_live.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.DisplayButton.setIcon(icon5)
+ self.DisplayButton.setObjectName("DisplayButton")
+ self.AlertButtonLayout.addWidget(self.DisplayButton)
+ self.DisplayCloseButton = QtGui.QPushButton(AlertDialog)
+ self.DisplayCloseButton.setIcon(icon5)
+ self.DisplayCloseButton.setObjectName("DisplayCloseButton")
+ self.AlertButtonLayout.addWidget(self.DisplayCloseButton)
+ self.CloseButton = QtGui.QPushButton(AlertDialog)
+ icon6 = QtGui.QIcon()
+ icon6.addPixmap(QtGui.QPixmap(":/system/system_close.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.CloseButton.setIcon(icon6)
+ self.CloseButton.setObjectName("CloseButton")
+ self.AlertButtonLayout.addWidget(self.CloseButton)
+ self.AlertFormLayout.addLayout(self.AlertButtonLayout)
+ self.AlertEntryLabel.setBuddy(self.AlertTextEdit)
+ self.AlertParameter.setBuddy(self.ParameterEdit)
+
+ self.retranslateUi(AlertDialog)
+ QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL("clicked()"), AlertDialog.close)
+ QtCore.QMetaObject.connectSlotsByName(AlertDialog)
+ AlertDialog.setTabOrder(self.AlertTextEdit, self.ParameterEdit)
+ AlertDialog.setTabOrder(self.ParameterEdit, self.AlertListWidget)
+ AlertDialog.setTabOrder(self.AlertListWidget, self.NewButton)
+ AlertDialog.setTabOrder(self.NewButton, self.SaveButton)
+ AlertDialog.setTabOrder(self.SaveButton, self.EditButton)
+ AlertDialog.setTabOrder(self.EditButton, self.DeleteButton)
+ AlertDialog.setTabOrder(self.DeleteButton, self.DisplayButton)
+ AlertDialog.setTabOrder(self.DisplayButton, self.DisplayCloseButton)
+ AlertDialog.setTabOrder(self.DisplayCloseButton, self.CloseButton)
+
+ def retranslateUi(self, AlertDialog):
+ AlertDialog.setWindowTitle(QtGui.QApplication.translate("AlertDialog", "Alert Message", None, QtGui.QApplication.UnicodeUTF8))
+ self.AlertEntryLabel.setText(QtGui.QApplication.translate("AlertDialog", "Alert &text:", None, QtGui.QApplication.UnicodeUTF8))
+ self.AlertParameter.setText(QtGui.QApplication.translate("AlertDialog", "&Parameter(s):", None, QtGui.QApplication.UnicodeUTF8))
+ self.NewButton.setText(QtGui.QApplication.translate("AlertDialog", "&New", None, QtGui.QApplication.UnicodeUTF8))
+ self.SaveButton.setText(QtGui.QApplication.translate("AlertDialog", "&Save", None, QtGui.QApplication.UnicodeUTF8))
+ self.EditButton.setText(QtGui.QApplication.translate("AlertDialog", "&Edit", None, QtGui.QApplication.UnicodeUTF8))
+ self.DeleteButton.setText(QtGui.QApplication.translate("AlertDialog", "&Delete", None, QtGui.QApplication.UnicodeUTF8))
+ self.DisplayButton.setText(QtGui.QApplication.translate("AlertDialog", "Displ&ay", None, QtGui.QApplication.UnicodeUTF8))
+ self.DisplayCloseButton.setText(QtGui.QApplication.translate("AlertDialog", "Display && Cl&ose", None, QtGui.QApplication.UnicodeUTF8))
+ self.CloseButton.setText(QtGui.QApplication.translate("AlertDialog", "&Close", None, QtGui.QApplication.UnicodeUTF8))
+
=== modified file 'openlp/plugins/alerts/forms/alertform.py'
--- openlp/plugins/alerts/forms/alertform.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/alerts/forms/alertform.py 2010-04-17 11:33:19 +0000
@@ -45,9 +45,24 @@
QtCore.QObject.connect(self.DisplayButton,
QtCore.SIGNAL(u'clicked()'),
self.onDisplayClicked)
- QtCore.QObject.connect(self.AlertEntryEditItem,
+ QtCore.QObject.connect(self.DisplayCloseButton,
+ QtCore.SIGNAL(u'clicked()'),
+ self.onDisplayCloseClicked)
+ QtCore.QObject.connect(self.AlertTextEdit,
QtCore.SIGNAL(u'textChanged(const QString&)'),
self.onTextChanged)
+ QtCore.QObject.connect(self.NewButton,
+ QtCore.SIGNAL(u'clicked()'),
+ self.onNewClick)
+ QtCore.QObject.connect(self.DeleteButton,
+ QtCore.SIGNAL(u'clicked()'),
+ self.onDeleteClick)
+ QtCore.QObject.connect(self.EditButton,
+ QtCore.SIGNAL(u'clicked()'),
+ self.onEditClick)
+ QtCore.QObject.connect(self.SaveButton,
+ QtCore.SIGNAL(u'clicked()'),
+ self.onSaveClick)
QtCore.QObject.connect(self.AlertListWidget,
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
self.onDoubleClick)
@@ -60,19 +75,64 @@
alerts = self.manager.get_all_alerts()
for alert in alerts:
item_name = QtGui.QListWidgetItem(alert.text)
+ item_name.setData(
+ QtCore.Qt.UserRole, QtCore.QVariant(alert.id))
self.AlertListWidget.addItem(item_name)
+ self.SaveButton.setEnabled(False)
+ self.EditButton.setEnabled(False)
+ self.DeleteButton.setEnabled(False)
def onDisplayClicked(self):
- self.triggerAlert(unicode(self.AlertEntryEditItem.text()))
- if self.parent.alertsTab.save_history and self.history_required:
+ if self.triggerAlert(unicode(self.AlertTextEdit.text())):
+ self.history_required = False
+ self.loadList()
+
+ def onDisplayCloseClicked(self):
+ if self.triggerAlert(unicode(self.AlertTextEdit.text())):
+ self.close()
+
+ def onDeleteClick(self):
+ item = self.AlertListWidget.currentItem()
+ if item:
+ item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
+ self.parent.manager.delete_alert(item_id)
+ row = self.AlertListWidget.row(item)
+ self.AlertListWidget.takeItem(row)
+ self.AlertTextEdit.setText(u'')
+ self.SaveButton.setEnabled(False)
+ self.DeleteButton.setEnabled(False)
+ self.EditButton.setEnabled(False)
+
+ def onEditClick(self):
+ item = self.AlertListWidget.currentItem()
+ if item:
+ self.item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
+ self.AlertTextEdit.setText(unicode(item.text()))
+ self.SaveButton.setEnabled(True)
+ self.DeleteButton.setEnabled(True)
+ self.EditButton.setEnabled(False)
+
+ def onNewClick(self):
+ if len(self.AlertTextEdit.text()) == 0:
+ QtGui.QMessageBox.information(self,
+ self.trUtf8('Item selected to Add'),
+ self.trUtf8('Missing data'))
+ else:
alert = AlertItem()
- alert.text = unicode(self.AlertEntryEditItem.text())
+ alert.text = unicode(self.AlertTextEdit.text())
self.manager.save_alert(alert)
- self.history_required = False
+ self.onClearClick()
+ self.loadList()
+
+ def onSaveClick(self):
+ alert = self.manager.get_alert(self.item_id)
+ alert.text = unicode(self.AlertTextEdit.text())
+ self.manager.save_alert(alert)
+ self.onClearClick()
self.loadList()
def onTextChanged(self):
- #Data has changed by editing it so potential storage
+ #Data has changed by editing it so potential storage required
self.history_required = True
def onDoubleClick(self):
@@ -93,8 +153,17 @@
items = self.AlertListWidget.selectedIndexes()
for item in items:
bitem = self.AlertListWidget.item(item.row())
- self.AlertEntryEditItem.setText(bitem.text())
+ self.AlertTextEdit.setText(bitem.text())
self.history_required = False
+ self.EditButton.setEnabled(True)
+ self.DeleteButton.setEnabled(True)
def triggerAlert(self, text):
- self.parent.alertsmanager.displayAlert(text)
+ if text:
+ self.parent.alertsmanager.displayAlert(text)
+ if self.parent.alertsTab.save_history and self.history_required:
+ alert = AlertItem()
+ alert.text = unicode(self.AlertTextEdit.text())
+ self.manager.save_alert(alert)
+ return True
+ return False
=== modified file 'openlp/plugins/alerts/forms/alertstab.py'
--- openlp/plugins/alerts/forms/alertstab.py 2010-04-11 17:52:51 +0000
+++ openlp/plugins/alerts/forms/alertstab.py 2010-04-17 11:33:19 +0000
@@ -188,43 +188,6 @@
self.SlideRightSpacer = QtGui.QSpacerItem(20, 40,
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.SlideRightLayout.addItem(self.SlideRightSpacer)
- self.layoutWidget = QtGui.QWidget(self)
- self.layoutWidget.setGeometry(QtCore.QRect(20, 10, 361, 251))
- self.layoutWidget.setObjectName(u'layoutWidget')
- self.verticalLayout_2 = QtGui.QVBoxLayout(self.layoutWidget)
- self.verticalLayout_2.setObjectName(u'verticalLayout_2')
- self.horizontalLayout_2 = QtGui.QHBoxLayout()
- self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
- self.AlertLineEdit = QtGui.QLineEdit(self.layoutWidget)
- self.AlertLineEdit.setObjectName(u'AlertLineEdit')
- self.horizontalLayout_2.addWidget(self.AlertLineEdit)
- self.verticalLayout_2.addLayout(self.horizontalLayout_2)
- self.horizontalLayout = QtGui.QHBoxLayout()
- self.horizontalLayout.setObjectName(u'horizontalLayout')
- self.AlertListWidget = QtGui.QListWidget(self.layoutWidget)
- self.AlertListWidget.setAlternatingRowColors(True)
- self.AlertListWidget.setObjectName(u'AlertListWidget')
- self.horizontalLayout.addWidget(self.AlertListWidget)
- self.verticalLayout = QtGui.QVBoxLayout()
- self.verticalLayout.setObjectName(u'verticalLayout')
- self.SaveButton = QtGui.QPushButton(self.layoutWidget)
- self.SaveButton.setObjectName(u'SaveButton')
- self.verticalLayout.addWidget(self.SaveButton)
- self.ClearButton = QtGui.QPushButton(self.layoutWidget)
- self.ClearButton.setObjectName(u'ClearButton')
- self.verticalLayout.addWidget(self.ClearButton)
- self.AddButton = QtGui.QPushButton(self.layoutWidget)
- self.AddButton.setObjectName(u'AddButton')
- self.verticalLayout.addWidget(self.AddButton)
- self.EditButton = QtGui.QPushButton(self.layoutWidget)
- self.EditButton.setObjectName(u'EditButton')
- self.verticalLayout.addWidget(self.EditButton)
- self.DeleteButton = QtGui.QPushButton(self.layoutWidget)
- self.DeleteButton.setObjectName(u'DeleteButton')
- self.verticalLayout.addWidget(self.DeleteButton)
- self.horizontalLayout.addLayout(self.verticalLayout)
- self.verticalLayout_2.addLayout(self.horizontalLayout)
- self.SlideRightLayout.addWidget(self.layoutWidget)
self.AlertsLayout.addWidget(self.AlertRightColumn)
# Signals and slots
QtCore.QObject.connect(self.HistoryCheckBox,
@@ -242,27 +205,6 @@
QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
QtCore.QObject.connect(self.FontSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), self.onFontSizeSpinBoxChanged)
- QtCore.QObject.connect(self.DeleteButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onDeleteClick)
- QtCore.QObject.connect(self.ClearButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onClearClick)
- QtCore.QObject.connect(self.EditButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onEditClick)
- QtCore.QObject.connect(self.AddButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onAddClick)
- QtCore.QObject.connect(self.SaveButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onSaveClick)
- QtCore.QObject.connect(self.AlertListWidget,
- QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
- self.onItemSelected)
- QtCore.QObject.connect(self.AlertListWidget,
- QtCore.SIGNAL(u'clicked(QModelIndex)'),
- self.onItemSelected)
def retranslateUi(self):
self.FontGroupBox.setTitle(self.trUtf8('Font'))
@@ -279,11 +221,6 @@
self.FontPreview.setText(self.trUtf8('openlp.org'))
self.LocationComboBox.setItemText(0, self.trUtf8('Top'))
self.LocationComboBox.setItemText(1, self.trUtf8('Bottom'))
- self.SaveButton.setText(self.trUtf8('Save'))
- self.ClearButton.setText(self.trUtf8('Clear'))
- self.AddButton.setText(self.trUtf8('Add'))
- self.EditButton.setText(self.trUtf8('Edit'))
- self.DeleteButton.setText(self.trUtf8('Delete'))
def onBackgroundColorButtonClicked(self):
self.bg_color = QtGui.QColorDialog.getColor(
@@ -342,76 +279,11 @@
font.setFamily(self.font_face)
self.FontComboBox.setCurrentFont(font)
self.updateDisplay()
- self.loadList()
-
- def loadList(self):
- self.AlertListWidget.clear()
- alerts = self.manager.get_all_alerts()
- for alert in alerts:
- item_name = QtGui.QListWidgetItem(alert.text)
- item_name.setData(
- QtCore.Qt.UserRole, QtCore.QVariant(alert.id))
- self.AlertListWidget.addItem(item_name)
- self.AddButton.setEnabled(True)
- self.ClearButton.setEnabled(False)
- self.SaveButton.setEnabled(False)
- self.EditButton.setEnabled(False)
- self.DeleteButton.setEnabled(False)
def onItemSelected(self):
self.EditButton.setEnabled(True)
self.DeleteButton.setEnabled(True)
- def onDeleteClick(self):
- item = self.AlertListWidget.currentItem()
- if item:
- item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
- self.parent.manager.delete_alert(item_id)
- row = self.AlertListWidget.row(item)
- self.AlertListWidget.takeItem(row)
- self.AddButton.setEnabled(True)
- self.SaveButton.setEnabled(False)
- self.DeleteButton.setEnabled(False)
- self.EditButton.setEnabled(False)
-
- def onEditClick(self):
- item = self.AlertListWidget.currentItem()
- if item:
- self.item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
- self.AlertLineEdit.setText(unicode(item.text()))
- self.AddButton.setEnabled(True)
- self.ClearButton.setEnabled(True)
- self.SaveButton.setEnabled(True)
- self.DeleteButton.setEnabled(True)
- self.EditButton.setEnabled(False)
-
- def onClearClick(self):
- self.AlertLineEdit.setText(u'')
- self.AddButton.setEnabled(False)
- self.ClearButton.setEnabled(True)
- self.SaveButton.setEnabled(False)
- self.DeleteButton.setEnabled(False)
- self.EditButton.setEnabled(False)
-
- def onAddClick(self):
- if len(self.AlertLineEdit.text()) == 0:
- QtGui.QMessageBox.information(self,
- self.trUtf8('Item selected to Add'),
- self.trUtf8('Missing data'))
- else:
- alert = AlertItem()
- alert.text = unicode(self.AlertLineEdit.text())
- self.manager.save_alert(alert)
- self.onClearClick()
- self.loadList()
-
- def onSaveClick(self):
- alert = self.manager.get_alert(self.item_id)
- alert.text = unicode(self.AlertLineEdit.text())
- self.manager.save_alert(alert)
- self.onClearClick()
- self.loadList()
-
def save(self):
self.font_face = self.FontComboBox.currentFont().family()
self.config.set_config(u'background color', unicode(self.bg_color))
=== modified file 'openlp/plugins/alerts/lib/alertsmanager.py'
--- openlp/plugins/alerts/lib/alertsmanager.py 2010-04-10 18:11:24 +0000
+++ openlp/plugins/alerts/lib/alertsmanager.py 2010-04-17 11:33:19 +0000
@@ -65,9 +65,12 @@
if self.alertTab.location == 0:
self.alertScreenPosition = 0
else:
- self.alertScreenPosition = self.screen[u'size'].height() - self.alertHeight
- self.alertHeight = self.screen[u'size'].height() - self.alertScreenPosition
- self.parent.maindisplay.setAlertSize(self.alertScreenPosition, self.alertHeight)
+ self.alertScreenPosition = self.screen[u'size'].height() \
+ - self.alertHeight
+ self.alertHeight = self.screen[u'size'].height() \
+ - self.alertScreenPosition
+ self.parent.maindisplay.setAlertSize(self.alertScreenPosition,\
+ self.alertHeight)
def displayAlert(self, text=u''):
"""
@@ -79,12 +82,12 @@
log.debug(u'display alert called %s' % text)
if not self.screen:
self.screenChanged()
- self.parent.maindisplay.parent.StatusBar.showMessage(u'')
self.alertList.append(text)
if self.timer_id != 0:
- self.parent.maindisplay.parent.StatusBar.showMessage(\
- self.trUtf8(u'Alert message created and delayed'))
+ Receiver.send_message(u'status_message',
+ self.trUtf8(u'Alert message created and delayed'))
return
+ Receiver.send_message(u'status_message', u'')
self.generateAlert()
def generateAlert(self):
@@ -116,6 +119,7 @@
self.timer_id = self.startTimer(int(alertTab.timeout) * 1000)
def timerEvent(self, event):
+ log.debug(u'timer event')
if event.timerId() == self.timer_id:
self.parent.maindisplay.addAlertImage(None, True)
self.killTimer(self.timer_id)
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-04-07 18:32:54 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-04-17 11:33:19 +0000
@@ -155,6 +155,10 @@
desktop = self.get_uno_desktop()
else:
desktop = self.get_com_desktop()
+ #Sometimes we get a failure and desktop is None
+ if not desktop:
+ log.exception(u'Failed to terminate OpenOffice')
+ return
docs = desktop.getComponents()
if docs.hasElements():
log.debug(u'OpenOffice not terminated')
=== modified file 'resources/forms/alertdialog.ui'
--- resources/forms/alertdialog.ui 2010-02-14 20:19:57 +0000
+++ resources/forms/alertdialog.ui 2010-04-17 11:33:19 +0000
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>AlertForm</class>
- <widget class="QWidget" name="AlertForm">
+ <class>AlertDialog</class>
+ <widget class="QDialog" name="AlertDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>430</width>
- <height>320</height>
+ <width>567</width>
+ <height>440</height>
</rect>
</property>
<property name="windowTitle">
@@ -25,85 +25,212 @@
<number>8</number>
</property>
<item>
- <widget class="QWidget" name="AlertEntryWidget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="AlertEntryLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Alert Text:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="AlertEntryEditItem"/>
- </item>
- <item>
- <widget class="QListWidget" name="AlertListWidget">
- <property name="alternatingRowColors">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="ButtonBoxWidgetSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>181</width>
- <height>38</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="DisplayButton">
- <property name="text">
- <string>Display</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="CancelButton">
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
+ <layout class="QFormLayout" name="AlertTextLayout">
+ <property name="horizontalSpacing">
+ <number>8</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>8</number>
+ </property>
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="AlertEntryLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Alert &text:</string>
+ </property>
+ <property name="buddy">
+ <cstring>AlertTextEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="AlertParameter">
+ <property name="text">
+ <string>&Parameter(s):</string>
+ </property>
+ <property name="buddy">
+ <cstring>ParameterEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="ParameterEdit"/>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="AlertTextEdit"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="ManagementLayout">
+ <property name="spacing">
+ <number>8</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QListWidget" name="AlertListWidget">
+ <property name="alternatingRowColors">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="ManageButtonLayout">
+ <property name="spacing">
+ <number>8</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="NewButton">
+ <property name="text">
+ <string>&New</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc">
+ <normaloff>:/general/general_new.png</normaloff>:/general/general_new.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="SaveButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&Save</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc">
+ <normaloff>:/general/general_save.png</normaloff>:/general/general_save.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="EditButton">
+ <property name="text">
+ <string>&Edit</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc">
+ <normaloff>:/general/general_edit.png</normaloff>:/general/general_edit.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="DeleteButton">
+ <property name="text">
+ <string>&Delete</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc">
+ <normaloff>:/general/general_delete.png</normaloff>:/general/general_delete.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="ManagementSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="AlertButtonLayout">
+ <property name="spacing">
+ <number>8</number>
+ </property>
+ <item>
+ <spacer name="ButtonBoxWidgetSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>181</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="DisplayButton">
+ <property name="text">
+ <string>Displ&ay</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc">
+ <normaloff>:/general/general_live.png</normaloff>:/general/general_live.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="DisplayCloseButton">
+ <property name="text">
+ <string>Display && Cl&ose</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc">
+ <normaloff>:/general/general_live.png</normaloff>:/general/general_live.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="CloseButton">
+ <property name="text">
+ <string>&Close</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc">
+ <normaloff>:/system/system_close.png</normaloff>:/system/system_close.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>AlertTextEdit</tabstop>
+ <tabstop>ParameterEdit</tabstop>
+ <tabstop>AlertListWidget</tabstop>
+ <tabstop>NewButton</tabstop>
+ <tabstop>SaveButton</tabstop>
+ <tabstop>EditButton</tabstop>
+ <tabstop>DeleteButton</tabstop>
+ <tabstop>DisplayButton</tabstop>
+ <tabstop>DisplayCloseButton</tabstop>
+ <tabstop>CloseButton</tabstop>
+ </tabstops>
<resources>
- <include location="../images/openlp-2.qrc"/>
+ <include location="../Projects/OpenLP/trunk/resources/images/openlp-2.qrc"/>
</resources>
<connections>
<connection>
- <sender>CancelButton</sender>
+ <sender>CloseButton</sender>
<signal>clicked()</signal>
- <receiver>AlertForm</receiver>
+ <receiver>AlertDialog</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
=== removed file 'resources/forms/alerteditdialog.ui'
--- resources/forms/alerteditdialog.ui 2010-02-14 20:19:57 +0000
+++ resources/forms/alerteditdialog.ui 1970-01-01 00:00:00 +0000
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AlertEditDialog</class>
- <widget class="QWidget" name="AlertEditDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Maintain Alerts</string>
- </property>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="geometry">
- <rect>
- <x>220</x>
- <y>270</y>
- <width>173</width>
- <height>27</height>
- </rect>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel</set>
- </property>
- </widget>
- <widget class="QWidget" name="layoutWidget">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>10</y>
- <width>361</width>
- <height>251</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLineEdit" name="AlertLineEdit"/>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QListWidget" name="AlertListWidget">
- <property name="alternatingRowColors">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QPushButton" name="SaveButton">
- <property name="text">
- <string>Save</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="ClearButton">
- <property name="text">
- <string>Clear</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="AddButton">
- <property name="text">
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="EdirButton">
- <property name="text">
- <string>Edit</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="DeleteButton">
- <property name="text">
- <string>Delete</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
Follow ups