Changeset View
Changeset View
Standalone View
Standalone View
applets/systemloadviewer/package/contents/ui/ColorSettings.qml
Show All 15 Lines | |||||
16 | * | 16 | * | ||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/> | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/> | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | import QtQuick 2.2 | 21 | import QtQuick 2.2 | ||
22 | import QtQuick.Controls 1.2 | 22 | import QtQuick.Controls 1.2 | ||
23 | import QtQuick.Layouts 1.0 | 23 | import QtQuick.Layouts 1.0 | ||
24 | import org.kde.kquickcontrols 2.0 as KQuickControls | ||||
24 | 25 | | |||
25 | ColumnLayout { | 26 | ColumnLayout { | ||
26 | id: colorSettings | 27 | id: colorSettings | ||
27 | 28 | | |||
28 | property alias cfg_memApplicationColor: memApplicationColorPicker.chosenColor | 29 | property alias cfg_memApplicationColor: memApplicationColorPicker.color | ||
29 | property alias cfg_memBuffersColor: memBuffersColorPicker.chosenColor | 30 | property alias cfg_memBuffersColor: memBuffersColorPicker.color | ||
30 | property alias cfg_memCachedColor: memCachedColorPicker.chosenColor | 31 | property alias cfg_memCachedColor: memCachedColorPicker.color | ||
31 | property alias cfg_cpuUserColor: cpuUserColorPicker.chosenColor | 32 | property alias cfg_cpuUserColor: cpuUserColorPicker.color | ||
32 | property alias cfg_cpuIOWaitColor: cpuIOWaitColorPicker.chosenColor | 33 | property alias cfg_cpuIOWaitColor: cpuIOWaitColorPicker.color | ||
33 | property alias cfg_cpuSysColor: cpuSysColorPicker.chosenColor | 34 | property alias cfg_cpuSysColor: cpuSysColorPicker.color | ||
34 | property alias cfg_cpuNiceColor: cpuNiceColorPicker.chosenColor | 35 | property alias cfg_cpuNiceColor: cpuNiceColorPicker.color | ||
35 | property alias cfg_swapUsedColor: swapUsedColorPicker.chosenColor | 36 | property alias cfg_swapUsedColor: swapUsedColorPicker.color | ||
36 | property alias cfg_cacheDirtyColor: cacheDirtyColorPicker.chosenColor | 37 | property alias cfg_cacheDirtyColor: cacheDirtyColorPicker.color | ||
37 | property alias cfg_cacheWritebackColor: cacheWritebackColorPicker.chosenColor | 38 | property alias cfg_cacheWritebackColor: cacheWritebackColorPicker.color | ||
38 | property alias cfg_setColorsManually: setColorsManuallyGroupBox.checked | 39 | property alias cfg_setColorsManually: setColorsManuallyGroupBox.checked | ||
39 | 40 | | |||
40 | GroupBox { | 41 | GroupBox { | ||
41 | id: setColorsManuallyGroupBox | 42 | id: setColorsManuallyGroupBox | ||
42 | Layout.fillWidth: true | 43 | Layout.fillWidth: true | ||
43 | title: i18n("Set colors manually") | 44 | title: i18n("Set colors manually") | ||
44 | checkable: true | 45 | checkable: true | ||
45 | flat: true | 46 | flat: true | ||
46 | GridLayout { | 47 | GridLayout { | ||
47 | columns: 2 | 48 | columns: 2 | ||
48 | 49 | | |||
49 | Label { | 50 | Label { | ||
50 | text: i18n("CPU") | 51 | text: i18n("CPU") | ||
51 | Layout.columnSpan: 2 | 52 | Layout.columnSpan: 2 | ||
52 | font.bold: true | 53 | font.bold: true | ||
53 | } | 54 | } | ||
54 | 55 | | |||
55 | Label { | 56 | Label { | ||
56 | text: i18n("User:") | 57 | text: i18n("User:") | ||
57 | Layout.alignment: Qt.AlignRight | 58 | Layout.alignment: Qt.AlignRight | ||
58 | } | 59 | } | ||
59 | 60 | | |||
60 | ColorPicker { | 61 | KQuickControls.ColorButton { | ||
61 | id: cpuUserColorPicker | 62 | id: cpuUserColorPicker | ||
62 | } | 63 | } | ||
63 | 64 | | |||
64 | Label { | 65 | Label { | ||
65 | text: i18n("IOWait:") | 66 | text: i18n("IOWait:") | ||
66 | Layout.alignment: Qt.AlignRight | 67 | Layout.alignment: Qt.AlignRight | ||
67 | } | 68 | } | ||
68 | 69 | | |||
69 | ColorPicker { | 70 | KQuickControls.ColorButton { | ||
70 | id: cpuIOWaitColorPicker | 71 | id: cpuIOWaitColorPicker | ||
71 | } | 72 | } | ||
72 | 73 | | |||
73 | Label { | 74 | Label { | ||
74 | text: i18n("Sys:") | 75 | text: i18n("Sys:") | ||
75 | Layout.alignment: Qt.AlignRight | 76 | Layout.alignment: Qt.AlignRight | ||
76 | } | 77 | } | ||
77 | 78 | | |||
78 | ColorPicker { | 79 | KQuickControls.ColorButton { | ||
79 | id: cpuSysColorPicker | 80 | id: cpuSysColorPicker | ||
80 | } | 81 | } | ||
81 | 82 | | |||
82 | Label { | 83 | Label { | ||
83 | text: i18n("Nice:") | 84 | text: i18n("Nice:") | ||
84 | Layout.alignment: Qt.AlignRight | 85 | Layout.alignment: Qt.AlignRight | ||
85 | } | 86 | } | ||
86 | 87 | | |||
87 | ColorPicker { | 88 | KQuickControls.ColorButton { | ||
88 | id: cpuNiceColorPicker | 89 | id: cpuNiceColorPicker | ||
89 | } | 90 | } | ||
90 | 91 | | |||
91 | Label { | 92 | Label { | ||
92 | text: i18n("Memory") | 93 | text: i18n("Memory") | ||
93 | Layout.columnSpan: 2 | 94 | Layout.columnSpan: 2 | ||
94 | font.bold: true | 95 | font.bold: true | ||
95 | } | 96 | } | ||
96 | 97 | | |||
97 | 98 | | |||
98 | Label { | 99 | Label { | ||
99 | text: i18n("Application:") | 100 | text: i18n("Application:") | ||
100 | Layout.alignment: Qt.AlignRight | 101 | Layout.alignment: Qt.AlignRight | ||
101 | } | 102 | } | ||
102 | 103 | | |||
103 | ColorPicker { | 104 | KQuickControls.ColorButton { | ||
104 | id: memApplicationColorPicker | 105 | id: memApplicationColorPicker | ||
105 | } | 106 | } | ||
106 | 107 | | |||
107 | Label { | 108 | Label { | ||
108 | text: i18n("Buffers:") | 109 | text: i18n("Buffers:") | ||
109 | Layout.alignment: Qt.AlignRight | 110 | Layout.alignment: Qt.AlignRight | ||
110 | } | 111 | } | ||
111 | 112 | | |||
112 | ColorPicker { | 113 | KQuickControls.ColorButton { | ||
113 | id: memBuffersColorPicker | 114 | id: memBuffersColorPicker | ||
114 | } | 115 | } | ||
115 | 116 | | |||
116 | Label { | 117 | Label { | ||
117 | text: i18n("Cached:") | 118 | text: i18n("Cached:") | ||
118 | Layout.alignment: Qt.AlignRight | 119 | Layout.alignment: Qt.AlignRight | ||
119 | } | 120 | } | ||
120 | 121 | | |||
121 | ColorPicker { | 122 | KQuickControls.ColorButton { | ||
122 | id: memCachedColorPicker | 123 | id: memCachedColorPicker | ||
123 | } | 124 | } | ||
124 | 125 | | |||
125 | Label { | 126 | Label { | ||
126 | text: i18n("Swap") | 127 | text: i18n("Swap") | ||
127 | Layout.columnSpan: 2 | 128 | Layout.columnSpan: 2 | ||
128 | font.bold: true | 129 | font.bold: true | ||
129 | } | 130 | } | ||
130 | 131 | | |||
131 | 132 | | |||
132 | Label { | 133 | Label { | ||
133 | text: i18n("Used swap:") | 134 | text: i18n("Used swap:") | ||
134 | Layout.alignment: Qt.AlignRight | 135 | Layout.alignment: Qt.AlignRight | ||
135 | } | 136 | } | ||
136 | 137 | | |||
137 | ColorPicker { | 138 | KQuickControls.ColorButton { | ||
138 | id: swapUsedColorPicker | 139 | id: swapUsedColorPicker | ||
139 | } | 140 | } | ||
140 | 141 | | |||
141 | Label { | 142 | Label { | ||
142 | text: i18n("Cache") | 143 | text: i18n("Cache") | ||
143 | Layout.columnSpan: 2 | 144 | Layout.columnSpan: 2 | ||
144 | font.bold: true | 145 | font.bold: true | ||
145 | } | 146 | } | ||
146 | 147 | | |||
147 | Label { | 148 | Label { | ||
148 | text: i18n("Dirty memory:") | 149 | text: i18n("Dirty memory:") | ||
149 | Layout.alignment: Qt.AlignRight | 150 | Layout.alignment: Qt.AlignRight | ||
150 | } | 151 | } | ||
151 | 152 | | |||
152 | ColorPicker { | 153 | KQuickControls.ColorButton { | ||
153 | id: cacheDirtyColorPicker | 154 | id: cacheDirtyColorPicker | ||
154 | } | 155 | } | ||
155 | 156 | | |||
156 | Label { | 157 | Label { | ||
157 | text: i18n("Writeback memory:") | 158 | text: i18n("Writeback memory:") | ||
158 | Layout.alignment: Qt.AlignRight | 159 | Layout.alignment: Qt.AlignRight | ||
159 | } | 160 | } | ||
160 | 161 | | |||
161 | ColorPicker { | 162 | KQuickControls.ColorButton { | ||
162 | id: cacheWritebackColorPicker | 163 | id: cacheWritebackColorPicker | ||
163 | } | 164 | } | ||
164 | } | 165 | } | ||
165 | } | 166 | } | ||
166 | 167 | | |||
167 | Item { | 168 | Item { | ||
168 | Layout.fillHeight: true | 169 | Layout.fillHeight: true | ||
169 | } | 170 | } | ||
170 | } | 171 | } |