Changeset View
Changeset View
Standalone View
Standalone View
plasmoid/package/contents/ui/PopupDialog.qml
Show All 23 Lines | |||||
24 | import org.kde.plasma.components 2.0 as PlasmaComponents | 24 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
25 | import org.kde.plasma.printmanager 0.2 as PrintManager | 25 | import org.kde.plasma.printmanager 0.2 as PrintManager | ||
26 | 26 | | |||
27 | FocusScope { | 27 | FocusScope { | ||
28 | id: dialog | 28 | id: dialog | ||
29 | 29 | | |||
30 | property bool scrollBarVisible: printersView.contentHeight > scrollArea.height | 30 | property bool scrollBarVisible: printersView.contentHeight > scrollArea.height | ||
31 | property bool searchBarVisible: scrollBarVisible || searchBar.text.length !== 0 | 31 | property bool searchBarVisible: scrollBarVisible || searchBar.text.length !== 0 | ||
32 | property string printersModelError: "" | | |||
33 | property alias serverUnavailable: printersModel.serverUnavailable | | |||
34 | 32 | | |||
35 | state: printersFilterModel.count > 0 ? "JOBS_PRINTER" : "NO_PRINTER" | 33 | state: printersFilterModel.count > 0 ? "JOBS_PRINTER" : "NO_PRINTER" | ||
36 | 34 | | |||
37 | TextField { | 35 | TextField { | ||
38 | id: searchBar | 36 | id: searchBar | ||
39 | 37 | | |||
40 | anchors { | 38 | anchors { | ||
41 | left: parent.left | 39 | left: parent.left | ||
Show All 11 Lines | |||||
53 | } | 51 | } | ||
54 | 52 | | |||
55 | PrintManager.ProcessRunner { | 53 | PrintManager.ProcessRunner { | ||
56 | id: processRunner | 54 | id: processRunner | ||
57 | } | 55 | } | ||
58 | 56 | | |||
59 | PrintManager.PrinterSortFilterModel { | 57 | PrintManager.PrinterSortFilterModel { | ||
60 | id: printersFilterModel | 58 | id: printersFilterModel | ||
61 | sourceModel: PrintManager.PrinterModel { | 59 | sourceModel: printersModel | ||
62 | id: printersModel | | |||
63 | onError: printersModelError = errorTitle | | |||
64 | } | | |||
65 | } | 60 | } | ||
66 | 61 | | |||
67 | PlasmaExtras.ScrollArea { | 62 | PlasmaExtras.ScrollArea { | ||
68 | id: scrollArea | 63 | id: scrollArea | ||
69 | anchors { | 64 | anchors { | ||
70 | bottom: parent.bottom | 65 | bottom: parent.bottom | ||
71 | left: parent.left | 66 | left: parent.left | ||
72 | right: parent.right | 67 | right: parent.right | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |