mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-16 15:19:58 +00:00
* end work on #68
* create special class for configuration * update clion settings
This commit is contained in:
@ -25,7 +25,7 @@ import org.kde.plasma.private.awesomewidget 1.0
|
||||
Item {
|
||||
id: aboutPage
|
||||
AWActions {
|
||||
id: awActions;
|
||||
id: awActions
|
||||
}
|
||||
|
||||
width: childrenRect.width
|
||||
|
@ -25,7 +25,10 @@ Item {
|
||||
id: advancedPage
|
||||
// backend
|
||||
AWActions {
|
||||
id: awActions;
|
||||
id: awActions
|
||||
}
|
||||
AWConfigHelper {
|
||||
id: awConfig
|
||||
}
|
||||
|
||||
width: childrenRect.width
|
||||
@ -368,7 +371,7 @@ Item {
|
||||
QtControls.Button {
|
||||
width: parent.width * 3 / 5
|
||||
text: i18n("Export configuration")
|
||||
onClicked: awActions.exportConfiguration(plasmoid.configuration)
|
||||
onClicked: awConfig.exportConfiguration(plasmoid.configuration)
|
||||
}
|
||||
}
|
||||
|
||||
@ -383,7 +386,10 @@ Item {
|
||||
width: parent.width * 3 / 5
|
||||
text: i18n("Import configuration")
|
||||
onClicked: {
|
||||
console.log(awActions.importConfiguration())
|
||||
if (debug) console.debug()
|
||||
var importConfig = awConfig.importConfiguration()
|
||||
for (var key in importConfig)
|
||||
plasmoid.configuration[key] = importConfig[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ Item {
|
||||
id: appearancePage
|
||||
// backend
|
||||
AWActions {
|
||||
id: awActions;
|
||||
id: awActions
|
||||
}
|
||||
|
||||
width: childrenRect.width
|
||||
|
@ -26,10 +26,13 @@ Item {
|
||||
id: dataenginePage
|
||||
// backend
|
||||
AWKeys {
|
||||
id: awKeys;
|
||||
id: awKeys
|
||||
}
|
||||
AWActions {
|
||||
id: awActions;
|
||||
id: awActions
|
||||
}
|
||||
AWConfigHelper {
|
||||
id: awConfig
|
||||
}
|
||||
|
||||
width: childrenRect.width
|
||||
@ -39,7 +42,7 @@ Item {
|
||||
|
||||
property bool debug: awActions.isDebugEnabled()
|
||||
|
||||
property variant cfg_dataengine: awActions.readDataEngineConfiguration()
|
||||
property variant cfg_dataengine: awConfig.readDataEngineConfiguration()
|
||||
|
||||
|
||||
Column {
|
||||
@ -354,6 +357,6 @@ Item {
|
||||
cfg_dataengine["HDDDEV"] = hdd.currentText
|
||||
cfg_dataengine["PLAYER"] = player.currentText
|
||||
cfg_dataengine["MPRIS"] = mpris.currentText
|
||||
awActions.writeDataEngineConfiguration(cfg_dataengine)
|
||||
awConfig.writeDataEngineConfiguration(cfg_dataengine)
|
||||
}
|
||||
}
|
||||
|
@ -31,10 +31,10 @@ Item {
|
||||
id: main
|
||||
// backend
|
||||
AWKeys {
|
||||
id: awKeys;
|
||||
id: awKeys
|
||||
}
|
||||
AWActions {
|
||||
id: awActions;
|
||||
id: awActions
|
||||
}
|
||||
|
||||
property bool debug: awActions.isDebugEnabled()
|
||||
|
@ -27,7 +27,7 @@ Item {
|
||||
id: tooltipPage
|
||||
// backend
|
||||
AWActions {
|
||||
id: awActions;
|
||||
id: awActions
|
||||
}
|
||||
|
||||
width: childrenRect.width
|
||||
|
@ -26,10 +26,10 @@ Item {
|
||||
id: widgetPage
|
||||
// backend
|
||||
AWKeys {
|
||||
id: awKeys;
|
||||
id: awKeys
|
||||
}
|
||||
AWActions {
|
||||
id: awActions;
|
||||
id: awActions
|
||||
}
|
||||
|
||||
width: childrenRect.width
|
||||
|
Reference in New Issue
Block a user