~suutari-olli/openlp/escape-fixes-1294111-1497637

« back to all changes in this revision

Viewing changes to openlp/plugins/alerts/forms/alertdialog.py

  • Committer: suutari-olli
  • Date: 2016-01-07 02:53:59 UTC
  • mfrom: (2557.2.31 openlp)
  • Revision ID: suutari.olli@gmail.com-20160107025359-q2feybbwxaoihqxr
Merge to trunk on 1/7/2015.

I noticed this branch also seems to be fixing this bug:
https://bugs.launchpad.net/openlp/+bug/1531691

However, escape item still remains buggy with problems related to resuming
video and presentations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2015 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2016 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
20
20
# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
21
21
###############################################################################
22
22
 
23
 
from PyQt4 import QtGui
 
23
from PyQt5 import QtWidgets
24
24
 
25
25
from openlp.core.common import translate
26
26
from openlp.core.lib import build_icon
40
40
        alert_dialog.setObjectName('alert_dialog')
41
41
        alert_dialog.resize(400, 300)
42
42
        alert_dialog.setWindowIcon(build_icon(u':/icon/openlp-logo.svg'))
43
 
        self.alert_dialog_layout = QtGui.QGridLayout(alert_dialog)
 
43
        self.alert_dialog_layout = QtWidgets.QGridLayout(alert_dialog)
44
44
        self.alert_dialog_layout.setObjectName('alert_dialog_layout')
45
 
        self.alert_text_layout = QtGui.QFormLayout()
 
45
        self.alert_text_layout = QtWidgets.QFormLayout()
46
46
        self.alert_text_layout.setObjectName('alert_text_layout')
47
 
        self.alert_entry_label = QtGui.QLabel(alert_dialog)
 
47
        self.alert_entry_label = QtWidgets.QLabel(alert_dialog)
48
48
        self.alert_entry_label.setObjectName('alert_entry_label')
49
 
        self.alert_text_edit = QtGui.QLineEdit(alert_dialog)
 
49
        self.alert_text_edit = QtWidgets.QLineEdit(alert_dialog)
50
50
        self.alert_text_edit.setObjectName('alert_text_edit')
51
51
        self.alert_entry_label.setBuddy(self.alert_text_edit)
52
52
        self.alert_text_layout.addRow(self.alert_entry_label, self.alert_text_edit)
53
 
        self.alert_parameter = QtGui.QLabel(alert_dialog)
 
53
        self.alert_parameter = QtWidgets.QLabel(alert_dialog)
54
54
        self.alert_parameter.setObjectName('alert_parameter')
55
 
        self.parameter_edit = QtGui.QLineEdit(alert_dialog)
 
55
        self.parameter_edit = QtWidgets.QLineEdit(alert_dialog)
56
56
        self.parameter_edit.setObjectName('parameter_edit')
57
57
        self.alert_parameter.setBuddy(self.parameter_edit)
58
58
        self.alert_text_layout.addRow(self.alert_parameter, self.parameter_edit)
59
59
        self.alert_dialog_layout.addLayout(self.alert_text_layout, 0, 0, 1, 2)
60
 
        self.alert_list_widget = QtGui.QListWidget(alert_dialog)
 
60
        self.alert_list_widget = QtWidgets.QListWidget(alert_dialog)
61
61
        self.alert_list_widget.setAlternatingRowColors(True)
62
62
        self.alert_list_widget.setObjectName('alert_list_widget')
63
63
        self.alert_dialog_layout.addWidget(self.alert_list_widget, 1, 0)
64
 
        self.manage_button_layout = QtGui.QVBoxLayout()
 
64
        self.manage_button_layout = QtWidgets.QVBoxLayout()
65
65
        self.manage_button_layout.setObjectName('manage_button_layout')
66
 
        self.new_button = QtGui.QPushButton(alert_dialog)
 
66
        self.new_button = QtWidgets.QPushButton(alert_dialog)
67
67
        self.new_button.setIcon(build_icon(':/general/general_new.png'))
68
68
        self.new_button.setObjectName('new_button')
69
69
        self.manage_button_layout.addWidget(self.new_button)
70
 
        self.save_button = QtGui.QPushButton(alert_dialog)
 
70
        self.save_button = QtWidgets.QPushButton(alert_dialog)
71
71
        self.save_button.setEnabled(False)
72
72
        self.save_button.setIcon(build_icon(':/general/general_save.png'))
73
73
        self.save_button.setObjectName('save_button')