Changeset View
Changeset View
Standalone View
Standalone View
kcm/package/contents/ui/main.qml
Show All 35 Lines | 33 | Kirigami.InlineMessage { | |||
---|---|---|---|---|---|
36 | // Note2: This should maybe go in header component of the KCM, | 36 | // Note2: This should maybe go in header component of the KCM, | ||
37 | // but there seems to be another issue in Kirigami then | 37 | // but there seems to be another issue in Kirigami then | ||
38 | // being always hidden. Compare Night Color KCM with | 38 | // being always hidden. Compare Night Color KCM with | ||
39 | // the same issue. | 39 | // the same issue. | ||
40 | id: dangerousSaveMsg | 40 | id: dangerousSaveMsg | ||
41 | 41 | | |||
42 | Layout.fillWidth: true | 42 | Layout.fillWidth: true | ||
43 | type: Kirigami.MessageType.Warning | 43 | type: Kirigami.MessageType.Warning | ||
44 | text: i18n("Are you sure you want to disable all outputs? " + | 44 | text: i18n("Are you sure you want to disable all outputs? This might render the device unusable.") | ||
45 | "This might render the device unusable.") | | |||
46 | showCloseButton: true | 45 | showCloseButton: true | ||
47 | 46 | | |||
48 | actions: [ | 47 | actions: [ | ||
49 | Kirigami.Action { | 48 | Kirigami.Action { | ||
50 | iconName: "dialog-ok" | 49 | iconName: "dialog-ok" | ||
51 | text: i18n("Disable all outputs") | 50 | text: i18n("Disable All Outputs") | ||
52 | onTriggered: { | 51 | onTriggered: { | ||
53 | dangerousSaveMsg.visible = false; | 52 | dangerousSaveMsg.visible = false; | ||
54 | kcm.forceSave(); | 53 | kcm.forceSave(); | ||
55 | } | 54 | } | ||
56 | } | 55 | } | ||
57 | ] | 56 | ] | ||
58 | } | 57 | } | ||
59 | Kirigami.InlineMessage { | 58 | Kirigami.InlineMessage { | ||
Show All 11 Lines | 66 | Kirigami.InlineMessage { | |||
71 | text: i18n("Outputs could not be saved due to error.") | 70 | text: i18n("Outputs could not be saved due to error.") | ||
72 | visible: false | 71 | visible: false | ||
73 | showCloseButton: true | 72 | showCloseButton: true | ||
74 | } | 73 | } | ||
75 | Kirigami.InlineMessage { | 74 | Kirigami.InlineMessage { | ||
76 | id: scaleMsg | 75 | id: scaleMsg | ||
77 | Layout.fillWidth: true | 76 | Layout.fillWidth: true | ||
78 | type: Kirigami.MessageType.Positive | 77 | type: Kirigami.MessageType.Positive | ||
79 | text: i18n("New global scale applied. " + | 78 | text: i18n("New global scale applied. Change will come into effect after restart.") | ||
80 | "Change will come into effect after restart.") | | |||
81 | visible: false | 79 | visible: false | ||
82 | showCloseButton: true | 80 | showCloseButton: true | ||
83 | } | 81 | } | ||
84 | Kirigami.InlineMessage { | 82 | Kirigami.InlineMessage { | ||
85 | id: connectMsg | 83 | id: connectMsg | ||
86 | Layout.fillWidth: true | 84 | Layout.fillWidth: true | ||
87 | type: Kirigami.MessageType.Information | 85 | type: Kirigami.MessageType.Information | ||
88 | visible: false | 86 | visible: false | ||
89 | showCloseButton: true | 87 | showCloseButton: true | ||
90 | } | 88 | } | ||
91 | 89 | | |||
92 | Connections { | 90 | Connections { | ||
93 | target: kcm | 91 | target: kcm | ||
94 | onDangerousSave: dangerousSaveMsg.visible = true; | 92 | onDangerousSave: dangerousSaveMsg.visible = true; | ||
95 | onErrorOnSave: errSaveMsg.visible = true; | 93 | onErrorOnSave: errSaveMsg.visible = true; | ||
96 | onGlobalScaleWritten: scaleMsg.visible = true; | 94 | onGlobalScaleWritten: scaleMsg.visible = true; | ||
97 | onOutputConnect: { | 95 | onOutputConnect: { | ||
98 | if (connected) { | 96 | if (connected) { | ||
99 | connectMsg.text = i18n("A new output has been added. " + | 97 | connectMsg.text = i18n("A new output has been added. Settings have been reloaded."); | ||
100 | " Settings have been reloaded."); | | |||
101 | } else { | 98 | } else { | ||
102 | connectMsg.text = i18n("An output has been removed. " + | 99 | connectMsg.text = i18n("An output has been removed. Settings have been reloaded."); | ||
103 | " Settings have been reloaded."); | | |||
104 | } | 100 | } | ||
105 | connectMsg.visible = true; | 101 | connectMsg.visible = true; | ||
106 | } | 102 | } | ||
107 | onBackendError: errBackendMsg.visible = true; | 103 | onBackendError: errBackendMsg.visible = true; | ||
108 | 104 | | |||
109 | onChanged: { | 105 | onChanged: { | ||
110 | dangerousSaveMsg.visible = false; | 106 | dangerousSaveMsg.visible = false; | ||
111 | errSaveMsg.visible = false; | 107 | errSaveMsg.visible = false; | ||
Show All 22 Lines |