~john+ubuntu-g/openlp/singingthefaith

« back to all changes in this revision

Viewing changes to openlp/plugins/custom/forms/editcustomdialog.py

  • Committer: Jonathan Springer
  • Date: 2015-11-07 00:49:40 UTC
  • mto: This revision was merged to the branch mainline in revision 2576.
  • Revision ID: springermac@gmail.com-20151107004940-m208ohzwoc74yq51
Migrate to PyQt5

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 UiStrings, translate
26
26
from openlp.core.lib import build_icon
36
36
        custom_edit_dialog.setObjectName('custom_edit_dialog')
37
37
        custom_edit_dialog.setWindowIcon(build_icon(u':/icon/openlp-logo.svg'))
38
38
        custom_edit_dialog.resize(450, 350)
39
 
        self.dialog_layout = QtGui.QVBoxLayout(custom_edit_dialog)
 
39
        self.dialog_layout = QtWidgets.QVBoxLayout(custom_edit_dialog)
40
40
        self.dialog_layout.setObjectName('dialog_layout')
41
 
        self.title_layout = QtGui.QHBoxLayout()
 
41
        self.title_layout = QtWidgets.QHBoxLayout()
42
42
        self.title_layout.setObjectName('title_layout')
43
 
        self.title_label = QtGui.QLabel(custom_edit_dialog)
 
43
        self.title_label = QtWidgets.QLabel(custom_edit_dialog)
44
44
        self.title_label.setObjectName('title_label')
45
45
        self.title_layout.addWidget(self.title_label)
46
 
        self.title_edit = QtGui.QLineEdit(custom_edit_dialog)
 
46
        self.title_edit = QtWidgets.QLineEdit(custom_edit_dialog)
47
47
        self.title_label.setBuddy(self.title_edit)
48
48
        self.title_edit.setObjectName('title_edit')
49
49
        self.title_layout.addWidget(self.title_edit)
50
50
        self.dialog_layout.addLayout(self.title_layout)
51
 
        self.central_layout = QtGui.QHBoxLayout()
 
51
        self.central_layout = QtWidgets.QHBoxLayout()
52
52
        self.central_layout.setObjectName('central_layout')
53
 
        self.slide_list_view = QtGui.QListWidget(custom_edit_dialog)
 
53
        self.slide_list_view = QtWidgets.QListWidget(custom_edit_dialog)
54
54
        self.slide_list_view.setAlternatingRowColors(True)
55
55
        self.slide_list_view.setObjectName('slide_list_view')
56
56
        self.central_layout.addWidget(self.slide_list_view)
57
 
        self.button_layout = QtGui.QVBoxLayout()
 
57
        self.button_layout = QtWidgets.QVBoxLayout()
58
58
        self.button_layout.setObjectName('button_layout')
59
 
        self.add_button = QtGui.QPushButton(custom_edit_dialog)
 
59
        self.add_button = QtWidgets.QPushButton(custom_edit_dialog)
60
60
        self.add_button.setObjectName('add_button')
61
61
        self.button_layout.addWidget(self.add_button)
62
 
        self.edit_button = QtGui.QPushButton(custom_edit_dialog)
 
62
        self.edit_button = QtWidgets.QPushButton(custom_edit_dialog)
63
63
        self.edit_button.setEnabled(False)
64
64
        self.edit_button.setObjectName('edit_button')
65
65
        self.button_layout.addWidget(self.edit_button)
66
 
        self.edit_all_button = QtGui.QPushButton(custom_edit_dialog)
 
66
        self.edit_all_button = QtWidgets.QPushButton(custom_edit_dialog)
67
67
        self.edit_all_button.setObjectName('edit_all_button')
68
68
        self.button_layout.addWidget(self.edit_all_button)
69
69
        self.delete_button = create_button(custom_edit_dialog, 'delete_button', role='delete',
79
79
        self.button_layout.addWidget(self.down_button)
80
80
        self.central_layout.addLayout(self.button_layout)
81
81
        self.dialog_layout.addLayout(self.central_layout)
82
 
        self.bottom_form_layout = QtGui.QFormLayout()
 
82
        self.bottom_form_layout = QtWidgets.QFormLayout()
83
83
        self.bottom_form_layout.setObjectName('bottom_form_layout')
84
 
        self.theme_label = QtGui.QLabel(custom_edit_dialog)
 
84
        self.theme_label = QtWidgets.QLabel(custom_edit_dialog)
85
85
        self.theme_label.setObjectName('theme_label')
86
 
        self.theme_combo_box = QtGui.QComboBox(custom_edit_dialog)
87
 
        self.theme_combo_box.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
 
86
        self.theme_combo_box = QtWidgets.QComboBox(custom_edit_dialog)
 
87
        self.theme_combo_box.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents)
88
88
        self.theme_combo_box.setObjectName('theme_combo_box')
89
89
        self.theme_label.setBuddy(self.theme_combo_box)
90
90
        self.bottom_form_layout.addRow(self.theme_label, self.theme_combo_box)
91
 
        self.credit_label = QtGui.QLabel(custom_edit_dialog)
 
91
        self.credit_label = QtWidgets.QLabel(custom_edit_dialog)
92
92
        self.credit_label.setObjectName('credit_label')
93
 
        self.credit_edit = QtGui.QLineEdit(custom_edit_dialog)
 
93
        self.credit_edit = QtWidgets.QLineEdit(custom_edit_dialog)
94
94
        self.credit_edit.setObjectName('credit_edit')
95
95
        self.credit_label.setBuddy(self.credit_edit)
96
96
        self.bottom_form_layout.addRow(self.credit_label, self.credit_edit)
97
97
        self.dialog_layout.addLayout(self.bottom_form_layout)
98
 
        self.preview_button = QtGui.QPushButton()
 
98
        self.preview_button = QtWidgets.QPushButton()
99
99
        self.button_box = create_button_box(custom_edit_dialog, 'button_box', ['cancel', 'save'],
100
100
                                            [self.preview_button])
101
101
        self.dialog_layout.addWidget(self.button_box)