* initial implementation of configuration export and import feature (#68)

* drop mediators in data transition
This commit is contained in:
arcan1s 2015-10-16 07:22:03 +03:00
parent 2db2de4c27
commit 0e1b101703
14 changed files with 734 additions and 46 deletions

3
.gitignore vendored
View File

@ -44,6 +44,3 @@ build
src
pkg
# idea
.idea

1
sources/.idea/.name generated Normal file
View File

@ -0,0 +1 @@
sources

15
sources/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" />
</project>

8
sources/.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sources.iml" filepath="$PROJECT_DIR$/.idea/sources.iml" />
</modules>
</component>
</project>

119
sources/.idea/sources.iml generated Normal file
View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/awesome-widget/plugin/awplugin_automoc.cpp">
<sourceFolder url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/awesome-widget/plugin/awplugin_automoc.cpp" isTestSource="false" />
</content>
<content url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/awesomewidgets/awesomewidgets_automoc.cpp">
<sourceFolder url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/awesomewidgets/awesomewidgets_automoc.cpp" isTestSource="false" />
</content>
<content url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/desktop-panel/plugin/dpplugin_automoc.cpp">
<sourceFolder url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/desktop-panel/plugin/dpplugin_automoc.cpp" isTestSource="false" />
</content>
<content url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/extsysmon/__/3rdparty/task/moc_task.cpp">
<sourceFolder url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/extsysmon/__/3rdparty/task/moc_task.cpp" isTestSource="false" />
</content>
<content url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/extsysmon/plasma_dataengine_extsysmon_automoc.cpp">
<sourceFolder url="file://$USER_HOME$/.clion11/system/cmake/generated/78749160/78749160/Debug/extsysmon/plasma_dataengine_extsysmon_automoc.cpp" isTestSource="false" />
</content>
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/3rdparty/fontdialog/fontdialog.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/3rdparty/fontdialog/fontdialog.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/3rdparty/qreplytimeout/qreplytimeout.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/3rdparty/qreplytimeout/qreplytimeout.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/3rdparty/task/taskadds.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/3rdparty/task/taskadds.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awdebug.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awdebug.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/metadata.desktop" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awactions.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awactions.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awdataaggregator.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awdataaggregator.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awdataengineaggregator.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awdataengineaggregator.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awesomewidget.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awesomewidget.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awkeys.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awkeys.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awkeysaggregator.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesome-widget/plugin/awkeysaggregator.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/abstractextitem.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/abstractextitem.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/abstractextitemaggregator.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/abstractextitemaggregator.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/awesomewidgets-extweather-ids.json" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extitemaggregator.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extquotes.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extquotes.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extquotes.ui" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extscript.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extscript.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extscript.ui" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extupgrade.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extupgrade.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extupgrade.ui" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extweather.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extweather.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/extweather.ui" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/graphicalitem.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/graphicalitem.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/awesomewidgets/graphicalitem.ui" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/checkgit.cmake" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/desktop-panel/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/desktop-panel/metadata.desktop" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/desktop-panel/plugin/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/desktop-panel/plugin/desktoppanel.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/desktop-panel/plugin/desktoppanel.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/desktop-panel/plugin/dpadds.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/desktop-panel/plugin/dpadds.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/extsysmon.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/extsysmon.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/extsysmonaggregator.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/extsysmonaggregator.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/plasma-dataengine-extsysmon.desktop" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/batterysource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/batterysource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/customsource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/customsource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/desktopsource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/desktopsource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/gpuloadsource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/gpuloadsource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/gputempsource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/gputempsource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/hddtempsource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/hddtempsource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/loadsource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/loadsource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/networksource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/networksource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/playersource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/playersource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/processessource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/processessource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/quotessource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/quotessource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/updatesource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/updatesource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/upgradesource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/upgradesource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/weathersource.cpp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/extsysmon/sources/weathersource.h" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/libraries.cmake" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages-recipe.cmake" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/translations/CMakeLists.txt" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/version.h.in" isTestSource="false" />
</content>
<content url="file:///usr/share/ECM/modules/ecm_uninstall.cmake.in">
<sourceFolder url="file:///usr/share/ECM/modules/ecm_uninstall.cmake.in" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

10
sources/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$USER_HOME$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$/3rdparty/fontdialog" vcs="Git" />
<mapping directory="$PROJECT_DIR$/3rdparty/task" vcs="Git" />
<mapping directory="$PROJECT_DIR$/3rdparty/tasks" vcs="Git" />
</component>
</project>

344
sources/.idea/workspace.xml generated Normal file
View File

@ -0,0 +1,344 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeRunConfigurationManager" shouldGenerate="true" assignedExecutableTargets="true" buildAllGenerated="true">
<generated>
<config projectName="awesomewidgets" targetName="awesomewidgets_automoc" />
<config projectName="awesomewidgets" targetName="awplugin" />
<config projectName="awesomewidgets" targetName="awesomewidgets" />
<config projectName="awesomewidgets" targetName="dpplugin_automoc" />
<config projectName="awesomewidgets" targetName="plasma_dataengine_extsysmon" />
<config projectName="awesomewidgets" targetName="uninstall" />
<config projectName="awesomewidgets" targetName="awplugin_automoc" />
<config projectName="awesomewidgets" targetName="dpplugin" />
<config projectName="awesomewidgets" targetName="plasma_dataengine_extsysmon_automoc" />
<config projectName="awesomewidgets" targetName="aw_pofiles" />
</generated>
</component>
<component name="CMakeSettings" AUTO_RELOAD="false" GENERATION_PASS_SYSTEM_ENVIRONMENT="true">
<ADDITIONAL_GENERATION_ENVIRONMENT>
<envs />
</ADDITIONAL_GENERATION_ENVIRONMENT>
</component>
<component name="ChangeListManager">
<list default="true" id="0d97362a-408a-4c06-bd78-89983a3d619c" name="Default" comment="" />
<ignored path="sources.iws" />
<ignored path=".idea/workspace.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="sources" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="awactions.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/awesome-widget/plugin/awactions.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="awactions.h" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/awesome-widget/plugin/awactions.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6508951">
<caret line="41" column="76" selection-start-line="41" selection-start-column="76" selection-end-line="41" selection-end-column="76" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/awesome-widget/plugin/awactions.h" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
</component>
<component name="NamedScopeManager">
<order />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="1920" />
<option name="y" value="23" />
<option name="width" value="1600" />
<option name="height" value="877" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="awesome-widget" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="awesome-widget" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="recentsLimit" value="5" />
<property name="FullScreen" value="false" />
</component>
<component name="RunManager" selected="Application.Build All">
<configuration default="true" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="uninstall" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="Build All" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" CONFIG_NAME="Debug" EXPLICIT_BUILD_TARGET_NAME="all">
<envs />
<method />
</configuration>
<configuration default="false" name="uninstall" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="uninstall" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="awplugin" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="awplugin" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="awplugin_automoc" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="awplugin_automoc" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="awesomewidgets" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="awesomewidgets" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="awesomewidgets_automoc" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="awesomewidgets_automoc" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="dpplugin" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="dpplugin" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="dpplugin_automoc" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="dpplugin_automoc" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="plasma_dataengine_extsysmon" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="plasma_dataengine_extsysmon" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="plasma_dataengine_extsysmon_automoc" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="plasma_dataengine_extsysmon_automoc" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<configuration default="false" name="aw_pofiles" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="awesomewidgets" TARGET_NAME="aw_pofiles" CONFIG_NAME="Debug">
<envs />
<method />
</configuration>
<list size="11">
<item index="0" class="java.lang.String" itemvalue="Application.Build All" />
<item index="1" class="java.lang.String" itemvalue="Application.uninstall" />
<item index="2" class="java.lang.String" itemvalue="Application.awplugin" />
<item index="3" class="java.lang.String" itemvalue="Application.awplugin_automoc" />
<item index="4" class="java.lang.String" itemvalue="Application.awesomewidgets" />
<item index="5" class="java.lang.String" itemvalue="Application.awesomewidgets_automoc" />
<item index="6" class="java.lang.String" itemvalue="Application.dpplugin" />
<item index="7" class="java.lang.String" itemvalue="Application.dpplugin_automoc" />
<item index="8" class="java.lang.String" itemvalue="Application.plasma_dataengine_extsysmon" />
<item index="9" class="java.lang.String" itemvalue="Application.plasma_dataengine_extsysmon_automoc" />
<item index="10" class="java.lang.String" itemvalue="Application.aw_pofiles" />
</list>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="0d97362a-408a-4c06-bd78-89983a3d619c" name="Default" comment="" />
<created>1444961890223</created>
<option name="number" value="Default" />
<updated>1444961890223</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="1920" y="23" width="1600" height="877" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32880098" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.18286446">
<caret line="11" column="19" selection-start-line="11" selection-start-column="19" selection-end-line="11" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/awesome-widget/plugin/awkeys.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/awesome-widget/plugin/awkeys.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/awesome-widget/plugin/awactions.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/awesome-widget/plugin/awactions.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6508951">
<caret line="41" column="76" selection-start-line="41" selection-start-column="76" selection-end-line="41" selection-end-column="76" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -352,12 +352,41 @@ Item {
width: parent.width * 2 / 5
}
QtControls.Button {
id: selectFont
width: parent.width * 3 / 5
text: i18n("Drop key cache")
onClicked: awActions.dropCache()
}
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.height
width: parent.width * 2 / 5
}
QtControls.Button {
width: parent.width * 3 / 5
text: i18n("Export configuration")
onClicked: awActions.exportConfiguration(plasmoid.configuration)
}
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.height
width: parent.width * 2 / 5
}
QtControls.Button {
width: parent.width * 3 / 5
text: i18n("Import configuration")
onClicked: {
console.log(awActions.importConfiguration())
}
}
}
}

View File

@ -20,8 +20,10 @@
#include <KI18n/KLocalizedString>
#include <KNotifications/KNotification>
#include <QCheckBox>
#include <QDesktopServices>
#include <QDir>
#include <QFileDialog>
#include <QJsonDocument>
#include <QJsonParseError>
#include <QMessageBox>
@ -30,8 +32,10 @@
#include <QNetworkReply>
#include <QProcess>
#include <QProcessEnvironment>
#include <QQmlPropertyMap>
#include <QSettings>
#include <QStandardPaths>
#include <QVBoxLayout>
#include <fontdialog/fontdialog.h>
@ -109,6 +113,78 @@ void AWActions::showReadme() const
}
void AWActions::exportConfiguration(QObject *nativeConfig) const
{
qCDebug(LOG_AW);
// get file path and init settings object
QString fileName = QFileDialog::getSaveFileName(nullptr, i18n("Export"));
if (fileName.isEmpty())
return;
qCInfo(LOG_AW) << "Selected filename" << fileName;
QSettings settings(fileName, QSettings::IniFormat);
// additional parameters
QString baseDir = QString("%1/awesomewidgets").
arg(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation));
QStringList dirs = QStringList() << QString("desktops") << QString("quotes")
<< QString("scripts") << QString("upgrade") << QString("weather");
// plasmoid configuration
QQmlPropertyMap *configuration = static_cast<QQmlPropertyMap *>(nativeConfig);
settings.beginGroup(QString("plasmoid"));
foreach(QString key, configuration->keys()) {
QVariant value = configuration->value(key);
if (!value.isValid())
continue;
settings.setValue(key, value);
}
settings.endGroup();
// extenstions
foreach(QString item, dirs) {
QStringList items = QDir(QString("%1/%2").arg(baseDir).arg(item)).entryList(
QStringList() << QString("*.desktop"), QDir::Files);
settings.beginGroup(item);
foreach(QString it, items) {
qCInfo(LOG_AW) << "Processing file" << it;
settings.beginGroup(it);
QSettings itemSettings(QString("%1/%2/%3").arg(baseDir).arg(item).arg(it), QSettings::IniFormat);
itemSettings.beginGroup(QString("Desktop Entry"));
foreach(QString key, itemSettings.childKeys())
settings.setValue(key, itemSettings.value(key));
itemSettings.endGroup();
settings.endGroup();
}
settings.endGroup();
}
// additional files
settings.beginGroup(QString("json"));
// script filters
QFile filterFile(QString("%1/scripts/awesomewidgets-extscripts-filters.json").arg(baseDir));
if (filterFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
QString filterText = filterFile.readAll();
filterFile.close();
settings.setValue(QString("filters"), filterText);
} else {
qCWarning(LOG_LIB) << "Could not open" << filterFile.fileName();
}
// weather icon settings
QFile weatherIdFile(QString("%1/weather/awesomewidgets-extweather-ids.json").arg(baseDir));
if (weatherIdFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
QString weatherIdText = weatherIdFile.readAll();
weatherIdFile.close();
settings.setValue(QString("weathers"), weatherIdText);
} else {
qCWarning(LOG_LIB) << "Could not open" << weatherIdFile.fileName();
}
settings.endGroup();
// sync settings
settings.sync();
}
// HACK: this method uses variables from version.h
QString AWActions::getAboutText(const QString type) const
{
@ -171,6 +247,114 @@ QVariantMap AWActions::getFont(const QVariantMap defaultFont) const
}
QQmlPropertyMap* AWActions::importConfiguration() const
{
qCDebug(LOG_AW);
QQmlPropertyMap *configuration = new QQmlPropertyMap();
// get file path and init settings object
QString fileName = QFileDialog::getOpenFileName(nullptr, i18n("Import"));
if (fileName.isEmpty())
return configuration;
qCInfo(LOG_AW) << "Selected filename" << fileName;
QSettings settings(fileName, QSettings::IniFormat);
// additional parameters
QString baseDir = QString("%1/awesomewidgets").
arg(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation));
QStringList dirs = QStringList() << QString("desktops") << QString("quotes")
<< QString("scripts") << QString("upgrade") << QString("weather");
// check what should be exported
QDialog *dialog = new QDialog(nullptr);
QCheckBox *importPlasmoidSettings = new QCheckBox(i18n("Import plasmoid settings"), dialog);
QCheckBox *importExtensionsSettings = new QCheckBox(i18n("Import extenstions"), dialog);
QCheckBox *importAddsSettings = new QCheckBox(i18n("Import additional files"), dialog);
QDialogButtonBox *dialogButtons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
Qt::Horizontal, dialog);
QVBoxLayout *layout = new QVBoxLayout(dialog);
layout->addWidget(importPlasmoidSettings);
layout->addWidget(importExtensionsSettings);
layout->addWidget(importAddsSettings);
layout->addWidget(dialogButtons);
connect(dialogButtons, SIGNAL(accepted()), dialog, SLOT(accept()));
connect(dialogButtons, SIGNAL(rejected()), dialog, SLOT(reject()));
// get parameters
bool importPlasmoid = false;
bool importExtensions = false;
bool importAdds = false;
switch(int ret = dialog->exec()) {
case QDialog::Accepted:
importPlasmoid = importPlasmoidSettings->isChecked();
importExtensions = importExtensionsSettings->isChecked();
importAdds = importAddsSettings->isChecked();
break;
case QDialog::Rejected:
default:
break;
}
dialog->deleteLater();
// extenstions
if (importExtensions) {
foreach(QString item, dirs) {
settings.beginGroup(item);
qDebug() << settings.childGroups();
foreach(QString it, settings.childGroups()) {
qCInfo(LOG_AW) << "Processing file" << it;
settings.beginGroup(it);
QSettings itemSettings(QString("%1/%2/%3").arg(baseDir).arg(item).arg(it), QSettings::IniFormat);
itemSettings.beginGroup(QString("Desktop Entry"));
foreach(QString key, settings.childKeys())
itemSettings.setValue(key, settings.value(key));
itemSettings.endGroup();
itemSettings.sync();
settings.endGroup();
}
settings.endGroup();
}
}
// additional files
if (importAdds) {
settings.beginGroup(QString("json"));
// script filters
if (settings.contains(QString("filters"))) {
QFile filterFile(QString("%1/scripts/awesomewidgets-extscripts-filters.json").arg(baseDir));
if (filterFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
QDataStream out(&filterFile);
out << settings.value(QString("filters")).toString();
filterFile.close();
} else {
qCWarning(LOG_LIB) << "Could not open" << filterFile.fileName();
}
}
// weather icon settings
if (settings.contains(QString("weathers"))) {
QFile weatherIdFile(QString("%1/weather/awesomewidgets-extweather-ids.json").arg(baseDir));
if (weatherIdFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
QDataStream out(&weatherIdFile);
out << settings.value(QString("weathers")).toString();
weatherIdFile.close();
} else {
qCWarning(LOG_LIB) << "Could not open" << weatherIdFile.fileName();
}
}
settings.endGroup();
}
// plasmoid configuration
if (importPlasmoid) {
settings.beginGroup(QString("plasmoid"));
foreach(QString key, settings.childKeys())
configuration->insert(key, settings.value(key));
configuration->insert(QString("valid"), true);
settings.endGroup();
}
return configuration;
}
QVariantMap AWActions::readDataEngineConfiguration() const
{
qCDebug(LOG_AW);

View File

@ -23,6 +23,7 @@
class QNetworkReply;
class QQmlPropertyMap;
class AWActions : public QObject
{
@ -37,8 +38,10 @@ public:
Q_INVOKABLE bool runCmd(const QString cmd = QString("/usr/bin/true")) const;
Q_INVOKABLE void showReadme() const;
// configuration slots
Q_INVOKABLE void exportConfiguration(QObject *nativeConfig) const;
Q_INVOKABLE QString getAboutText(const QString type = QString("header")) const;
Q_INVOKABLE QVariantMap getFont(const QVariantMap defaultFont) const;
Q_INVOKABLE QQmlPropertyMap *importConfiguration() const;
// dataengine
Q_INVOKABLE QVariantMap readDataEngineConfiguration() const;
Q_INVOKABLE void writeDataEngineConfiguration(const QVariantMap configuration) const;

View File

@ -57,8 +57,8 @@ void AWDataEngineAggregator::dropSource(const QString source)
// FIXME there is no possiblibity to check to which dataengine source connected
// we will try to disconnect it from systemmonitor and extsysmon
m_dataEngines[QString("systemmonitor")]->disconnectSource(source, this);
m_dataEngines[QString("extsysmon")]->disconnectSource(source, this);
m_dataEngines[QString("systemmonitor")]->disconnectSource(source, parent());
m_dataEngines[QString("extsysmon")]->disconnectSource(source, parent());
}
@ -66,26 +66,9 @@ void AWDataEngineAggregator::reconnectSources()
{
qCDebug(LOG_AW);
m_dataEngines[QString("systemmonitor")]->connectAllSources(this, m_interval);
m_dataEngines[QString("extsysmon")]->connectAllSources(this, m_interval);
m_dataEngines[QString("time")]->connectSource(QString("Local"), this, 1000);
}
void AWDataEngineAggregator::dataUpdated(const QString sourceName, const Plasma::DataEngine::Data data)
{
qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Source" << sourceName;
qCDebug(LOG_AW) << "Data" << data;
// HACK "deep copy" of data to avoid plasma crash on Data object destruction
QString units = data[QString("units")].toString();
// HACK workaround for time values which are stored in the different path
QVariant value = sourceName == QString("Local")
? data[QString("DateTime")]
: data[QString("value")];
emit(updateData(sourceName, value, units));
m_dataEngines[QString("systemmonitor")]->connectAllSources(parent(), m_interval);
m_dataEngines[QString("extsysmon")]->connectAllSources(parent(), m_interval);
m_dataEngines[QString("time")]->connectSource(QString("Local"), parent(), 1000);
}
@ -102,9 +85,6 @@ void AWDataEngineAggregator::initDataEngines()
connect(m_dataEngines[QString("systemmonitor")], &Plasma::DataEngine::sourceAdded,
[this](const QString source) {
static_cast<AWKeys *>(parent())->addDevice(source);
m_dataEngines[QString("systemmonitor")]->connectSource(source, this, m_interval);
m_dataEngines[QString("systemmonitor")]->connectSource(source, parent(), m_interval);
});
connect(this, SIGNAL(updateData(QString, QVariant, QString)),
parent(), SLOT(dataUpdated(QString, QVariant, QString)));
}

View File

@ -34,16 +34,9 @@ public:
// properties
void setInterval(const int _interval);
signals:
void updateData(const QString sourceName, const QVariant value, const QString units);
public slots:
void dropSource(const QString source);
void reconnectSources();
// data engines operations
void dataUpdated(const QString sourceName, const Plasma::DataEngine::Data data);
// dummy method required by DataEngine connections
void modelChanged(QString, QAbstractItemModel *) {};
private:
void initDataEngines();

View File

@ -392,20 +392,20 @@ void AWKeys::addDevice(const QString source)
}
void AWKeys::dataUpdated(const QString sourceName, const QVariant value, const QString units)
void AWKeys::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
{
qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Source" << sourceName;
qCDebug(LOG_AW) << "Data" << value << units;
qCDebug(LOG_AW) << "Data" << data;
if (sourceName == QString("update"))
return emit(needToBeUpdated());
#ifdef BUILD_FUTURE
// run concurrent data update
QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName, value, units);
QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName, data);
#else /* BUILD_FUTURE */
return setDataBySource(sourceName, value, units);
return setDataBySource(sourceName, data);
#endif /* BUILD_FUTURE */
}
@ -686,16 +686,16 @@ QString AWKeys::parsePattern(QString pattern) const
}
void AWKeys::setDataBySource(const QString sourceName, const QVariant value, const QString units)
void AWKeys::setDataBySource(const QString &sourceName, const QVariantMap &data)
{
qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Source" << sourceName;
qCDebug(LOG_AW) << "Data" << value << units;
qCDebug(LOG_AW) << "Data" << data;
// first list init
QStringList tags = aggregator->keysFromSource(sourceName);
if (tags.isEmpty())
tags = aggregator->registerSource(sourceName, units);
tags = aggregator->registerSource(sourceName, data[QString("units")].toString());
// update data or drop source if there are no matches
if (tags.isEmpty()) {
@ -705,6 +705,8 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariant value, con
#ifdef BUILD_FUTURE
m_mutex.lock();
#endif /* BUILD_FUTURE */
// HACK workaround for time values which are stored in the different path
QVariant value = sourceName == QString("Local") ? data[QString("DateTime")] : data[QString("value")];
std::for_each(tags.cbegin(), tags.cend(), [this, value](const QString tag) {
values[tag] = aggregator->formater(value, tag);
});

View File

@ -19,6 +19,7 @@
#ifndef AWKEYS_H
#define AWKEYS_H
#include <Plasma/DataEngine>
#include <QMutex>
#include <QObject>
@ -60,7 +61,9 @@ public:
public slots:
void addDevice(const QString source);
void dataUpdated(const QString sourceName, const QVariant value, const QString units);
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
// dummy method required by DataEngine connections
void modelChanged(QString, QAbstractItemModel *) {};
signals:
void dropSourceFromDataengine(const QString source);
@ -78,7 +81,7 @@ private:
void addKeyToCache(const QString type, const QString key = QString(""));
void calculateValues();
QString parsePattern(QString pattern) const;
void setDataBySource(const QString sourceName, const QVariant value, const QString units);
void setDataBySource(const QString &sourceName, const QVariantMap &data);
// objects
AWDataAggregator *dataAggregator = nullptr;
AWDataEngineAggregator *dataEngineAggregator = nullptr;