slint/examples/printerdemo/ui/scan_page.60
Olivier Goffart 07e2532c0b Printer Demo: rename PrinterQueue component
PrinterQueue -> PrineterQueueView
PrinterQueueData -> PrinterQueue
2021-08-27 16:55:07 +02:00

102 lines
2.8 KiB
Text

/* LICENSE BEGIN
This file is part of the SixtyFPS Project -- https://sixtyfps.io
Copyright (c) 2021 Olivier Goffart <olivier.goffart@sixtyfps.io>
Copyright (c) 2021 Simon Hausmann <simon.hausmann@sixtyfps.io>
SPDX-License-Identifier: GPL-3.0-only
This file is also available under commercial licensing terms.
Please contact info@sixtyfps.io for more information.
LICENSE END */
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton } from "./common.60";
import { PrinterQueue } from "./printer_queue.60";
export ScanPage := Page {
has-back-button: true;
header: "Scan";
GridLayout {
padding-top: 46px /* header line height in design */
+ /* extra top-padding in design */ 27px;
spacing: 24px;
Row {
Text {
text: "Choose Settings";
color: DemoPalette.secondary-foreground-color;
font-size: DemoPalette.base-font-size * 1.125;
font-weight: 800;
}
}
Row {
Label { text: "Copies"; }
SpinBox {
value: 1;
minimum: 1;
}
Rectangle {}
Label { text: "Size"; }
ComboBox {
value: "Original";
choices: ["Original", "A4"];
}
}
Row {
Label { text: "Quality"; }
ComboBox {
value: "Best";
choices: ["Best", "Medium", "Draft"];
}
Rectangle {}
Label { text: "Format"; }
ComboBox {
value: "PDF";
choices: ["PDF", "JPEG", "PNG"];
}
}
Row {
Label { text: "Color"; }
ComboBox {
value: "Grayscale";
choices: ["Grayscale", "RGB", "YCMB"];
}
Rectangle {}
Label { text: "Save to"; }
ComboBox {
value: "Desktop";
choices: ["Desktop"];
}
}
Row {
Rectangle {
colspan: 3;
}
HorizontalLayout {
col: 3;
colspan: 2;
Rectangle {
horizontal-stretch: 0;
width: 10%;
}
PushButton {
icon: @image-url("images/scan.svg");
text: "Start scanning";
clicked => {
PrinterQueue.start-job("Scan");
}
}
Rectangle {
horizontal-stretch: 0;
width: 10%;
}
}
}
Row { Rectangle {} }
}
}