Differential D28487 Diff 81020 applets/systemmonitor/systemmonitor/faces/table/contents/ui/Config.qml
Changeset View
Changeset View
Standalone View
Standalone View
applets/systemmonitor/systemmonitor/faces/table/contents/ui/Config.qml
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2019 Marco Martin <mart@kde.org> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU Library General Public License as | ||||
6 | * published by the Free Software Foundation; either version 2, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU Library General Public | ||||
15 | * License along with this program; if not, write to the | ||||
16 | * Free Software Foundation, Inc., | ||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | import QtQuick 2.9 | ||||
21 | import QtQuick.Layouts 1.1 | ||||
22 | import QtQuick.Controls 2.2 as Controls | ||||
23 | | ||||
24 | import org.kde.kirigami 2.8 as Kirigami | ||||
25 | | ||||
26 | import org.kde.ksysguard.sensors 1.0 as Sensors | ||||
27 | | ||||
28 | Kirigami.FormLayout { | ||||
29 | id: root | ||||
30 | | ||||
31 | property alias cfg_showTableHeaders: showTableHeadersCheckbox.checked | ||||
32 | property alias cfg_sortColumn: sortColumnCombo.currentIndex | ||||
33 | property alias cfg_sortDescending: sortDescendingCheckBox.checked | ||||
34 | | ||||
35 | RowLayout { | ||||
36 | Kirigami.FormData.label: i18n("Sort by:") | ||||
37 | | ||||
38 | Controls.ComboBox { | ||||
39 | id: sortColumnCombo | ||||
40 | textRole: "display" | ||||
41 | model: Sensors.HeadingHelperModel { | ||||
42 | sourceModel: Sensors.SensorDataModel { | ||||
43 | sensors: plasmoid.configuration.sensorIds | ||||
44 | } | ||||
45 | } | ||||
46 | } | ||||
47 | | ||||
48 | Controls.CheckBox { | ||||
49 | id: sortDescendingCheckBox | ||||
50 | // or do a ComboBox like in Dolphin with pretty names "highest first"<->"lowest first"? | ||||
51 | text: i18nc("Sort descending", "Descending") | ||||
52 | } | ||||
53 | } | ||||
54 | | ||||
55 | Controls.CheckBox { | ||||
56 | id: showTableHeadersCheckbox | ||||
57 | text: i18n("Show table headers") | ||||
58 | } | ||||
59 | } | ||||
60 | |