~ahayzen/ubuntu-printing-app/rearrange-folders

« back to all changes in this revision

Viewing changes to ubuntu-printing-app/pages/PrintPage.qml

  • Committer: Andrew Hayzen
  • Date: 2017-03-15 11:49:25 UTC
  • mfrom: (23.1.63 additional-fixes)
  • Revision ID: ahayzen@gmail.com-20170315114925-o21g3wwwfivap3yz
* Rebase on lp:~ahayzen/ubuntu-printing-app/additional-fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
            PreviewRow {
71
71
                document: currentDocument
 
72
                monitorMouseArea: globalMouseArea
72
73
                Layout.fillHeight: true
73
74
                printerJob: printing.printerJob
74
75
                view: scrollView
124
125
                }
125
126
            }
126
127
 
127
 
            CheckBoxRow {
128
 
                id: checkboxSelector
129
 
                checkboxText: i18n.tr("Collate")
130
 
                enabled: printing.printerJob.copies > 1 && printing.isLoaded && !printing.pdfMode
131
 
                objectName: "collateCheckBox"
132
 
 
133
 
                onCheckedChanged: {
134
 
                    if (printing.printerJob.collate !== checked) {
135
 
                        printing.printerJob.collate = checked
136
 
                    }
137
 
                }
138
 
 
139
 
                Binding {
140
 
                    target: checkboxSelector
141
 
                    property: "checked"
142
 
                    when: printing.printerJob
143
 
                    value: printing.printerJob.collate
144
 
                }
145
 
            }
146
 
 
147
 
            CheckBoxRow {
148
 
                id: reverseSelector
149
 
                checkboxText: i18n.tr("Reverse")
150
 
                enabled: printing.isLoaded && !printing.pdfMode
151
 
                objectName: "reverseCheckBox"
152
 
 
153
 
                onCheckedChanged: {
154
 
                    if (printing.printerJob.reverse !== checked) {
155
 
                        printing.printerJob.reverse = checked
156
 
                    }
157
 
                }
158
 
 
159
 
                Binding {
160
 
                    target: reverseSelector
161
 
                    property: "checked"
162
 
                    when: printing.printerJob
163
 
                    value: printing.printerJob.reverse
164
 
                }
165
 
            }
166
 
 
167
128
            SelectorRow {
168
129
                id: pageRangeSelector
169
130
                enabled: printing.isLoaded && !printing.pdfMode
280
241
                }
281
242
            }
282
243
 
 
244
            CheckBoxRow {
 
245
                id: checkboxSelector
 
246
                checkboxText: i18n.tr("Collate")
 
247
                enabled: printing.printerJob.copies > 1 && printing.isLoaded && !printing.pdfMode
 
248
                objectName: "collateCheckBox"
 
249
 
 
250
                onCheckedChanged: {
 
251
                    if (printing.printerJob.collate !== checked) {
 
252
                        printing.printerJob.collate = checked
 
253
                    }
 
254
                }
 
255
 
 
256
                Binding {
 
257
                    target: checkboxSelector
 
258
                    property: "checked"
 
259
                    when: printing.printerJob
 
260
                    value: printing.printerJob.collate
 
261
                }
 
262
            }
 
263
 
 
264
            CheckBoxRow {
 
265
                id: reverseSelector
 
266
                checkboxText: i18n.tr("Reverse")
 
267
                enabled: printing.isLoaded && !printing.pdfMode
 
268
                objectName: "reverseCheckBox"
 
269
 
 
270
                onCheckedChanged: {
 
271
                    if (printing.printerJob.reverse !== checked) {
 
272
                        printing.printerJob.reverse = checked
 
273
                    }
 
274
                }
 
275
 
 
276
                Binding {
 
277
                    target: reverseSelector
 
278
                    property: "checked"
 
279
                    when: printing.printerJob
 
280
                    value: printing.printerJob.reverse
 
281
                }
 
282
            }
 
283
 
283
284
            Item {
284
285
                height: units.gu(2)
285
286
                width: parent.width
306
307
        onCancel: page.cancel()
307
308
        onConfirm: page.confirm(document.url)
308
309
    }
 
310
 
 
311
    // ScrollView has a MouseArea which doesn't propagate hover events
 
312
    // so this is used to monitor for these events
 
313
    MouseArea {
 
314
        id: globalMouseArea
 
315
        anchors {
 
316
            fill: parent
 
317
        }
 
318
        acceptedButtons: Qt.NoButton
 
319
        hoverEnabled: true
 
320
    }
309
321
}