Changeset View
Changeset View
Standalone View
Standalone View
applets/digital-clock/package/contents/ui/configAppearance.qml
Context not available. | |||||
45 | property alias cfg_showDate: showDate.checked | 45 | property alias cfg_showDate: showDate.checked | ||
---|---|---|---|---|---|
46 | property string cfg_dateFormat: "shortDate" | 46 | property string cfg_dateFormat: "shortDate" | ||
47 | property alias cfg_use24hFormat: use24hFormat.checked | 47 | property alias cfg_use24hFormat: use24hFormat.checked | ||
48 | | ||||
49 | property string cfg_customDateFormat: "" | ||||
48 | 50 | | |||
49 | onCfg_fontFamilyChanged: { | 51 | onCfg_fontFamilyChanged: { | ||
50 | // HACK by the time we populate our model and/or the ComboBox is finished the value is still undefined | 52 | // HACK by the time we populate our model and/or the ComboBox is finished the value is still undefined | ||
Context not available. | |||||
57 | } | 59 | } | ||
58 | } | 60 | } | ||
59 | } | 61 | } | ||
62 | | ||||
63 | onCfg_customDateFormatChanged:{ | ||||
64 | appearancePage.configurationChanged() | ||||
65 | } | ||||
60 | 66 | | |||
61 | ListModel { | 67 | ListModel { | ||
62 | id: fontsModel | 68 | id: fontsModel | ||
Context not available. | |||||
137 | { | 143 | { | ||
138 | 'label': i18n("ISO Date"), | 144 | 'label': i18n("ISO Date"), | ||
139 | 'name': "isoDate" | 145 | 'name': "isoDate" | ||
146 | }, | ||||
147 | { | ||||
148 | 'label': i18n("Custom"), | ||||
149 | 'name': "customDate" | ||||
140 | } | 150 | } | ||
141 | ] | 151 | ] | ||
142 | onCurrentIndexChanged: cfg_dateFormat = model[currentIndex]["name"] | 152 | onCurrentIndexChanged: cfg_dateFormat = model[currentIndex]["name"] | ||
Context not available. | |||||
149 | } | 159 | } | ||
150 | } | 160 | } | ||
151 | } | 161 | } | ||
162 | | ||||
163 | QtControls.TextField{ | ||||
164 | id: customDateFormat | ||||
165 | | ||||
166 | text: cfg_customDateFormat | ||||
167 | visible: cfg_dateFormat == "customDate" | ||||
168 | | ||||
169 | onEditingFinished:{ | ||||
170 | cfg_customDateFormat = text | ||||
171 | } | ||||
172 | | ||||
173 | Component.onCompleted: { | ||||
174 | text = plasmoid.configuration.customDateFormat | ||||
175 | } | ||||
176 | } | ||||
152 | 177 | | |||
153 | Item { | 178 | Item { | ||
154 | Kirigami.FormData.isSection: true | 179 | Kirigami.FormData.isSection: true | ||
Context not available. | |||||
209 | } else { | 234 | } else { | ||
210 | timezoneCityRadio.checked = true; | 235 | timezoneCityRadio.checked = true; | ||
211 | } | 236 | } | ||
237 | | ||||
238 | cfg_customDateFormat = plasmoid.configuration.customDateFormat | ||||
212 | } | 239 | } | ||
213 | } | 240 | } | ||
Context not available. |