Changeset View
Changeset View
Standalone View
Standalone View
applets/timer/package/contents/ui/configAdvanced.qml
Show All 10 Lines | |||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.2 | 19 | import QtQuick 2.5 | ||
20 | import QtQuick.Controls 1.3 as QtControls | 20 | import QtQuick.Controls 2.5 as QQC2 | ||
21 | import QtQuick.Layouts 1.0 as QtLayouts | 21 | import QtQuick.Layouts 1.0 | ||
22 | 22 | | |||
23 | QtLayouts.ColumnLayout { | 23 | import org.kde.kirigami 2.5 as Kirigami | ||
24 | | ||||
25 | Kirigami.FormLayout { | ||||
24 | id: generalPage | 26 | id: generalPage | ||
25 | 27 | | |||
26 | property alias cfg_runCommand: runCommand.checked | 28 | property alias cfg_runCommand: runCommand.checked | ||
27 | property alias cfg_command: command.text | 29 | property alias cfg_command: command.text | ||
28 | 30 | | |||
29 | QtControls.GroupBox { | 31 | RowLayout { | ||
30 | id: runCommandGroup | 32 | Layout.fillWidth: true | ||
31 | | ||||
32 | QtLayouts.Layout.fillWidth: true | | |||
33 | flat: true | | |||
34 | | ||||
35 | title: i18nc("@title:group", "Run Command") | | |||
36 | 33 | | |||
37 | QtLayouts.ColumnLayout { | 34 | Kirigami.FormData.label: i18nc("@title:label", "After timer completes:") | ||
38 | anchors.fill: parent | | |||
39 | 35 | | |||
40 | QtControls.CheckBox { | 36 | QQC2.CheckBox { | ||
41 | id: runCommand | 37 | id: runCommand | ||
42 | text: i18nc("@option:check", "Execute command") | 38 | text: i18nc("@option:check", "Execute command:") | ||
43 | onClicked: { | 39 | onClicked: { | ||
44 | if (checked) { | 40 | if (checked) { | ||
45 | command.forceActiveFocus(); | 41 | command.forceActiveFocus(); | ||
46 | } | 42 | } | ||
47 | } | 43 | } | ||
48 | } | 44 | } | ||
49 | 45 | | |||
50 | QtLayouts.RowLayout { | 46 | QQC2.TextField { | ||
51 | QtControls.Label { | | |||
52 | enabled: runCommand.checked | | |||
53 | text: i18nc("@label:textbox", "Command:") | | |||
54 | } | | |||
55 | QtControls.TextField { | | |||
56 | id: command | 47 | id: command | ||
57 | QtLayouts.Layout.fillWidth: true | 48 | Layout.fillWidth: true | ||
58 | enabled: runCommand.checked | 49 | enabled: runCommand.checked | ||
59 | } | 50 | } | ||
60 | } | 51 | } | ||
61 | } | 52 | } | ||
62 | } | | |||
63 | | ||||
64 | Item { // tighten layout | | |||
65 | QtLayouts.Layout.fillHeight: true | | |||
66 | } | | |||
67 | } | | |||
68 | 53 | |