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? ") + | ||
45 | "This might render the device unusable.") | 45 | i18n("This might render the device unusable.") | ||
46 | showCloseButton: true | 46 | showCloseButton: true | ||
47 | 47 | | |||
48 | actions: [ | 48 | actions: [ | ||
49 | Kirigami.Action { | 49 | Kirigami.Action { | ||
50 | iconName: "dialog-ok" | 50 | iconName: "dialog-ok" | ||
51 | text: i18n("Disable all outputs") | 51 | text: i18n("Disable all outputs") | ||
52 | onTriggered: { | 52 | onTriggered: { | ||
53 | dangerousSaveMsg.visible = false; | 53 | dangerousSaveMsg.visible = false; | ||
Show All 17 Lines | 67 | Kirigami.InlineMessage { | |||
71 | text: i18n("Outputs could not be saved due to error.") | 71 | text: i18n("Outputs could not be saved due to error.") | ||
72 | visible: false | 72 | visible: false | ||
73 | showCloseButton: true | 73 | showCloseButton: true | ||
74 | } | 74 | } | ||
75 | Kirigami.InlineMessage { | 75 | Kirigami.InlineMessage { | ||
76 | id: scaleMsg | 76 | id: scaleMsg | ||
77 | Layout.fillWidth: true | 77 | Layout.fillWidth: true | ||
78 | type: Kirigami.MessageType.Positive | 78 | type: Kirigami.MessageType.Positive | ||
79 | text: i18n("New global scale applied. " + | 79 | text: i18n("New global scale applied. ") + | ||
80 | "Change will come into effect after restart.") | 80 | i18n("Change will come into effect after restart.") | ||
81 | visible: false | 81 | visible: false | ||
82 | showCloseButton: true | 82 | showCloseButton: true | ||
83 | } | 83 | } | ||
84 | Kirigami.InlineMessage { | 84 | Kirigami.InlineMessage { | ||
85 | id: connectMsg | 85 | id: connectMsg | ||
86 | Layout.fillWidth: true | 86 | Layout.fillWidth: true | ||
87 | type: Kirigami.MessageType.Information | 87 | type: Kirigami.MessageType.Information | ||
88 | visible: false | 88 | visible: false | ||
89 | showCloseButton: true | 89 | showCloseButton: true | ||
90 | } | 90 | } | ||
91 | 91 | | |||
92 | Connections { | 92 | Connections { | ||
93 | target: kcm | 93 | target: kcm | ||
94 | onDangerousSave: dangerousSaveMsg.visible = true; | 94 | onDangerousSave: dangerousSaveMsg.visible = true; | ||
95 | onErrorOnSave: errSaveMsg.visible = true; | 95 | onErrorOnSave: errSaveMsg.visible = true; | ||
96 | onGlobalScaleWritten: scaleMsg.visible = true; | 96 | onGlobalScaleWritten: scaleMsg.visible = true; | ||
97 | onOutputConnect: { | 97 | onOutputConnect: { | ||
98 | if (connected) { | 98 | if (connected) { | ||
99 | connectMsg.text = i18n("A new output has been added. " + | 99 | connectMsg.text = i18n("A new output has been added. ") + | ||
100 | " Settings have been reloaded."); | 100 | i18n("Settings have been reloaded."); | ||
101 | } else { | 101 | } else { | ||
102 | connectMsg.text = i18n("An output has been removed. " + | 102 | connectMsg.text = i18n("An output has been removed. ") + | ||
103 | " Settings have been reloaded."); | 103 | i18n("Settings have been reloaded."); | ||
104 | } | 104 | } | ||
105 | connectMsg.visible = true; | 105 | connectMsg.visible = true; | ||
106 | } | 106 | } | ||
107 | onBackendErrorChanged: errBackendMsg.visible = kcm.backendError | 107 | onBackendErrorChanged: errBackendMsg.visible = kcm.backendError | ||
108 | 108 | | |||
109 | onChanged: { | 109 | onChanged: { | ||
110 | dangerousSaveMsg.visible = false; | 110 | dangerousSaveMsg.visible = false; | ||
111 | errSaveMsg.visible = false; | 111 | errSaveMsg.visible = false; | ||
Show All 17 Lines |