Merge lp:~phill-ridout/openlp/display_overide into lp:openlp
- display_overide
- Merge into trunk
Proposed by
Phill
Status: | Merged |
---|---|
Merged at revision: | 1899 |
Proposed branch: | lp:~phill-ridout/openlp/display_overide |
Merge into: | lp:openlp |
Diff against target: |
297 lines (+109/-99) 1 file modified
openlp/core/ui/generaltab.py (+109/-99) |
To merge this branch: | bzr merge lp:~phill-ridout/openlp/display_overide |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Bentley | Approve | ||
Jonathan Corwin (community) | Approve | ||
Raoul Snyman | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2012-03-09.
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tim Bentley (trb143) : Posted in a previous version of this proposal | # |
review:
Approve
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jonathan Corwin (j-corwin) : Posted in a previous version of this proposal | # |
review:
Approve
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Maybe it's just me, but there's now a huge margin around all the group boxes that doesn't exist on the other pages...
review:
Needs Fixing
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Found out how to fix it. Right under the "SettingsTab.
self.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jonathan Corwin (j-corwin) : | # |
review:
Approve
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tim Bentley (trb143) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'openlp/core/ui/generaltab.py' |
2 | --- openlp/core/ui/generaltab.py 2012-02-16 21:08:30 +0000 |
3 | +++ openlp/core/ui/generaltab.py 2012-03-10 23:04:20 +0000 |
4 | @@ -53,21 +53,100 @@ |
5 | """ |
6 | self.setObjectName(u'GeneralTab') |
7 | SettingsTab.setupUi(self) |
8 | + self.tabLayout.setStretch(1, 1) |
9 | + # Monitors |
10 | self.monitorGroupBox = QtGui.QGroupBox(self.leftColumn) |
11 | self.monitorGroupBox.setObjectName(u'monitorGroupBox') |
12 | - self.monitorLayout = QtGui.QFormLayout(self.monitorGroupBox) |
13 | + self.monitorLayout = QtGui.QGridLayout(self.monitorGroupBox) |
14 | self.monitorLayout.setObjectName(u'monitorLayout') |
15 | - self.monitorLabel = QtGui.QLabel(self.monitorGroupBox) |
16 | - self.monitorLabel.setObjectName(u'monitorLabel') |
17 | - self.monitorLayout.addRow(self.monitorLabel) |
18 | + self.monitorRadioButton = QtGui.QRadioButton(self.monitorGroupBox) |
19 | + self.monitorRadioButton.setObjectName(u'monitorRadioButton') |
20 | + self.monitorLayout.addWidget(self.monitorRadioButton, 0, 0, 1, 5) |
21 | self.monitorComboBox = QtGui.QComboBox(self.monitorGroupBox) |
22 | self.monitorComboBox.setObjectName(u'monitorComboBox') |
23 | - self.monitorLayout.addRow(self.monitorComboBox) |
24 | + self.monitorLayout.addWidget(self.monitorComboBox, 1, 1, 1, 4) |
25 | self.displayOnMonitorCheck = QtGui.QCheckBox(self.monitorGroupBox) |
26 | self.displayOnMonitorCheck.setObjectName(u'monitorComboBox') |
27 | - self.monitorLayout.addRow(self.displayOnMonitorCheck) |
28 | + self.monitorLayout.addWidget(self.displayOnMonitorCheck, 2, 1, 1, 4) |
29 | + # Display Position |
30 | + self.overrideRadioButton = QtGui.QRadioButton(self.monitorGroupBox) |
31 | + self.overrideRadioButton.setObjectName(u'overrideRadioButton') |
32 | + self.monitorLayout.addWidget(self.overrideRadioButton, 3, 0, 1, 5) |
33 | + # Custom position |
34 | + self.customXLabel = QtGui.QLabel(self.monitorGroupBox) |
35 | + self.customXLabel.setObjectName(u'customXLabel') |
36 | + self.monitorLayout.addWidget(self.customXLabel, 4, 1) |
37 | + self.customXValueEdit = QtGui.QSpinBox(self.monitorGroupBox) |
38 | + self.customXValueEdit.setObjectName(u'customXValueEdit') |
39 | + self.customXValueEdit.setRange(-9999, 9999) |
40 | + self.monitorLayout.addWidget(self.customXValueEdit, 5, 1) |
41 | + self.customYLabel = QtGui.QLabel(self.monitorGroupBox) |
42 | + self.customYLabel.setObjectName(u'customYLabel') |
43 | + self.monitorLayout.addWidget(self.customYLabel, 4, 2) |
44 | + self.customYValueEdit = QtGui.QSpinBox(self.monitorGroupBox) |
45 | + self.customYValueEdit.setObjectName(u'customYValueEdit') |
46 | + self.customYValueEdit.setRange(-9999, 9999) |
47 | + self.monitorLayout.addWidget(self.customYValueEdit, 5, 2) |
48 | + self.customWidthLabel = QtGui.QLabel(self.monitorGroupBox) |
49 | + self.customWidthLabel.setObjectName(u'customWidthLabel') |
50 | + self.monitorLayout.addWidget(self.customWidthLabel, 4, 3) |
51 | + self.customWidthValueEdit = QtGui.QSpinBox(self.monitorGroupBox) |
52 | + self.customWidthValueEdit.setObjectName(u'customWidthValueEdit') |
53 | + self.customWidthValueEdit.setMaximum(9999) |
54 | + self.monitorLayout.addWidget(self.customWidthValueEdit, 5, 3) |
55 | + self.customHeightLabel = QtGui.QLabel(self.monitorGroupBox) |
56 | + self.customHeightLabel.setObjectName(u'customHeightLabel') |
57 | + self.monitorLayout.addWidget(self.customHeightLabel, 4, 4) |
58 | + self.customHeightValueEdit = QtGui.QSpinBox(self.monitorGroupBox) |
59 | + self.customHeightValueEdit.setObjectName(u'customHeightValueEdit') |
60 | + self.customHeightValueEdit.setMaximum(9999) |
61 | + self.monitorLayout.addWidget(self.customHeightValueEdit, 5, 4) |
62 | + # Set up the stretchiness of each column, so that the first column |
63 | + # less stretchy (and therefore smaller) than the others |
64 | + self.monitorLayout.setColumnStretch(0, 1) |
65 | + self.monitorLayout.setColumnStretch(1, 3) |
66 | + self.monitorLayout.setColumnStretch(2, 3) |
67 | + self.monitorLayout.setColumnStretch(3, 3) |
68 | + self.monitorLayout.setColumnStretch(4, 3) |
69 | self.leftLayout.addWidget(self.monitorGroupBox) |
70 | - self.startupGroupBox = QtGui.QGroupBox(self.leftColumn) |
71 | + # CCLI Details |
72 | + self.ccliGroupBox = QtGui.QGroupBox(self.leftColumn) |
73 | + self.ccliGroupBox.setObjectName(u'ccliGroupBox') |
74 | + self.ccliLayout = QtGui.QFormLayout(self.ccliGroupBox) |
75 | + self.ccliLayout.setObjectName(u'ccliLayout') |
76 | + self.numberLabel = QtGui.QLabel(self.ccliGroupBox) |
77 | + self.numberLabel.setObjectName(u'numberLabel') |
78 | + self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox) |
79 | + self.numberEdit.setValidator(QtGui.QIntValidator()) |
80 | + self.numberEdit.setObjectName(u'numberEdit') |
81 | + self.ccliLayout.addRow(self.numberLabel, self.numberEdit) |
82 | + self.usernameLabel = QtGui.QLabel(self.ccliGroupBox) |
83 | + self.usernameLabel.setObjectName(u'usernameLabel') |
84 | + self.usernameEdit = QtGui.QLineEdit(self.ccliGroupBox) |
85 | + self.usernameEdit.setObjectName(u'usernameEdit') |
86 | + self.ccliLayout.addRow(self.usernameLabel, self.usernameEdit) |
87 | + self.passwordLabel = QtGui.QLabel(self.ccliGroupBox) |
88 | + self.passwordLabel.setObjectName(u'passwordLabel') |
89 | + self.passwordEdit = QtGui.QLineEdit(self.ccliGroupBox) |
90 | + self.passwordEdit.setEchoMode(QtGui.QLineEdit.Password) |
91 | + self.passwordEdit.setObjectName(u'passwordEdit') |
92 | + self.ccliLayout.addRow(self.passwordLabel, self.passwordEdit) |
93 | + self.leftLayout.addWidget(self.ccliGroupBox) |
94 | + # Background audio |
95 | + self.audioGroupBox = QtGui.QGroupBox(self.leftColumn) |
96 | + self.audioGroupBox.setObjectName(u'audioGroupBox') |
97 | + self.audioLayout = QtGui.QVBoxLayout(self.audioGroupBox) |
98 | + self.audioLayout.setObjectName(u'audioLayout') |
99 | + self.startPausedCheckBox = QtGui.QCheckBox(self.audioGroupBox) |
100 | + self.startPausedCheckBox.setObjectName(u'startPausedCheckBox') |
101 | + self.audioLayout.addWidget(self.startPausedCheckBox) |
102 | + self.repeatListCheckBox = QtGui.QCheckBox(self.audioGroupBox) |
103 | + self.repeatListCheckBox.setObjectName(u'repeatListCheckBox') |
104 | + self.audioLayout.addWidget(self.repeatListCheckBox) |
105 | + self.leftLayout.addWidget(self.audioGroupBox) |
106 | + self.leftLayout.addStretch() |
107 | + # Application Startup |
108 | + self.startupGroupBox = QtGui.QGroupBox(self.rightColumn) |
109 | self.startupGroupBox.setObjectName(u'startupGroupBox') |
110 | self.startupLayout = QtGui.QVBoxLayout(self.startupGroupBox) |
111 | self.startupLayout.setObjectName(u'startupLayout') |
112 | @@ -83,8 +162,9 @@ |
113 | self.checkForUpdatesCheckBox = QtGui.QCheckBox(self.startupGroupBox) |
114 | self.checkForUpdatesCheckBox.setObjectName(u'checkForUpdatesCheckBox') |
115 | self.startupLayout.addWidget(self.checkForUpdatesCheckBox) |
116 | - self.leftLayout.addWidget(self.startupGroupBox) |
117 | - self.settingsGroupBox = QtGui.QGroupBox(self.leftColumn) |
118 | + self.rightLayout.addWidget(self.startupGroupBox) |
119 | + # Application Settings |
120 | + self.settingsGroupBox = QtGui.QGroupBox(self.rightColumn) |
121 | self.settingsGroupBox.setObjectName(u'settingsGroupBox') |
122 | self.settingsLayout = QtGui.QFormLayout(self.settingsGroupBox) |
123 | self.settingsLayout.setObjectName(u'settingsLayout') |
124 | @@ -104,85 +184,11 @@ |
125 | self.timeoutSpinBox.setObjectName(u'timeoutSpinBox') |
126 | self.timeoutSpinBox.setRange(1, 180) |
127 | self.settingsLayout.addRow(self.timeoutLabel, self.timeoutSpinBox) |
128 | - self.leftLayout.addWidget(self.settingsGroupBox) |
129 | - self.leftLayout.addStretch() |
130 | - self.ccliGroupBox = QtGui.QGroupBox(self.rightColumn) |
131 | - self.ccliGroupBox.setObjectName(u'ccliGroupBox') |
132 | - self.ccliLayout = QtGui.QFormLayout(self.ccliGroupBox) |
133 | - self.ccliLayout.setObjectName(u'ccliLayout') |
134 | - self.numberLabel = QtGui.QLabel(self.ccliGroupBox) |
135 | - self.numberLabel.setObjectName(u'numberLabel') |
136 | - self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox) |
137 | - self.numberEdit.setValidator(QtGui.QIntValidator()) |
138 | - self.numberEdit.setObjectName(u'numberEdit') |
139 | - self.ccliLayout.addRow(self.numberLabel, self.numberEdit) |
140 | - self.usernameLabel = QtGui.QLabel(self.ccliGroupBox) |
141 | - self.usernameLabel.setObjectName(u'usernameLabel') |
142 | - self.usernameEdit = QtGui.QLineEdit(self.ccliGroupBox) |
143 | - self.usernameEdit.setObjectName(u'usernameEdit') |
144 | - self.ccliLayout.addRow(self.usernameLabel, self.usernameEdit) |
145 | - self.passwordLabel = QtGui.QLabel(self.ccliGroupBox) |
146 | - self.passwordLabel.setObjectName(u'passwordLabel') |
147 | - self.passwordEdit = QtGui.QLineEdit(self.ccliGroupBox) |
148 | - self.passwordEdit.setEchoMode(QtGui.QLineEdit.Password) |
149 | - self.passwordEdit.setObjectName(u'passwordEdit') |
150 | - self.ccliLayout.addRow(self.passwordLabel, self.passwordEdit) |
151 | - self.rightLayout.addWidget(self.ccliGroupBox) |
152 | - # Moved here from display tab |
153 | - self.displayGroupBox = QtGui.QGroupBox(self.rightColumn) |
154 | - self.displayGroupBox.setObjectName(u'displayGroupBox') |
155 | - self.displayLayout = QtGui.QGridLayout(self.displayGroupBox) |
156 | - self.displayLayout.setObjectName(u'displayLayout') |
157 | - self.overrideCheckBox = QtGui.QCheckBox(self.displayGroupBox) |
158 | - self.overrideCheckBox.setObjectName(u'overrideCheckBox') |
159 | - self.displayLayout.addWidget(self.overrideCheckBox, 2, 0, 1, 4) |
160 | - self.rightLayout.addWidget(self.displayGroupBox) |
161 | - # Custom position |
162 | - self.customXLabel = QtGui.QLabel(self.displayGroupBox) |
163 | - self.customXLabel.setObjectName(u'customXLabel') |
164 | - self.displayLayout.addWidget(self.customXLabel, 3, 0) |
165 | - self.customXValueEdit = QtGui.QSpinBox(self.displayGroupBox) |
166 | - self.customXValueEdit.setObjectName(u'customXValueEdit') |
167 | - self.customXValueEdit.setRange(-9999, 9999) |
168 | - self.displayLayout.addWidget(self.customXValueEdit, 4, 0) |
169 | - self.customYLabel = QtGui.QLabel(self.displayGroupBox) |
170 | - self.customYLabel.setObjectName(u'customYLabel') |
171 | - self.displayLayout.addWidget(self.customYLabel, 3, 1) |
172 | - self.customYValueEdit = QtGui.QSpinBox(self.displayGroupBox) |
173 | - self.customYValueEdit.setObjectName(u'customYValueEdit') |
174 | - self.customYValueEdit.setRange(-9999, 9999) |
175 | - self.displayLayout.addWidget(self.customYValueEdit, 4, 1) |
176 | - self.customWidthLabel = QtGui.QLabel(self.displayGroupBox) |
177 | - self.customWidthLabel.setObjectName(u'customWidthLabel') |
178 | - self.displayLayout.addWidget(self.customWidthLabel, 3, 2) |
179 | - self.customWidthValueEdit = QtGui.QSpinBox(self.displayGroupBox) |
180 | - self.customWidthValueEdit.setObjectName(u'customWidthValueEdit') |
181 | - self.customWidthValueEdit.setMaximum(9999) |
182 | - self.displayLayout.addWidget(self.customWidthValueEdit, 4, 2) |
183 | - self.customHeightLabel = QtGui.QLabel(self.displayGroupBox) |
184 | - self.customHeightLabel.setObjectName(u'customHeightLabel') |
185 | - self.displayLayout.addWidget(self.customHeightLabel, 3, 3) |
186 | - self.customHeightValueEdit = QtGui.QSpinBox(self.displayGroupBox) |
187 | - self.customHeightValueEdit.setObjectName(u'customHeightValueEdit') |
188 | - self.customHeightValueEdit.setMaximum(9999) |
189 | - self.displayLayout.addWidget(self.customHeightValueEdit, 4, 3) |
190 | - self.rightLayout.addWidget(self.displayGroupBox) |
191 | - # Background audio |
192 | - self.audioGroupBox = QtGui.QGroupBox(self.rightColumn) |
193 | - self.audioGroupBox.setObjectName(u'audioGroupBox') |
194 | - self.audioLayout = QtGui.QVBoxLayout(self.audioGroupBox) |
195 | - self.audioLayout.setObjectName(u'audioLayout') |
196 | - self.startPausedCheckBox = QtGui.QCheckBox(self.audioGroupBox) |
197 | - self.startPausedCheckBox.setObjectName(u'startPausedCheckBox') |
198 | - self.audioLayout.addWidget(self.startPausedCheckBox) |
199 | - self.repeatListCheckBox = QtGui.QCheckBox(self.audioGroupBox) |
200 | - self.repeatListCheckBox.setObjectName(u'repeatListCheckBox') |
201 | - self.audioLayout.addWidget(self.repeatListCheckBox) |
202 | - self.rightLayout.addWidget(self.audioGroupBox) |
203 | + self.rightLayout.addWidget(self.settingsGroupBox) |
204 | self.rightLayout.addStretch() |
205 | # Signals and slots |
206 | - QtCore.QObject.connect(self.overrideCheckBox, |
207 | - QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideCheckBoxToggled) |
208 | + QtCore.QObject.connect(self.overrideRadioButton, |
209 | + QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideRadioButtonPressed) |
210 | QtCore.QObject.connect(self.customHeightValueEdit, |
211 | QtCore.SIGNAL(u'valueChanged(int)'), self.onDisplayChanged) |
212 | QtCore.QObject.connect(self.customWidthValueEdit, |
213 | @@ -209,7 +215,7 @@ |
214 | self.tabTitleVisible = translate('OpenLP.GeneralTab', 'General') |
215 | self.monitorGroupBox.setTitle(translate('OpenLP.GeneralTab', |
216 | 'Monitors')) |
217 | - self.monitorLabel.setText(translate('OpenLP.GeneralTab', |
218 | + self.monitorRadioButton.setText(translate('OpenLP.GeneralTab', |
219 | 'Select monitor for output display:')) |
220 | self.displayOnMonitorCheck.setText( |
221 | translate('OpenLP.GeneralTab', 'Display if a single screen')) |
222 | @@ -242,10 +248,8 @@ |
223 | self.passwordLabel.setText( |
224 | translate('OpenLP.GeneralTab', 'SongSelect password:')) |
225 | # Moved from display tab |
226 | - self.displayGroupBox.setTitle( |
227 | - translate('OpenLP.GeneralTab', 'Display Position')) |
228 | - self.overrideCheckBox.setText(translate('OpenLP.GeneralTab', |
229 | - 'Override display position')) |
230 | + self.overrideRadioButton.setText(translate('OpenLP.GeneralTab', |
231 | + 'Override display position:')) |
232 | self.customXLabel.setText(translate('OpenLP.GeneralTab', 'X')) |
233 | self.customYLabel.setText(translate('OpenLP.GeneralTab', 'Y')) |
234 | self.customHeightLabel.setText(translate('OpenLP.GeneralTab', 'Height')) |
235 | @@ -291,7 +295,9 @@ |
236 | QtCore.QVariant(False)).toBool()) |
237 | self.timeoutSpinBox.setValue(settings.value(u'loop delay', |
238 | QtCore.QVariant(5)).toInt()[0]) |
239 | - self.overrideCheckBox.setChecked(settings.value(u'override position', |
240 | + self.monitorRadioButton.setChecked(not settings.value(u'override position', |
241 | + QtCore.QVariant(False)).toBool()) |
242 | + self.overrideRadioButton.setChecked(settings.value(u'override position', |
243 | QtCore.QVariant(False)).toBool()) |
244 | self.customXValueEdit.setValue(settings.value(u'x position', |
245 | QtCore.QVariant(self.screens.current[u'size'].x())).toInt()[0]) |
246 | @@ -306,10 +312,12 @@ |
247 | self.repeatListCheckBox.setChecked(settings.value( |
248 | u'audio repeat list', QtCore.QVariant(False)).toBool()) |
249 | settings.endGroup() |
250 | - self.customXValueEdit.setEnabled(self.overrideCheckBox.isChecked()) |
251 | - self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked()) |
252 | - self.customHeightValueEdit.setEnabled(self.overrideCheckBox.isChecked()) |
253 | - self.customWidthValueEdit.setEnabled(self.overrideCheckBox.isChecked()) |
254 | + self.monitorComboBox.setDisabled(self.overrideRadioButton.isChecked()) |
255 | + self.displayOnMonitorCheck.setDisabled(self.overrideRadioButton.isChecked()) |
256 | + self.customXValueEdit.setEnabled(self.overrideRadioButton.isChecked()) |
257 | + self.customYValueEdit.setEnabled(self.overrideRadioButton.isChecked()) |
258 | + self.customHeightValueEdit.setEnabled(self.overrideRadioButton.isChecked()) |
259 | + self.customWidthValueEdit.setEnabled(self.overrideRadioButton.isChecked()) |
260 | self.display_changed = False |
261 | settings.beginGroup(self.settingsSection) |
262 | |
263 | @@ -354,7 +362,7 @@ |
264 | settings.setValue(u'width', |
265 | QtCore.QVariant(self.customWidthValueEdit.value())) |
266 | settings.setValue(u'override position', |
267 | - QtCore.QVariant(self.overrideCheckBox.isChecked())) |
268 | + QtCore.QVariant(self.overrideRadioButton.isChecked())) |
269 | settings.setValue(u'audio start paused', |
270 | QtCore.QVariant(self.startPausedCheckBox.isChecked())) |
271 | settings.setValue(u'audio repeat list', |
272 | @@ -380,7 +388,7 @@ |
273 | self.customYValueEdit.value(), |
274 | self.customWidthValueEdit.value(), |
275 | self.customHeightValueEdit.value()) |
276 | - if self.overrideCheckBox.isChecked(): |
277 | + if self.overrideRadioButton.isChecked(): |
278 | self.screens.set_override_display() |
279 | else: |
280 | self.screens.reset_current_display() |
281 | @@ -388,13 +396,15 @@ |
282 | Receiver.send_message(u'config_screen_changed') |
283 | self.display_changed = False |
284 | |
285 | - def onOverrideCheckBoxToggled(self, checked): |
286 | + def onOverrideRadioButtonPressed(self, checked): |
287 | """ |
288 | Toggle screen state depending on check box state. |
289 | |
290 | ``checked`` |
291 | The state of the check box (boolean). |
292 | """ |
293 | + self.monitorComboBox.setDisabled(checked) |
294 | + self.displayOnMonitorCheck.setDisabled(checked) |
295 | self.customXValueEdit.setEnabled(checked) |
296 | self.customYValueEdit.setEnabled(checked) |
297 | self.customHeightValueEdit.setEnabled(checked) |
Looks good, but could you move some things around slightly please?
http:// imageshack. us/photo/ my-images/ 21/configuremov ements. png/