2008-11-28 14:05:41 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
|
|
"""
|
|
|
|
OpenLP - Open Source Lyrics Projection
|
|
|
|
Copyright (c) 2008 Raoul Snyman
|
|
|
|
Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
|
|
|
|
|
|
|
|
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
|
|
|
|
"""
|
2009-03-22 07:13:34 +00:00
|
|
|
import logging
|
2008-11-28 14:05:41 +00:00
|
|
|
from PyQt4 import QtCore, QtGui
|
2009-03-01 09:13:27 +00:00
|
|
|
from PyQt4.QtGui import QDialog
|
2008-11-28 14:05:41 +00:00
|
|
|
|
2009-03-01 09:13:27 +00:00
|
|
|
from openlp.core import translate
|
2008-11-28 14:05:41 +00:00
|
|
|
from openlp.core.resources import *
|
|
|
|
|
2009-03-01 09:13:27 +00:00
|
|
|
class AlertForm(QDialog):
|
2009-03-22 07:13:34 +00:00
|
|
|
global log
|
|
|
|
log=logging.getLogger(u'AlertForm')
|
|
|
|
|
2009-03-23 19:17:07 +00:00
|
|
|
def __init__(self, parent=None):
|
2009-03-01 09:13:27 +00:00
|
|
|
QDialog.__init__(self, parent)
|
|
|
|
self.setupUi(self)
|
2009-03-22 07:13:34 +00:00
|
|
|
log.info(u'Defined')
|
2008-11-28 14:05:41 +00:00
|
|
|
|
2009-03-01 09:13:27 +00:00
|
|
|
def setupUi(self, AlertForm):
|
|
|
|
AlertForm.setObjectName("AlertForm")
|
2009-03-22 07:13:34 +00:00
|
|
|
AlertForm.resize(370, 110)
|
2008-11-28 14:05:41 +00:00
|
|
|
icon = QtGui.QIcon()
|
|
|
|
icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
2009-03-01 09:13:27 +00:00
|
|
|
AlertForm.setWindowIcon(icon)
|
|
|
|
self.AlertFormLayout = QtGui.QVBoxLayout(AlertForm)
|
2008-11-28 14:05:41 +00:00
|
|
|
self.AlertFormLayout.setSpacing(8)
|
|
|
|
self.AlertFormLayout.setMargin(8)
|
|
|
|
self.AlertFormLayout.setObjectName("AlertFormLayout")
|
2009-03-01 09:13:27 +00:00
|
|
|
self.AlertEntryWidget = QtGui.QWidget(AlertForm)
|
2008-11-28 14:05:41 +00:00
|
|
|
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("AlertEntryWidget")
|
|
|
|
self.AlertEntryLabel = QtGui.QLabel(self.AlertEntryWidget)
|
|
|
|
self.AlertEntryLabel.setGeometry(QtCore.QRect(0, 0, 353, 16))
|
|
|
|
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("AlertEntryLabel")
|
|
|
|
self.AlertEntryEditItem = QtGui.QLineEdit(self.AlertEntryWidget)
|
2009-03-22 07:13:34 +00:00
|
|
|
self.AlertEntryEditItem.setGeometry(QtCore.QRect(0, 20, 353, 26))
|
2008-11-28 14:05:41 +00:00
|
|
|
self.AlertEntryEditItem.setObjectName("AlertEntryEditItem")
|
|
|
|
self.AlertFormLayout.addWidget(self.AlertEntryWidget)
|
2009-03-01 09:13:27 +00:00
|
|
|
self.ButtonBoxWidget = QtGui.QWidget(AlertForm)
|
2008-11-28 14:05:41 +00:00
|
|
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
|
|
|
sizePolicy.setHorizontalStretch(0)
|
|
|
|
sizePolicy.setVerticalStretch(0)
|
|
|
|
sizePolicy.setHeightForWidth(self.ButtonBoxWidget.sizePolicy().hasHeightForWidth())
|
|
|
|
self.ButtonBoxWidget.setSizePolicy(sizePolicy)
|
|
|
|
self.ButtonBoxWidget.setObjectName("ButtonBoxWidget")
|
|
|
|
self.horizontalLayout = QtGui.QHBoxLayout(self.ButtonBoxWidget)
|
|
|
|
self.horizontalLayout.setSpacing(8)
|
|
|
|
self.horizontalLayout.setMargin(0)
|
|
|
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
|
|
|
spacerItem = QtGui.QSpacerItem(267, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
|
|
self.horizontalLayout.addItem(spacerItem)
|
|
|
|
self.DisplayButton = QtGui.QPushButton(self.ButtonBoxWidget)
|
|
|
|
self.DisplayButton.setObjectName("DisplayButton")
|
|
|
|
self.horizontalLayout.addWidget(self.DisplayButton)
|
|
|
|
self.CancelButton = QtGui.QPushButton(self.ButtonBoxWidget)
|
|
|
|
self.CancelButton.setObjectName("CancelButton")
|
|
|
|
self.horizontalLayout.addWidget(self.CancelButton)
|
|
|
|
self.AlertFormLayout.addWidget(self.ButtonBoxWidget)
|
|
|
|
|
2009-03-01 09:13:27 +00:00
|
|
|
self.retranslateUi(AlertForm)
|
|
|
|
|
|
|
|
QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL("clicked()"), AlertForm.close)
|
2009-03-22 07:13:34 +00:00
|
|
|
QtCore.QObject.connect(self.DisplayButton, QtCore.SIGNAL("clicked()"), self.onDisplayClicked)
|
2009-03-01 09:13:27 +00:00
|
|
|
QtCore.QMetaObject.connectSlotsByName(AlertForm)
|
2008-11-28 14:05:41 +00:00
|
|
|
|
2009-03-01 09:13:27 +00:00
|
|
|
def retranslateUi(self, AlertForm):
|
2009-03-22 07:13:34 +00:00
|
|
|
AlertForm.setWindowTitle(translate("AlertForm", u'Alert Message'))
|
|
|
|
self.AlertEntryLabel.setText(translate("AlertForm", u'Alert Text:'))
|
|
|
|
self.DisplayButton.setText(translate("AlertForm", u'Display'))
|
|
|
|
self.CancelButton.setText(translate("AlertForm", u'Cancel'))
|
2008-11-28 14:05:41 +00:00
|
|
|
|
2009-02-28 07:23:48 +00:00
|
|
|
|
|
|
|
def load_settings(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def save_settings(self):
|
|
|
|
pass
|
2009-03-22 07:13:34 +00:00
|
|
|
|
|
|
|
def onDisplayClicked(self):
|
2009-03-23 19:17:07 +00:00
|
|
|
pass
|