first commit
@@ -0,0 +1,8 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = Kooky \
|
||||
iBleibFit \
|
||||
iErnaehrung \
|
||||
dMySQL \
|
||||
dSQLite
|
||||
|
||||
DESTDIR = ../bin
|
||||
@@ -0,0 +1,527 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.6.1, 2016-04-08T18:03:11. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{90551da6-f083-4f65-96d6-4435a4c6527f}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.5.1 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.5.1 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.55.win32_mingw492_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/build-Kooky-Desktop_Qt_5_5_1_MinGW_32bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/build-Kooky-Desktop_Qt_5_5_0_MinGW_32bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">0</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Kooky</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/birkeh/Documents/Projects/Kooky/Kooky/Kooky.pro</value>
|
||||
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">Kooky/Kooky.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e3812cf0-2836-4298-8338-6f37f68e5644}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">-1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/build-Kooky-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Copy application data</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidPackageInstallationStep</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.3">
|
||||
<value type="QString" key="BuildTargetSdk">android--1</value>
|
||||
<value type="QString" key="KeystoreLocation"></value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build Android APK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.AndroidBuildApkStep</value>
|
||||
<value type="int" key="Qt4ProjectManager.AndroidDeployQtStep.DeployQtAction">2</value>
|
||||
<value type="bool" key="UseGradle">false</value>
|
||||
<value type="bool" key="VerboseOutput">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">4</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/build-Kooky-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Copy application data</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidPackageInstallationStep</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.3">
|
||||
<value type="QString" key="BuildTargetSdk">android-23</value>
|
||||
<value type="QString" key="KeystoreLocation"></value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build Android APK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.AndroidBuildApkStep</value>
|
||||
<value type="int" key="Qt4ProjectManager.AndroidDeployQtStep.DeployQtAction">2</value>
|
||||
<value type="bool" key="UseGradle">false</value>
|
||||
<value type="bool" key="VerboseOutput">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">4</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/build-Kooky-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Copy application data</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidPackageInstallationStep</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.3">
|
||||
<value type="QString" key="BuildTargetSdk">android-23</value>
|
||||
<value type="QString" key="KeystoreLocation"></value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build Android APK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.AndroidBuildApkStep</value>
|
||||
<value type="int" key="Qt4ProjectManager.AndroidDeployQtStep.DeployQtAction">2</value>
|
||||
<value type="bool" key="UseGradle">false</value>
|
||||
<value type="bool" key="VerboseOutput">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">4</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy to Android device</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidDeployQtStep</value>
|
||||
<value type="bool" key="UninstallPreviousPackage">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy to Android device</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy to Android device</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidDeployConfiguration2</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">0</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">2</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -0,0 +1,54 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2014-06-25T10:59:43
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui xml
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = Kooky
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
SOURCES += main.cpp\
|
||||
cmainwindow.cpp \
|
||||
cimportinterface.cpp \
|
||||
cplugin.cpp \
|
||||
cingredient.cpp \
|
||||
cdbinterface.cpp \
|
||||
coptions.cpp \
|
||||
coptionsplugins.cpp \
|
||||
cmdiarea.cpp \
|
||||
cimportingredientdialog.cpp \
|
||||
cmessageanimatedialog.cpp \
|
||||
cplugininfo.cpp \
|
||||
csplashscreen.cpp
|
||||
|
||||
HEADERS += cmainwindow.h \
|
||||
cimportinterface.h \
|
||||
cInterface.h \
|
||||
cplugin.h \
|
||||
cingredient.h \
|
||||
cdbinterface.h \
|
||||
coptions.h \
|
||||
coptionsplugins.h \
|
||||
cmdiarea.h \
|
||||
cimportingredientdialog.h \
|
||||
cmessageanimatedialog.h \
|
||||
cplugininfo.h \
|
||||
typedef.h \
|
||||
csplashscreen.h
|
||||
|
||||
FORMS += cmainwindow.ui \
|
||||
coptions.ui \
|
||||
coptionsplugins.ui \
|
||||
cimportingredientdialog.ui \
|
||||
cmessageanimatedialog.ui \
|
||||
cplugininfo.ui
|
||||
|
||||
DESTDIR = ../bin
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.5.0, 2016-01-25T10:39:00. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{90551da6-f083-4f65-96d6-4435a4c6527f}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.5.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.5.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.55.win32_mingw492_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/Kooky/build-Kooky-Desktop_Qt_5_5_0_MinGW_32bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/Kooky/build-Kooky-Desktop_Qt_5_5_0_MinGW_32bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Kooky</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/birkeh/Documents/Projects/Kooky/Kooky/Kooky.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">Kooky.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -0,0 +1,271 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.5.0, 2015-11-10T21:31:35. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{24c92daa-217e-49e1-9456-cd61c21efba1}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.5.0 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.5.0 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.55.gcc_64_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Projects/QTCreator/Kooky/build-Kooky-Desktop_Qt_5_5_0_GCC_64bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Projects/QTCreator/Kooky/build-Kooky-Desktop_Qt_5_5_0_GCC_64bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Kooky</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/data/Projects/QTCreator/Kooky/Kooky/Kooky.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">Kooky.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -0,0 +1,263 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.1.0, 2014-07-10T18:35:46. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.2.1 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.2.1 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.521.gcc_64.essentials_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Projects/QTCreator/Kooky/build-Kooky-Desktop_Qt_5_2_1_GCC_64bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Projects/QTCreator/Kooky/build-Kooky-Desktop_Qt_5_2_1_GCC_64bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Kooky</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/data/Projects/QTCreator/Kooky/Kooky/Kooky.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">Kooky.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||
<value type="QByteArray">{e1ab7ccf-23c6-4f32-b3f3-5c18cde2ab15}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">15</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* \class cInterface
|
||||
*
|
||||
* \brief This is the base class for all plugins.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* This class implements basic interface functionality for all Kooky plugins.
|
||||
* All functions may be overwritten by derriving classes.
|
||||
*
|
||||
* \note Do not subclass this class directly, always use the appropriate subclass:
|
||||
* cDBInterface for database connectors, cImportInterface for import plugins and cExportInterface for export plugins.
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CINTERFACE_H
|
||||
#define CINTERFACE_H
|
||||
|
||||
|
||||
#include <QString>
|
||||
#include <QScrollArea>
|
||||
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*/
|
||||
class cInterface
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Defines the type of the interface.
|
||||
*
|
||||
*/
|
||||
enum iType
|
||||
{
|
||||
iTypeImport = 0, /**< import plugin */
|
||||
iTypeExport = 1, /**< export plugin */
|
||||
iTypeDB = 2, /**< database connector */
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Returns the version of the API
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
*
|
||||
* \return qint16 version of the API
|
||||
*/
|
||||
virtual qint16 pluginAPIVersion() = 0;
|
||||
/**
|
||||
* \brief Returns the name of the plugin.
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
* \note The name must be unique and will also be used to store configuration settings.
|
||||
*
|
||||
* \return QString name of the plugin.
|
||||
*/
|
||||
virtual QString pluginName() = 0;
|
||||
/**
|
||||
* \brief Version of the plugin.
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
*
|
||||
* \return qint16 version of the plugin.
|
||||
*/
|
||||
virtual qint16 pluginVersion() = 0;
|
||||
/**
|
||||
* \brief Returns the type of the plugin.
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
*
|
||||
* \return iType type of the plugin (see enum iType).
|
||||
*/
|
||||
virtual iType pluginType() = 0;
|
||||
|
||||
/**
|
||||
* \brief Calls the configuration dialog (if any).
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
*
|
||||
* \return bool true on success, false otherwise.
|
||||
*/
|
||||
virtual bool config() = 0;
|
||||
|
||||
virtual QString author() = 0;
|
||||
virtual QString company() = 0;
|
||||
virtual QString link() = 0;
|
||||
virtual QString description() = 0;
|
||||
virtual QString copyright() = 0;
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
#endif // CINTERFACE_H
|
||||
@@ -0,0 +1 @@
|
||||
#include "cdbinterface.h"
|
||||
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* \class cDBInterface
|
||||
*
|
||||
* \brief This is the base class for all database connector plugins.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* This class implements basic interface functionality for all Kooky database connector plugins.
|
||||
* All functions may be overwritten by derriving classes.
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CDBINTERFACE_H
|
||||
#define CDBINTERFACE_H
|
||||
|
||||
|
||||
#include "cInterface.h"
|
||||
#include "typedef.h"
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*/
|
||||
class cDBInterface : public cInterface
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Constructor.
|
||||
*
|
||||
*/
|
||||
cDBInterface() : m_bConnected(false) { }
|
||||
/**
|
||||
* \brief Destructor.
|
||||
*
|
||||
*/
|
||||
virtual ~cDBInterface() {}
|
||||
|
||||
/**
|
||||
* \brief Opens a connection to the database.
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
*
|
||||
* \return bool true on success, false otherwise.
|
||||
*/
|
||||
virtual bool connect() = 0;
|
||||
/**
|
||||
* \brief Initializes the module with default values.
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
*
|
||||
* \return bool true on success, false otherwise.
|
||||
*/
|
||||
virtual bool init() = 0;
|
||||
/**
|
||||
* \brief Returns the current connection status.
|
||||
*
|
||||
* \note This function must be derived by the subclass.
|
||||
*
|
||||
* \return bool true if connected, false otherwise.
|
||||
*/
|
||||
bool connected() { return(m_bConnected); }
|
||||
/**
|
||||
* \brief Returns the last error message of the last operation.
|
||||
*
|
||||
* \return QString error message of the last operation.
|
||||
*/
|
||||
QString lastError() { return(QString("no error")); }
|
||||
|
||||
virtual qint32 exists(const QString& szName, const QString& szGroup) = 0;
|
||||
virtual qint32 existsGroup(const QString& szGroup) = 0;
|
||||
virtual qint32 existsIngredient(qint32 id, qint16 ingredientNumber) = 0;
|
||||
virtual qint32 create(const QString& szName, const QString& szGroup) = 0;
|
||||
virtual qint32 createGroup(const QString& szGroup) = 0;
|
||||
virtual bool set(qint32 id, qint16 ingredientNumber, qreal value) = 0;
|
||||
virtual INGREDIENT_LIST ingredients() = 0;
|
||||
virtual QStringList groups() = 0;
|
||||
virtual bool beginTransaction() = 0;
|
||||
virtual bool endTransaction() = 0;
|
||||
protected:
|
||||
bool m_bConnected; /*!< holds the current connection status. */
|
||||
};
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_DECLARE_INTERFACE(cDBInterface, "WIN-DESIGN.cDBInterface/1.0");
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // CDBINTERFACE_H
|
||||
@@ -0,0 +1,210 @@
|
||||
#include "cimportingredientdialog.h"
|
||||
#include "ui_cimportingredientdialog.h"
|
||||
|
||||
#include "cmessageanimatedialog.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
|
||||
cImportIngredientDialog::cImportIngredientDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::cImportIngredientDialog),
|
||||
m_lpIngredientListModel(0),
|
||||
m_lpIngredientDetailsModel(0)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
cImportIngredientDialog::~cImportIngredientDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::init()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
initIngredientList();
|
||||
initIngredientDetails();
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::initIngredientList()
|
||||
{
|
||||
if(!m_lpIngredientListModel)
|
||||
{
|
||||
m_lpIngredientListModel = new QStandardItemModel(0, 1);
|
||||
ui->m_lpIngredientList->setModel(m_lpIngredientListModel);
|
||||
connect(ui->m_lpIngredientList->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(onIngredientListSelectionChanged(QItemSelection,QItemSelection)));
|
||||
}
|
||||
m_lpIngredientListModel->clear();
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::initIngredientDetails()
|
||||
{
|
||||
if(!m_lpIngredientDetailsModel)
|
||||
{
|
||||
m_lpIngredientDetailsModel = new QStandardItemModel(0, 2);
|
||||
ui->m_lpIngredientDetails->setModel(m_lpIngredientDetailsModel);
|
||||
}
|
||||
m_lpIngredientDetailsModel->clear();
|
||||
QStringList headerLabels = QStringList() << tr("Group/Name") << tr("Value");
|
||||
m_lpIngredientDetailsModel->setHorizontalHeaderLabels(headerLabels);
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::setPluginList(const QList<cPlugin*> pluginList)
|
||||
{
|
||||
m_pluginList = pluginList;
|
||||
|
||||
for(int z = 0;z < m_pluginList.count();z++)
|
||||
{
|
||||
cPlugin* lpPlugin = m_pluginList.at(z);
|
||||
if(lpPlugin->capability() == cPlugin::PluginCapImport)
|
||||
{
|
||||
QSettings settings;
|
||||
if(settings.value(QString("plugins/%1/enabled").arg(lpPlugin->pluginName()), QVariant(false)).toBool())
|
||||
ui->m_lpSource->addItem(lpPlugin->pluginName(), QVariant::fromValue(lpPlugin));
|
||||
}
|
||||
}
|
||||
ui->m_lpSource->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::on_m_lpSearchString_textChanged(const QString &/*arg1*/)
|
||||
{
|
||||
if(ui->m_lpSearchString->text().length())
|
||||
ui->m_lpSearchButton->setEnabled(true);
|
||||
else
|
||||
ui->m_lpSearchButton->setEnabled(false);
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::on_m_lpSearchButton_clicked()
|
||||
{
|
||||
cMessageAnimateDialog* lpDialog = new cMessageAnimateDialog(this);
|
||||
lpDialog->setTitle("Import Ingredient");
|
||||
lpDialog->setMessage("Searching");
|
||||
lpDialog->show();
|
||||
|
||||
m_lpIngredientListModel->removeRows(0, m_lpIngredientListModel->rowCount());
|
||||
|
||||
cPlugin* lpPlugin = ui->m_lpSource->currentData().value<cPlugin*>();
|
||||
|
||||
if(!lpPlugin)
|
||||
{
|
||||
delete lpDialog;
|
||||
return;
|
||||
}
|
||||
|
||||
cImportInterface* lpImport = lpPlugin->importInterface();
|
||||
if(!lpImport)
|
||||
{
|
||||
delete lpDialog;
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList strList = lpImport->search(ui->m_lpSearchString->text());
|
||||
for(int z = 0;z < strList.count();z++)
|
||||
{
|
||||
QStandardItem* lpNew = new QStandardItem(strList.at(z));
|
||||
m_lpIngredientListModel->appendRow(lpNew);
|
||||
}
|
||||
|
||||
delete lpDialog;
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::onIngredientListSelectionChanged(const QItemSelection& /*selected*/, const QItemSelection& /*deselected*/)
|
||||
{
|
||||
cMessageAnimateDialog* lpDialog = new cMessageAnimateDialog(this);
|
||||
lpDialog->setTitle("Import Ingredient");
|
||||
lpDialog->setMessage("Loading");
|
||||
lpDialog->show();
|
||||
|
||||
m_lpIngredientDetailsModel->removeRows(0, m_lpIngredientDetailsModel->rowCount());
|
||||
|
||||
cPlugin* lpPlugin = ui->m_lpSource->currentData().value<cPlugin*>();
|
||||
|
||||
if(!lpPlugin)
|
||||
{
|
||||
delete lpDialog;
|
||||
return;
|
||||
}
|
||||
|
||||
cImportInterface* lpImport = lpPlugin->importInterface();
|
||||
if(!lpImport)
|
||||
{
|
||||
delete lpDialog;
|
||||
return;
|
||||
}
|
||||
|
||||
int iIndex = ui->m_lpIngredientList->currentIndex().row();
|
||||
if(iIndex < 0)
|
||||
{
|
||||
delete lpDialog;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!lpImport->load(iIndex))
|
||||
{
|
||||
delete lpDialog;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!lpImport->load(ui->m_lpIngredientList->currentIndex().row()))
|
||||
{
|
||||
delete lpDialog;
|
||||
return;
|
||||
}
|
||||
|
||||
for(int z = 0;z < cIngredient::iIngredientMax;z++)
|
||||
{
|
||||
if(lpImport->value((cIngredient::iIngredient)z) != -1)
|
||||
{
|
||||
QStandardItem* lpParent = addGroup(lpImport->group((cIngredient::iIngredient)z));
|
||||
|
||||
QStandardItem* lpName = new QStandardItem(lpImport->name((cIngredient::iIngredient)z));
|
||||
QStandardItem* lpValue = new QStandardItem(lpImport->valueStr((cIngredient::iIngredient)z));
|
||||
lpValue->setTextAlignment(Qt::AlignRight);
|
||||
lpParent->appendRow(QList<QStandardItem*>() << lpName << lpValue);
|
||||
}
|
||||
}
|
||||
ui->m_lpIngredientDetails->resizeColumnToContents(0);
|
||||
ui->m_lpIngredientDetails->resizeColumnToContents(1);
|
||||
|
||||
delete lpDialog;
|
||||
}
|
||||
|
||||
QStandardItem* cImportIngredientDialog::addGroup(const QString& group)
|
||||
{
|
||||
QList<QStandardItem*>itemList = m_lpIngredientDetailsModel->findItems(group);
|
||||
for(int z = 0;z < itemList.count();z++)
|
||||
{
|
||||
if(!itemList.at(z)->parent())
|
||||
return(itemList.at(z));
|
||||
}
|
||||
QStandardItem* lpItem = new QStandardItem(group);
|
||||
m_lpIngredientDetailsModel->appendRow(lpItem);
|
||||
return(lpItem);
|
||||
}
|
||||
|
||||
cIngredient cImportIngredientDialog::toIngredient()
|
||||
{
|
||||
cPlugin* lpPlugin = ui->m_lpSource->currentData().value<cPlugin*>();
|
||||
|
||||
if(!lpPlugin)
|
||||
return(cIngredient(""));
|
||||
|
||||
cImportInterface* lpImport = lpPlugin->importInterface();
|
||||
if(!lpImport)
|
||||
return(cIngredient(""));
|
||||
|
||||
if(!lpImport->loaded())
|
||||
return(cIngredient(""));
|
||||
|
||||
|
||||
cIngredient ingredient(lpImport->ingredientName());
|
||||
for(int z = 0;z < cIngredient::iIngredientMax;z++)
|
||||
{
|
||||
if(lpImport->value((cIngredient::iIngredient)z) != -1)
|
||||
ingredient.setValue((cIngredient::iIngredient)z, lpImport->value((cIngredient::iIngredient)z));
|
||||
}
|
||||
|
||||
return(ingredient);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* \class cImportIngredientDialog
|
||||
*
|
||||
* \brief This dialog imports ingredients based on the selected import plugin.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* This dialog imports ingredients based on the selected import plugin.
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CIMPORTINGREDIENTDIALOG_H
|
||||
#define CIMPORTINGREDIENTDIALOG_H
|
||||
|
||||
|
||||
#include "cplugin.h"
|
||||
#include "cingredient.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include <QStandardItemModel>
|
||||
#include <QItemSelection>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cImportIngredientDialog;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
class cImportIngredientDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param parent
|
||||
*/
|
||||
explicit cImportIngredientDialog(QWidget *parent = 0);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
~cImportIngredientDialog();
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param pluginList
|
||||
*/
|
||||
void setPluginList(const QList<cPlugin*> pluginList);
|
||||
cIngredient toIngredient();
|
||||
|
||||
private:
|
||||
Ui::cImportIngredientDialog* ui; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpIngredientListModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpIngredientDetailsModel; /*!< TODO: describe */
|
||||
|
||||
private slots:
|
||||
void on_m_lpSearchButton_clicked();
|
||||
void on_m_lpSearchString_textChanged(const QString &arg1);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param selected
|
||||
* \param deselected
|
||||
*/
|
||||
void onIngredientListSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
|
||||
|
||||
protected:
|
||||
QList<cPlugin*> m_pluginList; /*!< TODO: describe */
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param group
|
||||
* \return QStandardItem
|
||||
*/
|
||||
QStandardItem* addGroup(const QString& group);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
void init();
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
void initIngredientList();
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
void initIngredientDetails();
|
||||
};
|
||||
|
||||
#endif // CIMPORTINGREDIENTDIALOG_H
|
||||
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cImportIngredientDialog</class>
|
||||
<widget class="QDialog" name="cImportIngredientDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>593</width>
|
||||
<height>360</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Import Ingredient</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QTreeView" name="m_lpIngredientList">
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QTreeView" name="m_lpIngredientDetails"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDialogButtonBox" name="m_lpButtonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Source:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpSource">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpSearchString"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpSearchButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>m_lpButtonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>cImportIngredientDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_lpButtonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>cImportIngredientDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "cimportinterface.h"
|
||||
|
||||
|
||||
QString cImportInterface::group(cIngredient::iIngredient i)
|
||||
{
|
||||
return(cIngredient::group(i));
|
||||
}
|
||||
|
||||
QString cImportInterface::name(cIngredient::iIngredient i)
|
||||
{
|
||||
return(cIngredient::name(i));
|
||||
}
|
||||
|
||||
QString cImportInterface::valueStr(cIngredient::iIngredient i)
|
||||
{
|
||||
qreal dValue = value(i);
|
||||
QString strValue;
|
||||
|
||||
if(i == cIngredient::iIngredientCalories)
|
||||
strValue = QString("%1 kcal").arg(dValue);
|
||||
else if(i == cIngredient::iIngredientJoule)
|
||||
strValue = QString("%1 kJ").arg(dValue);
|
||||
else
|
||||
{
|
||||
if(dValue < 0.001)
|
||||
strValue = QString("%1 µg").arg(dValue*1000000);
|
||||
else if(dValue < 1.0)
|
||||
strValue = QString("%1 mg").arg(dValue*1000);
|
||||
else
|
||||
strValue = QString("%1 g").arg(dValue);
|
||||
}
|
||||
return(strValue);
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* \class cImportInterface
|
||||
*
|
||||
* \brief Interface class for importing data
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* This class implements basic import functionality for Kooky.
|
||||
* All functions may be overwritten by derriving classes.
|
||||
*
|
||||
* \note Attempts at zen rarely work.
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date $Date: 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CIMPORTINTERFACE_H
|
||||
#define CIMPORTINTERFACE_H
|
||||
|
||||
#include "cingredient.h"
|
||||
#include "cInterface.h"
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QMap>
|
||||
|
||||
|
||||
class cImportInterface : public cInterface
|
||||
{
|
||||
public:
|
||||
cImportInterface() : m_bLoaded(false) {}
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \return QMap<QString, QString>
|
||||
*/
|
||||
virtual QMap<QString, QString> detailsCapability() = 0;
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param szSearch
|
||||
* \param szDetails
|
||||
* \return QStringList
|
||||
*/
|
||||
virtual QStringList search(const QString& szSearch, const QString& szDetails = QString("")) = 0;
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param iIndex
|
||||
* \return bool
|
||||
*/
|
||||
virtual bool load(qint16 iIndex) = 0;
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \return bool
|
||||
*/
|
||||
bool loaded() { return(m_bLoaded); }
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param i
|
||||
* \return qreal
|
||||
*/
|
||||
virtual qreal value(cIngredient::iIngredient i) = 0;
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param i
|
||||
* \return qreal
|
||||
*/
|
||||
QString valueStr(cIngredient::iIngredient i);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param i
|
||||
* \return QString
|
||||
*/
|
||||
QString name(cIngredient::iIngredient i);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param i
|
||||
* \return QString
|
||||
*/
|
||||
QString group(cIngredient::iIngredient i);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \return QString
|
||||
*/
|
||||
virtual QString ingredientName() = 0;
|
||||
protected:
|
||||
bool m_bLoaded; /*!< TODO: describe */
|
||||
qint16 m_iLoadedIndex; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_DECLARE_INTERFACE(cImportInterface, "WIN-DESIGN.cImportInterface/1.0");
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // CIMPORTINTERFACE_H
|
||||
@@ -0,0 +1,247 @@
|
||||
#include "cingredient.h"
|
||||
#include "cplugin.h"
|
||||
|
||||
|
||||
typedef struct tagGROUPNAME
|
||||
{
|
||||
QString szName;
|
||||
QString szGroup;
|
||||
cIngredient::iIngredient iIngredient;
|
||||
} GROUPNAME;
|
||||
|
||||
static GROUPNAME g_groupname[] =
|
||||
{
|
||||
{ QString::fromUtf8("Bread Units"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientBreadUnits },
|
||||
{ QString::fromUtf8("Calories"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientCalories },
|
||||
{ QString::fromUtf8("Joule"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientJoule },
|
||||
{ QString::fromUtf8("Bread Units"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientBreadUnits },
|
||||
{ QString::fromUtf8("Calories"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientCalories },
|
||||
{ QString::fromUtf8("Protein"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientProtein },
|
||||
{ QString::fromUtf8("Fat"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientFat },
|
||||
{ QString::fromUtf8("Carbohydrates"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientCarbohydrates },
|
||||
{ QString::fromUtf8("Alcohol"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientAlcohol },
|
||||
{ QString::fromUtf8("Water"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientWater },
|
||||
{ QString::fromUtf8("Total Dietary Fibre"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientTotalDietaryFibre },
|
||||
{ QString::fromUtf8("Cholesterol"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientCholesterol },
|
||||
{ QString::fromUtf8("Mineral"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientMineral },
|
||||
{ QString::fromUtf8("Sugar"), QString::fromUtf8("Main Ingredients"), cIngredient::iIngredientSugar },
|
||||
|
||||
{ QString::fromUtf8("Vitamin A Retinol"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminARetinol },
|
||||
{ QString::fromUtf8("Vitamin D"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminD },
|
||||
{ QString::fromUtf8("Vitamin E activ."), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminEactiv },
|
||||
{ QString::fromUtf8("Folic acid"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientFolicacid },
|
||||
{ QString::fromUtf8("Vitamin B1"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminB1 },
|
||||
{ QString::fromUtf8("Vitamin B2"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminB2 },
|
||||
{ QString::fromUtf8("Vitamin B6"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminB6 },
|
||||
{ QString::fromUtf8("Vitamin C"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminC },
|
||||
{ QString::fromUtf8("a-Tocopherol"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientaTocopherol },
|
||||
{ QString::fromUtf8("Vitamin K"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminK },
|
||||
{ QString::fromUtf8("Nicotinamide"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientNicotinamide },
|
||||
{ QString::fromUtf8("Pantothenic acid"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientPantothenicacid },
|
||||
{ QString::fromUtf8("Biotin"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientBiotin },
|
||||
{ QString::fromUtf8("Vitamin B12"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientVitaminB12 },
|
||||
{ QString::fromUtf8("Retinolequivalent"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientRetinolequivalent },
|
||||
{ QString::fromUtf8("ß-Carotene"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientbCarotene },
|
||||
{ QString::fromUtf8("Niacinequivalent"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientNiacinequivalent },
|
||||
{ QString::fromUtf8("free folic acid equivalent"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientfreefolicacidequivalent },
|
||||
{ QString::fromUtf8("free folic acid"), QString::fromUtf8("Vitamins"), cIngredient::iIngredientfreefolicacid },
|
||||
|
||||
{ QString::fromUtf8("Sodium"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientSodium },
|
||||
{ QString::fromUtf8("Potassium"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientPotassium },
|
||||
{ QString::fromUtf8("Magnesium"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientMagnesium },
|
||||
{ QString::fromUtf8("Calcium"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientCalcium },
|
||||
{ QString::fromUtf8("Iron"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientIron },
|
||||
{ QString::fromUtf8("Phosphorus"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientPhosphorus },
|
||||
{ QString::fromUtf8("Copper"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientCopper },
|
||||
{ QString::fromUtf8("Zinc"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientZinc },
|
||||
{ QString::fromUtf8("Chloride"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientChloride },
|
||||
{ QString::fromUtf8("Fluoride"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientFluoride },
|
||||
{ QString::fromUtf8("Iodide"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientIodide },
|
||||
{ QString::fromUtf8("Selenium"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientSelenium },
|
||||
{ QString::fromUtf8("Manganese"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientManganese },
|
||||
{ QString::fromUtf8("Sulphur"), QString::fromUtf8("Minerals and Trace Elements"), cIngredient::iIngredientSulphur },
|
||||
|
||||
{ QString::fromUtf8("Arginine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientArginine },
|
||||
{ QString::fromUtf8("Cystine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientCystine },
|
||||
{ QString::fromUtf8("Histidine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientHistidine },
|
||||
{ QString::fromUtf8("Isoleucine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientIsoleucine },
|
||||
{ QString::fromUtf8("Leucine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientLeucine },
|
||||
{ QString::fromUtf8("Lysine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientLysine },
|
||||
{ QString::fromUtf8("Methionine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientMethionine },
|
||||
{ QString::fromUtf8("Phenylalanine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientPhenylalanine },
|
||||
{ QString::fromUtf8("Threonine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientThreonine },
|
||||
{ QString::fromUtf8("Tryptophane"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientTryptophane },
|
||||
{ QString::fromUtf8("Tyrosine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientTyrosine },
|
||||
{ QString::fromUtf8("Valine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientValine },
|
||||
{ QString::fromUtf8("Alanine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientAlanine },
|
||||
{ QString::fromUtf8("Aspartic"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientAspartid },
|
||||
{ QString::fromUtf8("Aspartic acid"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientAsparticacid },
|
||||
{ QString::fromUtf8("Glutamic"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientGlutamid },
|
||||
{ QString::fromUtf8("Glutamic acid"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientGlutamicacid },
|
||||
{ QString::fromUtf8("Glycine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientGlycine },
|
||||
{ QString::fromUtf8("Proline"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientProline },
|
||||
{ QString::fromUtf8("Serine"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientSerine },
|
||||
{ QString::fromUtf8("other essent. amino acids"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientotheressent_aminoacids },
|
||||
{ QString::fromUtf8("essent. amino acids"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientessent_aminoacids },
|
||||
{ QString::fromUtf8("other nonessent. amino acids"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientothernonessent_aminoacids },
|
||||
{ QString::fromUtf8("nonessent. amino acids"), QString::fromUtf8("Aminos Acids"), cIngredient::iIngredientnonessent_aminoacids },
|
||||
|
||||
{ QString::fromUtf8("Saturated fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientSaturatedfattyacids },
|
||||
{ QString::fromUtf8("Monounsaturated fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientMonounsaturatedfattyacids },
|
||||
{ QString::fromUtf8("Polyunsaturated fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientPolyunsaturatedfattyacids },
|
||||
{ QString::fromUtf8("Butyric acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientButyricacid },
|
||||
{ QString::fromUtf8("Caproic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientCaproicacid },
|
||||
{ QString::fromUtf8("Caprylic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientCaprylicacid },
|
||||
{ QString::fromUtf8("Capric acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientCapricacid },
|
||||
{ QString::fromUtf8("Lauric acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientLauricacid },
|
||||
{ QString::fromUtf8("Myristic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientMyristicacid },
|
||||
{ QString::fromUtf8("C15:O fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC15_O_fattyacid },
|
||||
{ QString::fromUtf8("Palmitic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientPalmiticacid },
|
||||
{ QString::fromUtf8("Margaric acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientMargaricacid },
|
||||
{ QString::fromUtf8("Stearic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientStearicacid },
|
||||
{ QString::fromUtf8("Arachic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientArachicacid },
|
||||
{ QString::fromUtf8("Behenic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientBehenicacid },
|
||||
{ QString::fromUtf8("Lignoceric acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientLignocericacid },
|
||||
{ QString::fromUtf8("Palmitoleic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientPalmitoleicacid },
|
||||
{ QString::fromUtf8("Oleic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientOleicacid },
|
||||
{ QString::fromUtf8("Eicosenic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientEicosenicacid },
|
||||
{ QString::fromUtf8("C22:1 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC22_1_fattyacid },
|
||||
{ QString::fromUtf8("C14:1 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC14_1_fattyacid },
|
||||
{ QString::fromUtf8("C24:1 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC24_1_fattyacid },
|
||||
{ QString::fromUtf8("Linoleic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientLinoleicacid },
|
||||
{ QString::fromUtf8("Linolenic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientLinolenicacid },
|
||||
{ QString::fromUtf8("Arachidonic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientArachidonicacid },
|
||||
{ QString::fromUtf8("C18:4 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC18_4_fattyacid },
|
||||
{ QString::fromUtf8("C20:5 N-3 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC20_5_N_3fattyacid },
|
||||
{ QString::fromUtf8("C22:5 N-3 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC22_5_N_3fattyacid },
|
||||
{ QString::fromUtf8("C22:6 N-3 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC22_6_N_3fattyacid },
|
||||
{ QString::fromUtf8("C16:2 fatty acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientC16_2_fattyacid },
|
||||
{ QString::fromUtf8("other saturated fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientothersaturatedfattyacids },
|
||||
{ QString::fromUtf8("other monounsaturated fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientothermonounsaturatedfattyacids },
|
||||
{ QString::fromUtf8("Nonadecatrienic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientNonadecatrienicacid },
|
||||
{ QString::fromUtf8("Eicosadienic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientEicosadienicacid },
|
||||
{ QString::fromUtf8("Eicosatrienic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientEicosatrienicacid },
|
||||
{ QString::fromUtf8("Docosadienic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientDocosadienicacid },
|
||||
{ QString::fromUtf8("Docosatrienic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientDocosatrienicacid },
|
||||
{ QString::fromUtf8("Docosatetraenic acid"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientDocosatetraenicacid },
|
||||
{ QString::fromUtf8("other polyunsat. fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientotherpolyunsat_fattyacids },
|
||||
{ QString::fromUtf8("other short-chain fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientothershort_chainfattyacids },
|
||||
{ QString::fromUtf8("short-chain fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientshort_chainfattyacids },
|
||||
{ QString::fromUtf8("other medium-chain fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientothermedium_chainfattyacids },
|
||||
{ QString::fromUtf8("medium-chain fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientmedium_chainfattyacids },
|
||||
{ QString::fromUtf8("other long-chain fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientotherlong_chainfattyacids },
|
||||
{ QString::fromUtf8("long-chain fatty acids"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientlong_chainfattyacids },
|
||||
{ QString::fromUtf8("Glycerol and Lipoides"), QString::fromUtf8("Fatty Acids"), cIngredient::iIngredientGlycerolandLipoides },
|
||||
|
||||
{ QString::fromUtf8("Sorbitol"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientSorbitol },
|
||||
{ QString::fromUtf8("Glucose"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientGlucose },
|
||||
{ QString::fromUtf8("Fructose"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientFructose },
|
||||
{ QString::fromUtf8("Sucrose"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientSucrose },
|
||||
{ QString::fromUtf8("Lactose"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientLactose },
|
||||
{ QString::fromUtf8("Starch"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientStarch },
|
||||
{ QString::fromUtf8("Maltose"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientMaltose },
|
||||
{ QString::fromUtf8("Galactose"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientGalactose },
|
||||
{ QString::fromUtf8("Glycogene"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientGlycogene },
|
||||
{ QString::fromUtf8("Pentosan"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientPentosan },
|
||||
{ QString::fromUtf8("Hexosan"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientHexosan },
|
||||
{ QString::fromUtf8("Cellulose"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientCellulose },
|
||||
{ QString::fromUtf8("Polyuronic acid"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientPolyuronicacid },
|
||||
{ QString::fromUtf8("Mannitol"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientMannitol },
|
||||
{ QString::fromUtf8("Xylitol"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientXylitol },
|
||||
{ QString::fromUtf8("other sugar alcohols"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientothersugaralcohols },
|
||||
{ QString::fromUtf8("Total sugar alcohols"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientTotalsugaralcohols },
|
||||
{ QString::fromUtf8("other monosaccharides"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientothermonosaccharides },
|
||||
{ QString::fromUtf8("Monosaccharides"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientMonosaccharides },
|
||||
{ QString::fromUtf8("other disaccharides"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientotherdisaccharides },
|
||||
{ QString::fromUtf8("Disaccharides"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientDisaccharides },
|
||||
{ QString::fromUtf8("Oligosaccharides resorb."), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientOligosaccharidesresorb },
|
||||
{ QString::fromUtf8("Oligosaccharides nonresorb."), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientOligosaccharidesnonresorb },
|
||||
{ QString::fromUtf8("other polysaccharides"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientotherpolysaccharides },
|
||||
{ QString::fromUtf8("Polysaccharides"), QString::fromUtf8("Special Carbohydrates"), cIngredient::iIngredientPolysaccharides },
|
||||
|
||||
{ QString::fromUtf8("Dietary fibre water soluble"), QString::fromUtf8("Others"), cIngredient::iIngredientDietaryfibrewatersoluble },
|
||||
{ QString::fromUtf8("Dietary fibre water insoluble"), QString::fromUtf8("Others"), cIngredient::iIngredientDietaryfibrewaterinsoluble },
|
||||
{ QString::fromUtf8("Lignin"), QString::fromUtf8("Others"), cIngredient::iIngredientLignin },
|
||||
{ QString::fromUtf8("Purine bases nitrogen"), QString::fromUtf8("Others"), cIngredient::iIngredientPurinebasesnitrogen },
|
||||
{ QString::fromUtf8("Sodium chloride"), QString::fromUtf8("Others"), cIngredient::iIngredientSodiumchloride },
|
||||
{ QString::fromUtf8("Waste"), QString::fromUtf8("Others"), cIngredient::iIngredientWaste },
|
||||
{ QString::fromUtf8("other proteins"), QString::fromUtf8("Others"), cIngredient::iIngredientotherproteins },
|
||||
{ QString::fromUtf8("animal protein"), QString::fromUtf8("Others"), cIngredient::iIngredientanimalprotein },
|
||||
{ QString::fromUtf8("plant protein"), QString::fromUtf8("Others"), cIngredient::iIngredientplantprotein },
|
||||
{ QString::fromUtf8("Uric acid"), QString::fromUtf8("Others"), cIngredient::iIngredientUricacid },
|
||||
{ QString::fromUtf8("other organic acids"), QString::fromUtf8("Others"), cIngredient::iIngredientotherorganicacids },
|
||||
{ QString::fromUtf8("Mol-diff. cations-anions"), QString::fromUtf8("Others"), cIngredient::iIngredientMol_diff_cations_anions },
|
||||
{ QString::fromUtf8("Nitrogen factor"), QString::fromUtf8("Others"), cIngredient::iIngredientNitrogenfactor },
|
||||
{ QString::fromUtf8("Fatty acid part"), QString::fromUtf8("Others"), cIngredient::iIngredientFattyacidpart },
|
||||
{ QString::fromUtf8("Minerals part"), QString::fromUtf8("Others"), cIngredient::iIngredientMineralspart },
|
||||
{ QString::fromUtf8("P/S Ratio"), QString::fromUtf8("Others"), cIngredient::iIngredientPS_Ratio },
|
||||
{ QString::fromUtf8("Biological value"), QString::fromUtf8("Others"), cIngredient::iIngredientBiologicalvalue },
|
||||
{ QString::fromUtf8("Fructose free bread units"), QString::fromUtf8("Others"), cIngredient::iIngredientFructosefreebreadunits },
|
||||
{ QString::fromUtf8("average consumption"), QString::fromUtf8("Others"), cIngredient::iIngredientaverageconsumption },
|
||||
};
|
||||
|
||||
cIngredient::cIngredient(const QString &szIngredientName) :
|
||||
m_szIngredientName(szIngredientName),
|
||||
m_iID(0)
|
||||
{
|
||||
for(int z = 0;z < iIngredientMax;z++)
|
||||
m_dValue[z] = -1;
|
||||
}
|
||||
|
||||
bool cIngredient::reload(cPlugin* /*lpDB*/)
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool cIngredient::save(cPlugin* lpDB)
|
||||
{
|
||||
if(!lpDB)
|
||||
return(false);
|
||||
|
||||
cDBInterface* lpInterface = lpDB->dbInterface();
|
||||
|
||||
lpInterface->beginTransaction();
|
||||
|
||||
qint32 id = lpInterface->create(m_szIngredientName, "default");
|
||||
if(id == -1)
|
||||
return(false);
|
||||
|
||||
for(int z = 0;z < cIngredient::iIngredientMax;z++)
|
||||
{
|
||||
if(m_dValue[z] != -1)
|
||||
{
|
||||
if(!lpInterface->set(id, z, m_dValue[z]))
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
lpInterface->endTransaction();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
QString cIngredient::group(cIngredient::iIngredient i)
|
||||
{
|
||||
for(int z = 0;z < (int)sizeof(g_groupname)/(int)sizeof(GROUPNAME);z++)
|
||||
{
|
||||
if(g_groupname[z].iIngredient == i)
|
||||
return(g_groupname[z].szGroup);
|
||||
}
|
||||
return("unknown");
|
||||
}
|
||||
|
||||
|
||||
QString cIngredient::name(cIngredient::iIngredient i)
|
||||
{
|
||||
for(int z = 0;z < (int)sizeof(g_groupname)/(int)sizeof(GROUPNAME);z++)
|
||||
{
|
||||
if(g_groupname[z].iIngredient == i)
|
||||
return(g_groupname[z].szName);
|
||||
}
|
||||
return("unknown");
|
||||
}
|
||||
|
||||
void cIngredient::setValue(cIngredient::iIngredient i, qreal dValue)
|
||||
{
|
||||
m_dValue[i] = dValue;
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
/**
|
||||
* \class cIngredient
|
||||
*
|
||||
* \brief This class holds data of an ingredient.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* This class holds data of an ingredient.
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CINGREDIENT_H
|
||||
#define CINGREDIENT_H
|
||||
|
||||
|
||||
#include <QDate>
|
||||
#include <QString>
|
||||
|
||||
|
||||
class cPlugin;
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
class cIngredient
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
enum iIngredient
|
||||
{
|
||||
iIngredientBreadUnits = 0,
|
||||
iIngredientCalories = 1,
|
||||
iIngredientProtein = 2,
|
||||
iIngredientFat = 3,
|
||||
iIngredientCarbohydrates = 4,
|
||||
iIngredientAlcohol = 5,
|
||||
iIngredientWater = 6,
|
||||
iIngredientTotalDietaryFibre = 7,
|
||||
iIngredientCholesterol = 8,
|
||||
iIngredientMineral = 9,
|
||||
iIngredientVitaminARetinol = 10,
|
||||
iIngredientVitaminD = 11,
|
||||
iIngredientVitaminEactiv = 12,
|
||||
iIngredientFolicacid = 13,
|
||||
iIngredientVitaminB1 = 14,
|
||||
iIngredientVitaminB2 = 15,
|
||||
iIngredientVitaminB6 = 16,
|
||||
iIngredientVitaminC = 17,
|
||||
iIngredientaTocopherol = 18,
|
||||
iIngredientVitaminK = 19,
|
||||
iIngredientNicotinamide = 20,
|
||||
iIngredientPantothenicacid = 21,
|
||||
iIngredientBiotin = 22,
|
||||
iIngredientVitaminB12 = 23,
|
||||
iIngredientRetinolequivalent = 24,
|
||||
iIngredientbCarotene = 25,
|
||||
iIngredientNiacinequivalent = 26,
|
||||
iIngredientfreefolicacidequivalent = 27,
|
||||
iIngredientfreefolicacid = 28,
|
||||
iIngredientSodium = 29,
|
||||
iIngredientPotassium = 30,
|
||||
iIngredientMagnesium = 31,
|
||||
iIngredientCalcium = 32,
|
||||
iIngredientIron = 33,
|
||||
iIngredientPhosphorus = 34,
|
||||
iIngredientCopper = 35,
|
||||
iIngredientZinc = 36,
|
||||
iIngredientChloride = 37,
|
||||
iIngredientFluoride = 38,
|
||||
iIngredientIodide = 39,
|
||||
iIngredientSelenium = 40,
|
||||
iIngredientManganese = 41,
|
||||
iIngredientSulphur = 42,
|
||||
iIngredientArginine = 43,
|
||||
iIngredientCystine = 44,
|
||||
iIngredientHistidine = 45,
|
||||
iIngredientIsoleucine = 46,
|
||||
iIngredientLeucine = 47,
|
||||
iIngredientLysine = 48,
|
||||
iIngredientMethionine = 49,
|
||||
iIngredientPhenylalanine = 50,
|
||||
iIngredientThreonine = 51,
|
||||
iIngredientTryptophane = 52,
|
||||
iIngredientTyrosine = 53,
|
||||
iIngredientValine = 54,
|
||||
iIngredientAlanine = 55,
|
||||
iIngredientAsparticacid = 56,
|
||||
iIngredientGlutamicacid = 57,
|
||||
iIngredientGlycine = 58,
|
||||
iIngredientProline = 59,
|
||||
iIngredientSerine = 60,
|
||||
iIngredientotheressent_aminoacids = 61,
|
||||
iIngredientessent_aminoacids = 62,
|
||||
iIngredientothernonessent_aminoacids = 63,
|
||||
iIngredientnonessent_aminoacids = 64,
|
||||
iIngredientSaturatedfattyacids = 65,
|
||||
iIngredientMonounsaturatedfattyacids = 66,
|
||||
iIngredientPolyunsaturatedfattyacids = 67,
|
||||
iIngredientButyricacid = 68,
|
||||
iIngredientCaproicacid = 69,
|
||||
iIngredientCaprylicacid = 70,
|
||||
iIngredientCapricacid = 71,
|
||||
iIngredientLauricacid = 72,
|
||||
iIngredientMyristicacid = 73,
|
||||
iIngredientC15_O_fattyacid = 74,
|
||||
iIngredientPalmiticacid = 75,
|
||||
iIngredientMargaricacid = 76,
|
||||
iIngredientStearicacid = 77,
|
||||
iIngredientArachicacid = 78,
|
||||
iIngredientBehenicacid = 79,
|
||||
iIngredientLignocericacid = 80,
|
||||
iIngredientPalmitoleicacid = 81,
|
||||
iIngredientOleicacid = 82,
|
||||
iIngredientEicosenicacid = 83,
|
||||
iIngredientC22_1_fattyacid = 84,
|
||||
iIngredientC14_1_fattyacid = 85,
|
||||
iIngredientC24_1_fattyacid = 86,
|
||||
iIngredientLinoleicacid = 87,
|
||||
iIngredientLinolenicacid = 88,
|
||||
iIngredientArachidonicacid = 89,
|
||||
iIngredientC18_4_fattyacid = 90,
|
||||
iIngredientC20_5_N_3fattyacid = 91,
|
||||
iIngredientC22_5_N_3fattyacid = 92,
|
||||
iIngredientC22_6_N_3fattyacid = 93,
|
||||
iIngredientC16_2_fattyacid = 94,
|
||||
iIngredientothersaturatedfattyacids = 95,
|
||||
iIngredientothermonounsaturatedfattyacids = 96,
|
||||
iIngredientNonadecatrienicacid = 97,
|
||||
iIngredientEicosadienicacid = 98,
|
||||
iIngredientEicosatrienicacid = 99,
|
||||
iIngredientDocosadienicacid = 100,
|
||||
iIngredientDocosatrienicacid = 101,
|
||||
iIngredientDocosatetraenicacid = 102,
|
||||
iIngredientotherpolyunsat_fattyacids = 103,
|
||||
iIngredientothershort_chainfattyacids = 104,
|
||||
iIngredientshort_chainfattyacids = 105,
|
||||
iIngredientothermedium_chainfattyacids = 106,
|
||||
iIngredientmedium_chainfattyacids = 107,
|
||||
iIngredientotherlong_chainfattyacids = 108,
|
||||
iIngredientlong_chainfattyacids = 109,
|
||||
iIngredientGlycerolandLipoides = 110,
|
||||
iIngredientSorbitol = 111,
|
||||
iIngredientGlucose = 112,
|
||||
iIngredientFructose = 113,
|
||||
iIngredientSucrose = 114,
|
||||
iIngredientLactose = 115,
|
||||
iIngredientStarch = 116,
|
||||
iIngredientMaltose = 117,
|
||||
iIngredientGalactose = 118,
|
||||
iIngredientGlycogene = 119,
|
||||
iIngredientPentosan = 120,
|
||||
iIngredientHexosan = 121,
|
||||
iIngredientCellulose = 122,
|
||||
iIngredientPolyuronicacid = 123,
|
||||
iIngredientMannitol = 124,
|
||||
iIngredientXylitol = 125,
|
||||
iIngredientothersugaralcohols = 126,
|
||||
iIngredientTotalsugaralcohols = 127,
|
||||
iIngredientothermonosaccharides = 128,
|
||||
iIngredientMonosaccharides = 129,
|
||||
iIngredientotherdisaccharides = 130,
|
||||
iIngredientDisaccharides = 131,
|
||||
iIngredientOligosaccharidesresorb = 132,
|
||||
iIngredientOligosaccharidesnonresorb = 133,
|
||||
iIngredientotherpolysaccharides = 134,
|
||||
iIngredientPolysaccharides = 135,
|
||||
iIngredientDietaryfibrewatersoluble = 136,
|
||||
iIngredientDietaryfibrewaterinsoluble = 137,
|
||||
iIngredientLignin = 138,
|
||||
iIngredientPurinebasesnitrogen = 139,
|
||||
iIngredientSodiumchloride = 140,
|
||||
iIngredientWaste = 141,
|
||||
iIngredientotherproteins = 142,
|
||||
iIngredientanimalprotein = 143,
|
||||
iIngredientplantprotein = 144,
|
||||
iIngredientUricacid = 145,
|
||||
iIngredientotherorganicacids = 146,
|
||||
iIngredientMol_diff_cations_anions = 147,
|
||||
iIngredientNitrogenfactor = 148,
|
||||
iIngredientFattyacidpart = 149,
|
||||
iIngredientMineralspart = 150,
|
||||
iIngredientPS_Ratio = 151,
|
||||
iIngredientBiologicalvalue = 152,
|
||||
iIngredientFructosefreebreadunits = 153,
|
||||
iIngredientaverageconsumption = 154,
|
||||
iIngredientJoule = 155,
|
||||
iIngredientSugar = 156,
|
||||
iIngredientAspartid = 157,
|
||||
iIngredientGlutamid = 158,
|
||||
iIngredientMax,
|
||||
};
|
||||
|
||||
cIngredient(const QString& szIngredientName);
|
||||
|
||||
void setValue(cIngredient::iIngredient i, qreal dValue);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return bool
|
||||
*/
|
||||
bool reload(cPlugin* lpDB);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return bool
|
||||
*/
|
||||
bool save(cPlugin* lpDB);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param i
|
||||
\return QString
|
||||
*/
|
||||
static QString group(cIngredient::iIngredient i);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param i
|
||||
\return QString
|
||||
*/
|
||||
static QString name(cIngredient::iIngredient i);
|
||||
|
||||
void operator=(const cIngredient& D)
|
||||
{
|
||||
m_szIngredientName = D.m_szIngredientName;
|
||||
m_iID = D.m_iID;
|
||||
for(int z = 0;z < iIngredientMax;z++)
|
||||
m_dValue[z] = D.m_dValue[z];
|
||||
}
|
||||
|
||||
private:
|
||||
QString m_szIngredientName;
|
||||
qint32 m_iID;
|
||||
qreal m_dValue[iIngredientMax];
|
||||
};
|
||||
|
||||
#endif // CINGREDIENT_H
|
||||
@@ -0,0 +1,415 @@
|
||||
#include "cmainwindow.h"
|
||||
#include "ui_cmainwindow.h"
|
||||
#include "cimportinterface.h"
|
||||
#include "cingredient.h"
|
||||
|
||||
#include "typedef.h"
|
||||
|
||||
#include "coptions.h"
|
||||
|
||||
#include "cimportingredientdialog.h"
|
||||
|
||||
#include "cmessageanimatedialog.h"
|
||||
|
||||
#include <QPluginLoader>
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
#include <QDir>
|
||||
#include <QImage>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QThread>
|
||||
|
||||
|
||||
cMainWindow::cMainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::cMainWindow),
|
||||
m_lpIngredientsListModel(0),
|
||||
m_lpIngredientsListNew(0),
|
||||
m_lpIngredientsListImport(0),
|
||||
m_lpIngredientsListDelete(0),
|
||||
m_lpIngredientsListEdit(0),
|
||||
m_lpIngredientsListMenu(0),
|
||||
m_lpDB(0)
|
||||
{
|
||||
QThread::msleep(2000);
|
||||
init();
|
||||
}
|
||||
|
||||
cMainWindow::~cMainWindow()
|
||||
{
|
||||
if(m_lpIngredientsListNew)
|
||||
delete m_lpIngredientsListNew;
|
||||
if(m_lpIngredientsListDelete)
|
||||
delete m_lpIngredientsListDelete;
|
||||
if(m_lpIngredientsListEdit)
|
||||
delete m_lpIngredientsListEdit;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cMainWindow::init()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
if(settings.value("program/version", QVariant(-1.0)).toDouble() == -1.0)
|
||||
initDefaultSettings();
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
loadPlugins("plugins");
|
||||
|
||||
m_lpIngredientsListModel = new QStandardItemModel(0, 1);
|
||||
ui->m_lpIngredientsList->setModel(m_lpIngredientsListModel);
|
||||
|
||||
connect(ui->m_lpMenu_File_Exit, SIGNAL(triggered(bool)), this, SLOT(menuFileExitTriggered()));
|
||||
connect(ui->m_lpMenu_Tools_Options, SIGNAL(triggered(bool)), this, SLOT(menuToolsOptionsTriggered()));
|
||||
|
||||
ui->m_lpIngredientsList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(ui->m_lpIngredientsList, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(ingredientsListCustomContextMenu(const QPoint &)));
|
||||
m_lpIngredientsListMenu = new QMenu(ui->m_lpIngredientsList);
|
||||
|
||||
m_lpIngredientsListNew = new QAction("&New", m_lpIngredientsListMenu);
|
||||
m_lpIngredientsListMenu->addAction(m_lpIngredientsListNew);
|
||||
connect(m_lpIngredientsListNew, SIGNAL(triggered(bool)), this, SLOT(ingredientsListNewTriggered()));
|
||||
|
||||
m_lpIngredientsListImport = new QAction("&Import", m_lpIngredientsListMenu);
|
||||
m_lpIngredientsListMenu->addAction(m_lpIngredientsListImport);
|
||||
connect(m_lpIngredientsListImport, SIGNAL(triggered(bool)), this, SLOT(ingredientsListImportTriggered()));
|
||||
|
||||
m_lpIngredientsListDelete = new QAction("&Delete", m_lpIngredientsListMenu);
|
||||
m_lpIngredientsListMenu->addAction(m_lpIngredientsListDelete);
|
||||
connect(m_lpIngredientsListDelete, SIGNAL(triggered(bool)), this, SLOT(ingredientsListDeleteTriggered()));
|
||||
|
||||
m_lpIngredientsListEdit = new QAction("&Edit", m_lpIngredientsListMenu);
|
||||
m_lpIngredientsListMenu->addAction(m_lpIngredientsListEdit);
|
||||
connect(m_lpIngredientsListEdit, SIGNAL(triggered(bool)), this, SLOT(ingredientsListEditTriggered()));
|
||||
|
||||
bool bConnected = false;
|
||||
|
||||
while(!bConnected)
|
||||
{
|
||||
if(!m_lpDB)
|
||||
{
|
||||
if(QMessageBox::critical(this, "Warning", tr("Database can't be opened. Do you want to configure plugins?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
{
|
||||
QTimer::singleShot(0, this, SLOT(menuFileExitTriggered()));
|
||||
return;
|
||||
}
|
||||
|
||||
menuToolsOptionsTriggered();
|
||||
}
|
||||
else if(!m_lpDB->dbInterface())
|
||||
{
|
||||
if(QMessageBox::critical(this, "Warning", tr("Database can't be opened. Do you want to configure plugins?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
{
|
||||
QTimer::singleShot(0, this, SLOT(menuFileExitTriggered()));
|
||||
return;
|
||||
}
|
||||
|
||||
menuToolsOptionsTriggered();
|
||||
}
|
||||
else if(!m_lpDB->dbInterface()->connect())
|
||||
{
|
||||
if(QMessageBox::critical(this, "Warning", tr("Database can't be opened. Do you want to configure plugins?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
{
|
||||
QTimer::singleShot(0, this, SLOT(menuFileExitTriggered()));
|
||||
return;
|
||||
}
|
||||
|
||||
menuToolsOptionsTriggered();
|
||||
}
|
||||
else
|
||||
bConnected = true;
|
||||
}
|
||||
loadIngredients();
|
||||
}
|
||||
|
||||
void cMainWindow::initDefaultSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
QDir dir;
|
||||
|
||||
settings.setValue("program/version", QVariant(0.1));
|
||||
settings.setValue("program/dataDir", QVariant(QString("%1/.kooky").arg(QDir::homePath())));
|
||||
settings.setValue("program/pluginDir", QVariant(QString("%1/.kooky/plugins").arg(QDir::homePath())));
|
||||
settings.setValue("program/receiptDir", QVariant(QString("%1/.kooky/receipts").arg(QDir::homePath())));
|
||||
settings.setValue("program/ingredientDir", QVariant(QString("%1/.kooky/ingredients").arg(QDir::homePath())));
|
||||
settings.setValue("program/imageDir", QVariant(QString("%1/.kooky/images").arg(QDir::homePath())));
|
||||
|
||||
dir.mkpath(settings.value("program/dataDir").toString());
|
||||
dir.mkpath(settings.value("program/pluginDir").toString());
|
||||
dir.mkpath(settings.value("program/receiptDir").toString());
|
||||
dir.mkpath(settings.value("program/ingredientDir").toString());
|
||||
dir.mkpath(settings.value("program/imageDir").toString());
|
||||
}
|
||||
|
||||
void cMainWindow::loadPlugins(const QString& szPluginDir)
|
||||
{
|
||||
QCoreApplication::addLibraryPath(szPluginDir);
|
||||
QDir pluginDir(szPluginDir);
|
||||
QSettings settings;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QStringList szImportList = pluginDir.entryList(QStringList() << "i*.dll");
|
||||
QStringList szExportList = pluginDir.entryList(QStringList() << "e*.dll");
|
||||
QStringList szDBList = pluginDir.entryList(QStringList() << "d*.dll");
|
||||
#else
|
||||
QStringList szImportList = pluginDir.entryList(QStringList() << "libi*.so");
|
||||
QStringList szExportList = pluginDir.entryList(QStringList() << "libe*.so");
|
||||
QStringList szDBList = pluginDir.entryList(QStringList() << "libd*.so");
|
||||
#endif
|
||||
|
||||
for(int z = 0;z < szImportList.count();z++)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QString szFile = szImportList.at(z);
|
||||
#else
|
||||
QString szFile = szImportList.at(z).mid(3, szImportList.at(z).length()-6);
|
||||
#endif
|
||||
cPlugin* lpPlugin = new cPlugin(szFile);
|
||||
if(lpPlugin->isValid())
|
||||
{
|
||||
QAction* lpAction = new QAction(this);
|
||||
ui->m_lpMenu_Plugins_Import->addAction(lpAction);
|
||||
lpAction->setText(lpPlugin->pluginName());
|
||||
connect(lpAction, SIGNAL(triggered()), this, SLOT(pluginImportTriggered()));
|
||||
lpPlugin->setAction(lpAction);
|
||||
m_pluginList.append(lpPlugin);
|
||||
}
|
||||
}
|
||||
|
||||
for(int z = 0;z < szExportList.count();z++)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QString szFile = szExportList.at(z);
|
||||
#else
|
||||
QString szFile = szExportList.at(z).mid(3, szExportList.at(z).length()-6);
|
||||
#endif
|
||||
cPlugin* lpPlugin = new cPlugin(szFile);
|
||||
if(lpPlugin->isValid())
|
||||
{
|
||||
QAction* lpAction = new QAction(this);
|
||||
ui->m_lpMenu_Plugins_Export->addAction(lpAction);
|
||||
lpAction->setText(lpPlugin->pluginName());
|
||||
connect(lpAction, SIGNAL(triggered()), this, SLOT(pluginExportTriggered()));
|
||||
lpPlugin->setAction(lpAction);
|
||||
m_pluginList.append(lpPlugin);
|
||||
}
|
||||
}
|
||||
|
||||
for(int z = 0;z < szDBList.count();z++)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QString szFile = szDBList.at(z);
|
||||
#else
|
||||
QString szFile = szDBList.at(z).mid(3, szDBList.at(z).length()-6);
|
||||
#endif
|
||||
cPlugin* lpPlugin = new cPlugin(szFile);
|
||||
if(lpPlugin->isValid())
|
||||
{
|
||||
QAction* lpAction = new QAction(this);
|
||||
ui->m_lpMenu_Plugins_Database->addAction(lpAction);
|
||||
lpAction->setText(lpPlugin->pluginName());
|
||||
connect(lpAction, SIGNAL(triggered()), this, SLOT(pluginDBTriggered()));
|
||||
lpPlugin->setAction(lpAction);
|
||||
m_pluginList.append(lpPlugin);
|
||||
if(settings.value(QString("plugins/%1/enabled").arg(lpPlugin->pluginName()), QVariant(false)).toBool())
|
||||
m_lpDB = lpPlugin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cPlugin* cMainWindow::plugin(QAction* lpAction)
|
||||
{
|
||||
for(int z = 0;z < m_pluginList.count();z++)
|
||||
{
|
||||
if(m_pluginList.at(z)->action() == lpAction)
|
||||
return(m_pluginList.at(z));
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
QList<cPlugin*> cMainWindow::pluginList()
|
||||
{
|
||||
return(m_pluginList);
|
||||
}
|
||||
|
||||
void cMainWindow::loadIngredients()
|
||||
{
|
||||
m_lpIngredientsListModel->removeRows(0, m_lpIngredientsListModel->rowCount());
|
||||
|
||||
QString szOldGroup("");
|
||||
QStandardItem* lpGroupItem = 0;
|
||||
|
||||
if(m_lpDB)
|
||||
{
|
||||
cDBInterface* lpInterface = m_lpDB->dbInterface();
|
||||
if(lpInterface)
|
||||
{
|
||||
INGREDIENT_LIST ingredients = lpInterface->ingredients();
|
||||
for(int z = 0;z < ingredients.count();z++)
|
||||
{
|
||||
if(ingredients.at(z).szGroup != szOldGroup)
|
||||
{
|
||||
szOldGroup = ingredients.at(z).szGroup;
|
||||
lpGroupItem = new QStandardItem(szOldGroup);
|
||||
m_lpIngredientsListModel->appendRow(lpGroupItem);
|
||||
}
|
||||
QStandardItem* lpNew = new QStandardItem(ingredients.at(z).szIngredient);
|
||||
lpGroupItem->appendRow(lpNew);
|
||||
}
|
||||
}
|
||||
}
|
||||
ui->m_lpIngredientsList->expandAll();
|
||||
}
|
||||
|
||||
void cMainWindow::pluginImportTriggered()
|
||||
{
|
||||
/*
|
||||
QSettings settings;
|
||||
cIngredient ingredient(QString("%1/000001.ingredient").arg(settings.value("program/ingredientDir").toString()));
|
||||
ingredient.save();
|
||||
*/
|
||||
/*
|
||||
QAction* lpAction = qobject_cast<QAction *>(sender());
|
||||
if(lpAction)
|
||||
{
|
||||
cPlugin* lpPlugin = plugin(lpAction);
|
||||
if(lpPlugin)
|
||||
{
|
||||
cImportInterface* lpImportInterface = lpPlugin->importInterface();
|
||||
QString str = lpImportInterface->pluginName();
|
||||
if(lpImportInterface)
|
||||
{
|
||||
QStringList list = lpImportInterface->search("kuhmilch", "bla");
|
||||
|
||||
if(lpImportInterface->load(0))
|
||||
{
|
||||
qreal v;
|
||||
QString str;
|
||||
|
||||
str = lpImportInterface->group(cIngredient::iIngredientCarbohydrates);
|
||||
str = lpImportInterface->name(cIngredient::iIngredientCarbohydrates);
|
||||
v = lpImportInterface->value(cIngredient::iIngredientCarbohydrates);
|
||||
v = lpImportInterface->value(cIngredient::iIngredientBreadUnits);
|
||||
v = lpImportInterface->value(cIngredient::iIngredientWater);
|
||||
v = lpImportInterface->value(cIngredient::iIngredientCholesterol);
|
||||
v = lpImportInterface->value(cIngredient::iIngredientCopper);
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void cMainWindow::pluginExportTriggered()
|
||||
{
|
||||
}
|
||||
|
||||
void cMainWindow::pluginDBTriggered()
|
||||
{
|
||||
QAction* lpAction = qobject_cast<QAction *>(sender());
|
||||
if(lpAction)
|
||||
{
|
||||
cPlugin* lpPlugin = plugin(lpAction);
|
||||
if(lpPlugin)
|
||||
{
|
||||
if(!lpPlugin->pluginName().compare("MySQL DB"))
|
||||
{
|
||||
cDBInterface* lpDBInterface = lpPlugin->dbInterface();
|
||||
QString str = lpDBInterface->pluginName();
|
||||
if(lpDBInterface)
|
||||
lpDBInterface->init();
|
||||
}
|
||||
else if(!lpPlugin->pluginName().compare("SQLite DB"))
|
||||
{
|
||||
cDBInterface* lpDBInterface = lpPlugin->dbInterface();
|
||||
QString str = lpDBInterface->pluginName();
|
||||
if(lpDBInterface)
|
||||
lpDBInterface->init();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cMainWindow::menuFileExitTriggered()
|
||||
{
|
||||
qApp->exit();
|
||||
}
|
||||
|
||||
void cMainWindow::menuToolsOptionsTriggered()
|
||||
{
|
||||
cOptions options(this);
|
||||
if(options.exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
QSettings settings;
|
||||
|
||||
for(int z = 0;z < m_pluginList.count();z++)
|
||||
{
|
||||
cPlugin* lpPlugin = m_pluginList.at(z);
|
||||
if(lpPlugin->capability() == cPlugin::PluginCapDB)
|
||||
{
|
||||
if(settings.value(QString("plugins/%1/enabled").arg(lpPlugin->pluginName()), QVariant(false)).toBool())
|
||||
{
|
||||
if(lpPlugin != m_lpDB)
|
||||
{
|
||||
m_lpDB = lpPlugin;
|
||||
m_lpDB->dbInterface()->connect();
|
||||
loadIngredients();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cMainWindow::ingredientsListCustomContextMenu(const QPoint& point)
|
||||
{
|
||||
QModelIndex index = ui->m_lpIngredientsList->indexAt(point);
|
||||
if(index.isValid())
|
||||
{
|
||||
m_lpIngredientsListNew->setEnabled(true);
|
||||
m_lpIngredientsListDelete->setEnabled(true);
|
||||
m_lpIngredientsListEdit->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lpIngredientsListNew->setEnabled(true);
|
||||
m_lpIngredientsListDelete->setEnabled(false);
|
||||
m_lpIngredientsListEdit->setEnabled(false);
|
||||
}
|
||||
m_lpIngredientsListMenu->exec(ui->m_lpIngredientsList->mapToGlobal(point));
|
||||
}
|
||||
|
||||
void cMainWindow::ingredientsListNewTriggered()
|
||||
{
|
||||
}
|
||||
|
||||
void cMainWindow::ingredientsListImportTriggered()
|
||||
{
|
||||
cImportIngredientDialog importIngredientDialog(this);
|
||||
importIngredientDialog.setPluginList(m_pluginList);
|
||||
if(importIngredientDialog.exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
cMessageAnimateDialog* lpDialog = new cMessageAnimateDialog(this);
|
||||
lpDialog->setTitle("Import Ingredient");
|
||||
lpDialog->setMessage("Saving");
|
||||
lpDialog->show();
|
||||
|
||||
cIngredient ingredient = importIngredientDialog.toIngredient();
|
||||
ingredient.save(m_lpDB);
|
||||
loadIngredients();
|
||||
|
||||
delete lpDialog;
|
||||
}
|
||||
|
||||
void cMainWindow::ingredientsListDeleteTriggered()
|
||||
{
|
||||
}
|
||||
|
||||
void cMainWindow::ingredientsListEditTriggered()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* \defgroup KOOKY Kooky Main Program
|
||||
*
|
||||
* \brief
|
||||
*
|
||||
* This is the main program of Kooky.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \class cMainWindow
|
||||
*
|
||||
* \brief This is the class that implements the main window.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* This class implements the main window and main functionality of Kooky.
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CMAINWINDOW_H
|
||||
#define CMAINWINDOW_H
|
||||
|
||||
#include "cplugin.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMainWindow>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class cMainWindow;
|
||||
}
|
||||
|
||||
class cMainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* \brief Constructor.
|
||||
*
|
||||
* \param parent
|
||||
*/
|
||||
explicit cMainWindow(QWidget *parent = 0);
|
||||
/**
|
||||
* \brief Destructor.
|
||||
*
|
||||
*/
|
||||
~cMainWindow();
|
||||
|
||||
void loadIngredients();
|
||||
|
||||
/**
|
||||
* \brief Returns the list of loaded plugins.
|
||||
*
|
||||
* \return QList<cPlugin *> List of loaded plugins.
|
||||
*/
|
||||
QList<cPlugin*> pluginList();
|
||||
private slots:
|
||||
/**
|
||||
* \brief Testing of import trigger raised by import plugins
|
||||
*
|
||||
*/
|
||||
void pluginImportTriggered();
|
||||
/**
|
||||
* \brief Testing of export trigger raised by export plugins
|
||||
*
|
||||
*/
|
||||
void pluginExportTriggered();
|
||||
/**
|
||||
* \brief Testing of database trigger raised by database connector plugins
|
||||
*
|
||||
*/
|
||||
void pluginDBTriggered();
|
||||
/**
|
||||
* \brief Menu entry "File -> Exit" triggered.
|
||||
*
|
||||
*/
|
||||
void menuFileExitTriggered();
|
||||
/**
|
||||
* \brief Menu entry "Tools -> Options" triggered.
|
||||
*
|
||||
*/
|
||||
void menuToolsOptionsTriggered();
|
||||
|
||||
/**
|
||||
* \brief Custom contest menu of ingredients list has been requested.
|
||||
*
|
||||
* \param point Current position of mouse cursor.
|
||||
*/
|
||||
void ingredientsListCustomContextMenu(const QPoint& point);
|
||||
/**
|
||||
* \brief New ingredient has been requested.
|
||||
*
|
||||
*/
|
||||
void ingredientsListNewTriggered();
|
||||
/**
|
||||
* \brief Import of ingredient has been requested.
|
||||
*
|
||||
*/
|
||||
void ingredientsListImportTriggered();
|
||||
/**
|
||||
* \brief Delete of ingredient has been requested.
|
||||
*
|
||||
*/
|
||||
void ingredientsListDeleteTriggered();
|
||||
/**
|
||||
* \brief Edit of ingredient has been requested.
|
||||
*
|
||||
*/
|
||||
void ingredientsListEditTriggered();
|
||||
|
||||
private:
|
||||
Ui::cMainWindow* ui; /**< the main window GUI */
|
||||
QList<cPlugin*> m_pluginList; /**< List of loaded plugins */
|
||||
QStandardItemModel* m_lpIngredientsListModel; /**< standard item model for ingredients list */
|
||||
QAction* m_lpIngredientsListNew; /**< "New Ingredient" Action for ingredients context menu */
|
||||
QAction* m_lpIngredientsListImport; /**< "Import Ingredient" Action for ingredients context menu */
|
||||
QAction* m_lpIngredientsListDelete; /**< "Delee Ingredient" Action for ingredients context menu */
|
||||
QAction* m_lpIngredientsListEdit; /**< "Edit Ingredient" Action for ingredients context menu */
|
||||
QMenu* m_lpIngredientsListMenu; /**< Context menu for ingredients list */
|
||||
|
||||
cPlugin* m_lpDB;
|
||||
|
||||
/**
|
||||
* \brief Initialized main windows.
|
||||
*
|
||||
*/
|
||||
void init();
|
||||
/**
|
||||
* \brief Initializes default settings for Kooky.
|
||||
*
|
||||
*/
|
||||
void initDefaultSettings();
|
||||
/**
|
||||
* \brief Loads plugins in the given path.
|
||||
*
|
||||
* \param szPluginDir Path to plugins
|
||||
*/
|
||||
void loadPlugins(const QString& szPluginDir);
|
||||
/**
|
||||
* \brief Finds a plugin with the given action.
|
||||
*
|
||||
* \param lpAction Action of the plugin.
|
||||
* \return cPlugin Plugin corresponding to the action, NULL if not found.
|
||||
*/
|
||||
cPlugin* plugin(QAction* lpAction);
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // CMAINWINDOW_H
|
||||
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cMainWindow</class>
|
||||
<widget class="QMainWindow" name="cMainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1124</width>
|
||||
<height>624</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Kooky</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_lpCentralWidget">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QTabWidget" name="m_lpTab">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_lpTabIngredients">
|
||||
<attribute name="title">
|
||||
<string>Ingredients</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeView" name="m_lpIngredientsList">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="m_lpTabReceips">
|
||||
<attribute name="title">
|
||||
<string>Receips</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="cMdiArea" name="m_lpMDIArea">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="m_lpMenuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1124</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="m_lpMenu_File">
|
||||
<property name="title">
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<addaction name="m_lpMenu_File_Exit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="m_lpMenuPlugins">
|
||||
<property name="title">
|
||||
<string>&Plugins</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="m_lpMenu_Plugins_Import">
|
||||
<property name="title">
|
||||
<string>&Import</string>
|
||||
</property>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="m_lpMenu_Plugins_Export">
|
||||
<property name="title">
|
||||
<string>&Export</string>
|
||||
</property>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="m_lpMenu_Plugins_Database">
|
||||
<property name="title">
|
||||
<string>Database</string>
|
||||
</property>
|
||||
</widget>
|
||||
<addaction name="m_lpMenu_Plugins_Import"/>
|
||||
<addaction name="m_lpMenu_Plugins_Export"/>
|
||||
<addaction name="m_lpMenu_Plugins_Database"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Tools">
|
||||
<property name="title">
|
||||
<string>&Tools</string>
|
||||
</property>
|
||||
<addaction name="m_lpMenu_Tools_Options"/>
|
||||
</widget>
|
||||
<addaction name="m_lpMenu_File"/>
|
||||
<addaction name="m_lpMenuPlugins"/>
|
||||
<addaction name="menu_Tools"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="m_lpMainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="m_lpStatusBar"/>
|
||||
<action name="m_lpMenu_File_Exit">
|
||||
<property name="text">
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+X</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDatabase">
|
||||
<property name="text">
|
||||
<string>Database</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionA">
|
||||
<property name="text">
|
||||
<string>a</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_lpMenu_Tools_Options">
|
||||
<property name="text">
|
||||
<string>&Options</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>cMdiArea</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>cmdiarea.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "cmdiarea.h"
|
||||
#include <QSettings>
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
cMdiArea::cMdiArea(QWidget *parent) :
|
||||
QMdiArea(parent)
|
||||
{
|
||||
QSettings settings;
|
||||
m_background = QImage(settings.value("program/background", QVariant(":/images/image1")).toString());
|
||||
}
|
||||
|
||||
void cMdiArea::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QMdiArea::paintEvent(event);
|
||||
|
||||
QPainter painter(viewport());
|
||||
QRect target = this->rect();
|
||||
QRect source = m_background.rect();
|
||||
|
||||
if(!source.width() || !source.height() || !m_background.width() || !m_background.height())
|
||||
return;
|
||||
|
||||
int w = target.height()*source.width()/source.height();
|
||||
int h = target.width()*source.height()/source.width();
|
||||
|
||||
if(w > target.width())
|
||||
target.setWidth(w);
|
||||
else if(h > target.height())
|
||||
target.setHeight(h);
|
||||
|
||||
painter.drawImage(target, m_background, source);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* \class cMDIArea
|
||||
*
|
||||
* \brief This class overwrites the default MDI area of the main window.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* This class overwrites the default MDI area of the main window. It also adds the capability to display a background image in the MDI area.
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CMDIAREA_H
|
||||
#define CMDIAREA_H
|
||||
|
||||
|
||||
#include <QMdiArea>
|
||||
#include <QImage>
|
||||
|
||||
|
||||
class cMdiArea : public QMdiArea
|
||||
{
|
||||
public:
|
||||
cMdiArea(QWidget * parent = 0);
|
||||
private:
|
||||
QImage m_background;
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
};
|
||||
|
||||
#endif // CMDIAREA_H
|
||||
@@ -0,0 +1,58 @@
|
||||
#include "cmessageanimatedialog.h"
|
||||
#include "ui_cmessageanimatedialog.h"
|
||||
|
||||
|
||||
cMessageAnimateDialog::cMessageAnimateDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::cMessageAnimateDialog),
|
||||
m_szMessage(""),
|
||||
m_lpTimer(0),
|
||||
m_iCount(0),
|
||||
m_iDirection(1)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
cMessageAnimateDialog::~cMessageAnimateDialog()
|
||||
{
|
||||
if(m_lpTimer)
|
||||
delete m_lpTimer;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cMessageAnimateDialog::setTitle(const QString& szTitle)
|
||||
{
|
||||
setWindowTitle(szTitle);
|
||||
}
|
||||
|
||||
void cMessageAnimateDialog::setMessage(const QString& szMessage)
|
||||
{
|
||||
m_szMessage = szMessage;
|
||||
ui->m_lpText->setText(m_szMessage);
|
||||
|
||||
if(m_lpTimer)
|
||||
delete m_lpTimer;
|
||||
|
||||
m_lpTimer = new QTimer(this);
|
||||
connect(m_lpTimer, SIGNAL(timeout()), this, SLOT(update()));
|
||||
m_lpTimer->start(500);
|
||||
}
|
||||
|
||||
void cMessageAnimateDialog::update()
|
||||
{
|
||||
m_iCount += m_iDirection;
|
||||
if(m_iCount == 4)
|
||||
{
|
||||
m_iCount = 2;
|
||||
m_iDirection = -1;
|
||||
}
|
||||
else if(m_iCount == -1)
|
||||
{
|
||||
m_iCount = 1;
|
||||
m_iDirection = 1;
|
||||
}
|
||||
QString sz = m_szMessage;
|
||||
for(int z = 0;z < m_iCount;z++)
|
||||
sz.append(".");
|
||||
ui->m_lpText->setText(sz);
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* \class cMessageAnimateDialog
|
||||
*
|
||||
* \brief Class to display a modal message dialog.
|
||||
*
|
||||
* Class to display a modal message dialog. Title and message can be configured.
|
||||
* The dialog displays the message and adds up to 3 points zwice a second to the message.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date $Date: 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CMESSAGEANIMATEDIALOG_H
|
||||
#define CMESSAGEANIMATEDIALOG_H
|
||||
|
||||
|
||||
#include <QDialog>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cMessageAnimateDialog;
|
||||
}
|
||||
|
||||
class cMessageAnimateDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* \brief constructor.
|
||||
*
|
||||
* \param parent
|
||||
*/
|
||||
explicit cMessageAnimateDialog(QWidget *parent = 0);
|
||||
/**
|
||||
* \brief destructor.
|
||||
*
|
||||
*/
|
||||
~cMessageAnimateDialog();
|
||||
|
||||
/**
|
||||
* \brief Sets the title of the dialog.
|
||||
*
|
||||
* \param szTitle Title text
|
||||
*/
|
||||
void setTitle(const QString& szTitle);
|
||||
/**
|
||||
* \brief Sets the message of the dialog.
|
||||
*
|
||||
* \param szMessage Message text
|
||||
*/
|
||||
void setMessage(const QString& szMessage);
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* \brief This function is called twice a second to update the displayed message.
|
||||
*
|
||||
*/
|
||||
void update();
|
||||
|
||||
private:
|
||||
Ui::cMessageAnimateDialog *ui; /*!< User interface of the dialog. */
|
||||
|
||||
protected:
|
||||
QString m_szMessage; /*!< Message to be displayed */
|
||||
QTimer* m_lpTimer; /*!< Timer object */
|
||||
int m_iCount; /*!< Number of points currently being displayed */
|
||||
int m_iDirection; /*!< Increase / decrease number of points */
|
||||
};
|
||||
|
||||
#endif // CMESSAGEANIMATEDIALOG_H
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cMessageAnimateDialog</class>
|
||||
<widget class="QDialog" name="cMessageAnimateDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>330</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="m_lpText">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,130 @@
|
||||
#include "coptions.h"
|
||||
#include "ui_coptions.h"
|
||||
|
||||
#include "coptionsplugins.h"
|
||||
#include "cplugininfo.h"
|
||||
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QPushButton>
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
cOptions::cOptions(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::cOptions),
|
||||
m_bOptionsTreeSelectionUndo(false)
|
||||
{
|
||||
init();
|
||||
|
||||
m_lpMainWindow = (cMainWindow*)parent;
|
||||
m_pluginList = m_lpMainWindow->pluginList();
|
||||
|
||||
m_lpPluginRoot = new QStandardItem("Plugins");
|
||||
m_lpOptionsTreeModel->appendRow(m_lpPluginRoot);
|
||||
|
||||
for(int z = 0;z < m_pluginList.count();z++)
|
||||
{
|
||||
QStandardItem* lpItemNew = new QStandardItem(m_pluginList.at(z)->pluginName());
|
||||
lpItemNew->setData(QVariant::fromValue(m_pluginList.at(z)), Qt::UserRole);
|
||||
m_lpPluginRoot->appendRow(lpItemNew);
|
||||
}
|
||||
ui->m_lpOptionsTree->expandAll();
|
||||
}
|
||||
|
||||
cOptions::~cOptions()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cOptions::init()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->m_lpButtonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
|
||||
|
||||
m_lpOptionsTreeModel = new QStandardItemModel(0, 1);
|
||||
ui->m_lpOptionsTree->setModel(m_lpOptionsTreeModel);
|
||||
|
||||
ui->m_lpSplitter->setStretchFactor(0, 0);
|
||||
ui->m_lpSplitter->setStretchFactor(1, 1);
|
||||
|
||||
connect(ui->m_lpOptionsTree->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(onOptionsTreeSelectionChanged(QItemSelection,QItemSelection)));
|
||||
}
|
||||
|
||||
void cOptions::onOptionsTreeSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected)
|
||||
{
|
||||
if(m_bOptionsTreeSelectionUndo)
|
||||
return;
|
||||
|
||||
QStandardItem* lpSelected = 0;
|
||||
QStandardItem* lpDeSelected = 0;
|
||||
|
||||
if(selected.indexes().count())
|
||||
lpSelected = m_lpOptionsTreeModel->itemFromIndex(selected.indexes().at(0));
|
||||
else
|
||||
return;
|
||||
|
||||
if(deselected.indexes().count())
|
||||
lpDeSelected = m_lpOptionsTreeModel->itemFromIndex(deselected.indexes().at(0));
|
||||
|
||||
if(lpDeSelected)
|
||||
{
|
||||
if(ui->m_lpButtonBox->button(QDialogButtonBox::Apply)->isEnabled())
|
||||
{
|
||||
if(QMessageBox::question(this, tr("Save"), tr("Data has been changed. Do you want to save?")) != QMessageBox::Yes)
|
||||
{
|
||||
m_bOptionsTreeSelectionUndo = true;
|
||||
ui->m_lpOptionsTree->setCurrentIndex(deselected.indexes().at(0));
|
||||
m_bOptionsTreeSelectionUndo = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
saveData(lpDeSelected);
|
||||
}
|
||||
|
||||
if(lpSelected == m_lpPluginRoot)
|
||||
{
|
||||
cOptionsPlugins* lpOptionsPlugins = new cOptionsPlugins(this);
|
||||
lpOptionsPlugins->setPlugins(m_pluginList);
|
||||
ui->m_lpOptionsScrollArea->setWidget(lpOptionsPlugins);
|
||||
connect(lpOptionsPlugins, SIGNAL(somethingChanged()), this, SLOT(somethingChanged()));
|
||||
}
|
||||
else
|
||||
{
|
||||
cPlugin* lpPlugin = lpSelected->data(Qt::UserRole).value<cPlugin*>();
|
||||
|
||||
cPluginInfo* lpPluginInfo = new cPluginInfo;
|
||||
lpPluginInfo->setInfo(lpPlugin);
|
||||
ui->m_lpOptionsScrollArea->setWidget(lpPluginInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void cOptions::somethingChanged()
|
||||
{
|
||||
ui->m_lpButtonBox->button(QDialogButtonBox::Apply)->setEnabled(true);
|
||||
}
|
||||
|
||||
bool cOptions::saveData(QStandardItem* lpItem)
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
void cOptions::on_m_lpButtonBox_clicked(QAbstractButton *button)
|
||||
{
|
||||
if(button == ui->m_lpButtonBox->button(QDialogButtonBox::Apply))
|
||||
{
|
||||
if(saveData())
|
||||
ui->m_lpButtonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void cOptions::on_m_lpButtonBox_accepted()
|
||||
{
|
||||
saveData();
|
||||
accept();
|
||||
}
|
||||
|
||||
void cOptions::on_m_lpButtonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* \class cOptions
|
||||
*
|
||||
* \brief This dialog displays all options.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
*
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef COPTIONS_H
|
||||
#define COPTIONS_H
|
||||
|
||||
#include "cmainwindow.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QStandardItemModel>
|
||||
#include <QItemSelection>
|
||||
#include <QAbstractButton>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cOptions;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
class cOptions : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param parent
|
||||
*/
|
||||
explicit cOptions(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
~cOptions();
|
||||
|
||||
private slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param selected
|
||||
\param deselected
|
||||
*/
|
||||
void onOptionsTreeSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
|
||||
void on_m_lpButtonBox_clicked(QAbstractButton *button);
|
||||
void on_m_lpButtonBox_accepted();
|
||||
void on_m_lpButtonBox_rejected();
|
||||
|
||||
void somethingChanged();
|
||||
private:
|
||||
Ui::cOptions* ui; /*!< TODO: describe */
|
||||
cMainWindow* m_lpMainWindow; /*!< TODO: describe */
|
||||
QList<cPlugin*> m_pluginList; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpOptionsTreeModel; /*!< TODO: describe */
|
||||
bool m_bOptionsTreeSelectionUndo;
|
||||
|
||||
QStandardItem* m_lpPluginRoot;
|
||||
|
||||
bool saveData(QStandardItem *lpItem = 0);
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
void init();
|
||||
};
|
||||
|
||||
#endif // COPTIONS_H
|
||||
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cOptions</class>
|
||||
<widget class="QDialog" name="cOptions">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>785</width>
|
||||
<height>516</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QSplitter" name="m_lpSplitter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QTreeView" name="m_lpOptionsTree">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>0</number>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QScrollArea" name="m_lpOptionsScrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>69</width>
|
||||
<height>465</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="m_lpButtonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>m_lpButtonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>cOptions</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_lpButtonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>cOptions</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,181 @@
|
||||
#include "coptionsplugins.h"
|
||||
#include "ui_coptionsplugins.h"
|
||||
#include "coptions.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QSettings>
|
||||
|
||||
|
||||
cOptionsPlugins::cOptionsPlugins(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::cOptionsPlugins)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
cOptionsPlugins::~cOptionsPlugins()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cOptionsPlugins::init()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_lpPluginsListModel = new QStandardItemModel(0, 4);
|
||||
ui->m_lpPluginsList->setModel(m_lpPluginsListModel);
|
||||
|
||||
QStringList headerLabels = QStringList() << tr("") << tr("Name") << tr("Version") << tr("Capability") << tr("File");
|
||||
m_lpPluginsListModel->setHorizontalHeaderLabels(headerLabels);
|
||||
|
||||
connect(ui->m_lpPluginsList->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(onOptionsPluginTreeSelectionChanged(QItemSelection,QItemSelection)));
|
||||
connect(ui->m_lpPluginsList, SIGNAL(doubleClicked(QModelIndex)), SLOT(onOptionsPluginTreeDoubleClicked(QModelIndex)));
|
||||
}
|
||||
|
||||
void cOptionsPlugins::setPlugins(QList<cPlugin*> &plugins)
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
for(int z = 0;z < plugins.count();z++)
|
||||
{
|
||||
QStandardItem* lpItemNew = new QStandardItem;
|
||||
m_lpPluginsListModel->appendRow(lpItemNew);
|
||||
QModelIndex index = m_lpPluginsListModel->indexFromItem(lpItemNew);
|
||||
m_lpPluginsListModel->setData(index, QVariant::fromValue(plugins.at(z)), Qt::UserRole);
|
||||
QCheckBox* lpCheckBox = new QCheckBox(this);
|
||||
lpCheckBox->setChecked(settings.value(QString("plugins/%1/enabled").arg(plugins.at(z)->pluginName()), QVariant(false)).toBool());
|
||||
ui->m_lpPluginsList->setIndexWidget(m_lpPluginsListModel->index(index.row(), 0), lpCheckBox);
|
||||
connect(lpCheckBox, SIGNAL(toggled(bool)), this, SLOT(onOptionsPluginTreePluginToggled(bool)));
|
||||
QStandardItem* lpItemText = new QStandardItem(plugins.at(z)->pluginName());
|
||||
m_lpPluginsListModel->setItem(index.row(), 1, lpItemText);
|
||||
QStandardItem* lpItemVersion = new QStandardItem(QString("%1").arg(plugins.at(z)->pluginVersion()));
|
||||
lpItemVersion->setTextAlignment(Qt::AlignRight);
|
||||
m_lpPluginsListModel->setItem(index.row(), 2, lpItemVersion);
|
||||
QString szPluginType;
|
||||
switch(plugins.at(z)->capability())
|
||||
{
|
||||
case cPlugin::PluginCapNone:
|
||||
szPluginType = "none";
|
||||
break;
|
||||
case cPlugin::PluginCapExport:
|
||||
szPluginType = "export";
|
||||
break;
|
||||
case cPlugin::PluginCapImport:
|
||||
szPluginType = "import";
|
||||
break;
|
||||
case cPlugin::PluginCapDB:
|
||||
szPluginType = "database";
|
||||
break;
|
||||
default:
|
||||
szPluginType = "unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
QStandardItem* lpItemType = new QStandardItem(szPluginType);
|
||||
m_lpPluginsListModel->setItem(index.row(), 3, lpItemType);
|
||||
|
||||
QStandardItem* lpItemFile = new QStandardItem(plugins.at(z)->pluginFile());
|
||||
m_lpPluginsListModel->setItem(index.row(), 4, lpItemFile);
|
||||
}
|
||||
ui->m_lpPluginsList->resizeColumnToContents(0);
|
||||
ui->m_lpPluginsList->resizeColumnToContents(1);
|
||||
ui->m_lpPluginsList->resizeColumnToContents(2);
|
||||
ui->m_lpPluginsList->resizeColumnToContents(3);
|
||||
ui->m_lpPluginsList->resizeColumnToContents(4);
|
||||
}
|
||||
|
||||
void cOptionsPlugins::onOptionsPluginTreeSelectionChanged(const QItemSelection& /*selected*/, const QItemSelection& /*deselected*/)
|
||||
{
|
||||
ui->m_lpButtonConfigure->setEnabled(true);
|
||||
}
|
||||
|
||||
void cOptionsPlugins::onOptionsPluginTreePluginToggled(bool /*b*/)
|
||||
{
|
||||
QObject* lpSender = QObject::sender();
|
||||
QCheckBox* lpCheckBox = 0;
|
||||
|
||||
QModelIndex index = m_lpPluginsListModel->index(0, 0);
|
||||
for(;index.isValid();index = m_lpPluginsListModel->index(index.row()+1, 0))
|
||||
{
|
||||
lpCheckBox = (QCheckBox*)ui->m_lpPluginsList->indexWidget(index);
|
||||
if(lpCheckBox == lpSender)
|
||||
break;
|
||||
}
|
||||
if(index.isValid())
|
||||
{
|
||||
cPlugin* lpPlugin = m_lpPluginsListModel->data(index, Qt::UserRole).value<cPlugin*>();
|
||||
if(lpPlugin)
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue(QString("plugins/%1/enabled").arg(lpPlugin->pluginName()), QVariant(lpCheckBox->isChecked()));
|
||||
|
||||
if(lpPlugin->capability() == cPlugin::PluginCapDB && lpCheckBox->isChecked())
|
||||
{
|
||||
for(int z = 0;z < m_lpPluginsListModel->rowCount();z++)
|
||||
{
|
||||
QStandardItem* lpItem = m_lpPluginsListModel->item(z, 0);
|
||||
cPlugin* lpPlugin1 = lpItem->data(Qt::UserRole).value<cPlugin*>();
|
||||
if(lpPlugin1 != lpPlugin)
|
||||
{
|
||||
if(lpPlugin1->capability() == cPlugin::PluginCapDB)
|
||||
{
|
||||
QCheckBox* lpCheckBox = (QCheckBox*)ui->m_lpPluginsList->indexWidget(m_lpPluginsListModel->index(z, 0));
|
||||
lpCheckBox->setChecked(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
emit somethingChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void cOptionsPlugins::onOptionsPluginTreeDoubleClicked(const QModelIndex& index)
|
||||
{
|
||||
QModelIndex selected = m_lpPluginsListModel->index(m_lpPluginsListModel->itemFromIndex(index)->row(), 0);
|
||||
showConfigDlg(selected);
|
||||
}
|
||||
|
||||
void cOptionsPlugins::on_m_lpButtonConfigure_clicked()
|
||||
{
|
||||
QModelIndex selected = m_lpPluginsListModel->index(m_lpPluginsListModel->itemFromIndex(ui->m_lpPluginsList->currentIndex())->row(), 0);
|
||||
|
||||
if(!selected.isValid())
|
||||
return;
|
||||
|
||||
showConfigDlg(selected);
|
||||
}
|
||||
|
||||
void cOptionsPlugins::showConfigDlg(const QModelIndex& index)
|
||||
{
|
||||
if(!index.isValid())
|
||||
return;
|
||||
|
||||
cPlugin* lpPlugin = m_lpPluginsListModel->data(index, Qt::UserRole).value<cPlugin*>();
|
||||
if(!lpPlugin)
|
||||
return;
|
||||
|
||||
switch(lpPlugin->capability())
|
||||
{
|
||||
case cPlugin::PluginCapDB:
|
||||
{
|
||||
cDBInterface* lpDBInterface = lpPlugin->dbInterface();
|
||||
if(lpDBInterface)
|
||||
lpDBInterface->config();
|
||||
break;
|
||||
}
|
||||
case cPlugin::PluginCapImport:
|
||||
{
|
||||
cImportInterface* lpImportInterface = lpPlugin->importInterface();
|
||||
if(lpImportInterface)
|
||||
lpImportInterface->config();
|
||||
break;
|
||||
}
|
||||
case cPlugin::PluginCapExport:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* \class cOptionsPlugins
|
||||
*
|
||||
* \brief This dialog displays all plugins.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
*
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef COPTIONSPLUGINS_H
|
||||
#define COPTIONSPLUGINS_H
|
||||
|
||||
#include "cplugin.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QItemSelection>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cOptionsPlugins;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
class cOptionsPlugins : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param parent
|
||||
*/
|
||||
explicit cOptionsPlugins(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
~cOptionsPlugins();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param plugins
|
||||
*/
|
||||
void setPlugins(QList<cPlugin*>& plugins);
|
||||
|
||||
signals:
|
||||
void somethingChanged();
|
||||
private slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param selected
|
||||
\param deselected
|
||||
*/
|
||||
void onOptionsPluginTreeSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param index
|
||||
*/
|
||||
void onOptionsPluginTreeDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param b
|
||||
*/
|
||||
void onOptionsPluginTreePluginToggled(bool b);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
void on_m_lpButtonConfigure_clicked();
|
||||
|
||||
private:
|
||||
Ui::cOptionsPlugins* ui; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpPluginsListModel; /*!< TODO: describe */
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
void init();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param index
|
||||
*/
|
||||
void showConfigDlg(const QModelIndex& index);
|
||||
};
|
||||
|
||||
#endif // COPTIONSPLUGINS_H
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cOptionsPlugins</class>
|
||||
<widget class="QWidget" name="cOptionsPlugins">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTreeView" name="m_lpPluginsList">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpButtonAdd">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpButtonDelete">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpButtonEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpButtonConfigure">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,165 @@
|
||||
#include "cplugin.h"
|
||||
#include <QObject>
|
||||
|
||||
|
||||
cPlugin::cPlugin(const QString& szFile) :
|
||||
m_lpPluginLoader(0),
|
||||
m_lpImportInterface(0),
|
||||
m_lpAction(0)
|
||||
{
|
||||
m_lpPluginLoader = new QPluginLoader(szFile);
|
||||
if(!m_lpPluginLoader)
|
||||
return;
|
||||
if(!m_lpPluginLoader->load())
|
||||
{
|
||||
delete m_lpPluginLoader;
|
||||
m_lpPluginLoader = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
QObject* lpObject = m_lpPluginLoader->instance();
|
||||
if(!lpObject)
|
||||
{
|
||||
delete m_lpPluginLoader;
|
||||
m_lpPluginLoader = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!szFile.left(1).compare("i", Qt::CaseInsensitive))
|
||||
{
|
||||
m_lpImportInterface = qobject_cast<cImportInterface*>(lpObject);
|
||||
if(!m_lpImportInterface)
|
||||
{
|
||||
delete m_lpPluginLoader;
|
||||
m_lpPluginLoader = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(!szFile.left(1).compare("d", Qt::CaseInsensitive))
|
||||
{
|
||||
m_lpDBInterface = qobject_cast<cDBInterface*>(lpObject);
|
||||
if(!m_lpDBInterface)
|
||||
{
|
||||
delete m_lpPluginLoader;
|
||||
m_lpPluginLoader = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cPlugin::~cPlugin()
|
||||
{
|
||||
if(m_lpPluginLoader)
|
||||
delete m_lpPluginLoader;
|
||||
}
|
||||
|
||||
bool cPlugin::isValid()
|
||||
{
|
||||
return(m_lpPluginLoader != 0);
|
||||
}
|
||||
|
||||
cPlugin::PluginCap cPlugin::capability()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(PluginCapImport);
|
||||
else if(m_lpDBInterface)
|
||||
return(PluginCapDB);
|
||||
return(PluginCapNone);
|
||||
}
|
||||
|
||||
QString cPlugin::pluginName()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->pluginName());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->pluginName());
|
||||
return("noname");
|
||||
}
|
||||
|
||||
qint16 cPlugin::pluginAPIVersion()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->pluginAPIVersion());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->pluginAPIVersion());
|
||||
return(0);
|
||||
}
|
||||
|
||||
qint16 cPlugin::pluginVersion()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->pluginVersion());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->pluginVersion());
|
||||
return(0);
|
||||
}
|
||||
|
||||
QString cPlugin::pluginFile()
|
||||
{
|
||||
return(m_lpPluginLoader->fileName());
|
||||
}
|
||||
|
||||
void cPlugin::setAction(QAction* lpAction)
|
||||
{
|
||||
m_lpAction = lpAction;
|
||||
}
|
||||
|
||||
QAction* cPlugin::action()
|
||||
{
|
||||
return(m_lpAction);
|
||||
}
|
||||
|
||||
cImportInterface* cPlugin::importInterface()
|
||||
{
|
||||
return(m_lpImportInterface);
|
||||
}
|
||||
|
||||
cDBInterface* cPlugin::dbInterface()
|
||||
{
|
||||
return(m_lpDBInterface);
|
||||
}
|
||||
|
||||
QString cPlugin::author()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->author());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->author());
|
||||
return("");
|
||||
}
|
||||
|
||||
QString cPlugin::company()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->company());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->company());
|
||||
return("");
|
||||
}
|
||||
|
||||
QString cPlugin::link()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->link());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->link());
|
||||
return("");
|
||||
}
|
||||
|
||||
QString cPlugin::description()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->description());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->description());
|
||||
return("");
|
||||
}
|
||||
|
||||
QString cPlugin::copyright()
|
||||
{
|
||||
if(m_lpImportInterface)
|
||||
return(m_lpImportInterface->copyright());
|
||||
else if(m_lpDBInterface)
|
||||
return(m_lpDBInterface->copyright());
|
||||
return("");
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* \class cPlugin
|
||||
*
|
||||
* \brief This class holds data of an plugin.
|
||||
*
|
||||
* \ingroup KOOKY
|
||||
*
|
||||
*
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CPLUGIN_H
|
||||
#define CPLUGIN_H
|
||||
|
||||
#include "cimportinterface.h"
|
||||
#include "cdbinterface.h"
|
||||
#include <QPluginLoader>
|
||||
#include <QAction>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
class cPlugin
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
enum PluginCap
|
||||
{
|
||||
PluginCapNone = 0,
|
||||
PluginCapImport = 1,
|
||||
PluginCapExport = 2,
|
||||
PluginCapDB = 3,
|
||||
};
|
||||
|
||||
cPlugin(const QString& szFile);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
~cPlugin();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return bool
|
||||
*/
|
||||
bool isValid();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return PluginCap
|
||||
*/
|
||||
PluginCap capability();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return QString
|
||||
*/
|
||||
QString pluginName();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return qint16
|
||||
*/
|
||||
qint16 pluginAPIVersion();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return qint16
|
||||
*/
|
||||
qint16 pluginVersion();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\param lpAction
|
||||
*/
|
||||
void setAction(QAction* lpAction);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return QAction
|
||||
*/
|
||||
QAction* action();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return QString
|
||||
*/
|
||||
QString pluginFile();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return cImportInterface
|
||||
*/
|
||||
cImportInterface* importInterface();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return cDBInterface
|
||||
*/
|
||||
cDBInterface* dbInterface();
|
||||
|
||||
QString author();
|
||||
QString company();
|
||||
QString link();
|
||||
QString description();
|
||||
QString copyright();
|
||||
|
||||
private:
|
||||
QPluginLoader* m_lpPluginLoader; /*!< TODO: describe */
|
||||
cImportInterface* m_lpImportInterface; /*!< TODO: describe */
|
||||
cDBInterface* m_lpDBInterface; /*!< TODO: describe */
|
||||
QAction* m_lpAction; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cPlugin*)
|
||||
|
||||
#endif // CPLUGIN_H
|
||||
@@ -0,0 +1,43 @@
|
||||
#include "cplugininfo.h"
|
||||
#include "cInterface.h"
|
||||
#include "ui_cplugininfo.h"
|
||||
|
||||
|
||||
cPluginInfo::cPluginInfo(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::cPluginInfo)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
cPluginInfo::~cPluginInfo()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cPluginInfo::setInfo(cPlugin *lpPlugin)
|
||||
{
|
||||
if(!lpPlugin)
|
||||
return;
|
||||
|
||||
ui->m_lpPluginName->setText(lpPlugin->pluginName());
|
||||
ui->m_lpCopyright->setText(lpPlugin->copyright());
|
||||
ui->m_lpFileName->setText(lpPlugin->pluginFile());
|
||||
|
||||
if(lpPlugin->capability() == cPlugin::PluginCapDB)
|
||||
ui->m_lpPluginType->setText(tr("Database"));
|
||||
else if(lpPlugin->capability() == cPlugin::PluginCapExport)
|
||||
ui->m_lpPluginType->setText(tr("Export"));
|
||||
else
|
||||
ui->m_lpPluginType->setText(tr("Import"));
|
||||
|
||||
ui->m_lpPluginVersion->setText(QString("%1").arg(lpPlugin->pluginVersion()));
|
||||
ui->m_lpPluginAPIVersion->setText(QString("%1").arg(lpPlugin->pluginAPIVersion()));
|
||||
ui->m_lpAuthor->setText(lpPlugin->author());
|
||||
ui->m_lpCompany->setText(lpPlugin->company());
|
||||
ui->m_lpLink->setText(QString("<a href=\"%1\">%1").arg(lpPlugin->link()));
|
||||
ui->m_lpLink->setTextFormat(Qt::RichText);
|
||||
ui->m_lpLink->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
ui->m_lpLink->setOpenExternalLinks(true);
|
||||
ui->m_lpDescription->setText(lpPlugin->description());
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef CPLUGININFO_H
|
||||
#define CPLUGININFO_H
|
||||
|
||||
|
||||
#include "cplugin.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cPluginInfo;
|
||||
}
|
||||
|
||||
class cPluginInfo : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit cPluginInfo(QWidget *parent = 0);
|
||||
~cPluginInfo();
|
||||
|
||||
void setInfo(cPlugin* lpPlugin);
|
||||
private:
|
||||
Ui::cPluginInfo *ui;
|
||||
};
|
||||
|
||||
#endif // CPLUGININFO_H
|
||||
@@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cPluginInfo</class>
|
||||
<widget class="QWidget" name="cPluginInfo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="m_lpFileName">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>File:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="m_lpAuthor">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="m_lpPluginType">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="m_lpPluginAPIVersion">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="m_lpPluginVersion">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>API Version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Author:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="m_lpPluginName">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="m_lpCompany">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Company:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Link:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="m_lpLink">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="m_lpCopyright">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Copyright:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="m_lpDescription">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,23 @@
|
||||
#include "csplashscreen.h"
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
cSplashScreen::cSplashScreen(const QPixmap &pixmap, Qt::WindowFlags f) :
|
||||
QSplashScreen(pixmap, f)
|
||||
{
|
||||
}
|
||||
|
||||
void cSplashScreen::drawContents(QPainter *painter)
|
||||
{
|
||||
QFont font = this->font();
|
||||
font.setPixelSize(15);
|
||||
font.setBold(true);
|
||||
this->setFont(font);
|
||||
|
||||
painter->setPen(Qt::white);
|
||||
QRect r = rect();
|
||||
r.setLeft(10);
|
||||
r.setTop(r.bottom()-20);
|
||||
painter->drawText(r, message());
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef CSPLASHSCREEN_H
|
||||
#define CSPLASHSCREEN_H
|
||||
|
||||
|
||||
#include <QSplashScreen>
|
||||
|
||||
|
||||
class cSplashScreen : public QSplashScreen
|
||||
{
|
||||
public:
|
||||
cSplashScreen(const QPixmap & pixmap = QPixmap(), Qt::WindowFlags f = 0);
|
||||
|
||||
virtual void drawContents(QPainter *painter);
|
||||
};
|
||||
|
||||
#endif // CSPLASHSCREEN_H
|
||||
@@ -0,0 +1,32 @@
|
||||
#include "cmainwindow.h"
|
||||
#include "csplashscreen.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QPixmap>
|
||||
#include <QThread>
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QPixmap pixmap(":/images/splash");
|
||||
cSplashScreen splashScreen(pixmap);
|
||||
splashScreen.show();
|
||||
splashScreen.showMessage("initializing ...");
|
||||
QThread::msleep(1000);
|
||||
|
||||
a.processEvents();
|
||||
|
||||
splashScreen.showMessage("loading database ...");
|
||||
|
||||
QCoreApplication::setOrganizationName("WIN-DESIGN");
|
||||
QCoreApplication::setOrganizationDomain("windesign.at");
|
||||
QCoreApplication::setApplicationName("Kooky");
|
||||
|
||||
cMainWindow w;
|
||||
w.showMaximized();
|
||||
splashScreen.finish(&w);
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<RCC>
|
||||
<qresource prefix="/images">
|
||||
<file alias="image1">resources/images/image1.jpg</file>
|
||||
<file alias="image2">resources/images/image2.jpg</file>
|
||||
<file alias="image3">resources/images/image3.jpg</file>
|
||||
<file alias="image4">resources/images/image4.jpg</file>
|
||||
<file alias="splash">resources/images/Splash.jpg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/logos">
|
||||
<file alias="logo1">resources/logos/logo1.jpg</file>
|
||||
<file alias="logo2">resources/logos/logo2.jpg</file>
|
||||
<file alias="logo3">resources/logos/logo3.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 723 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 281 KiB |
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 842 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,18 @@
|
||||
#ifndef TYPEDEF_H
|
||||
#define TYPEDEF_H
|
||||
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
|
||||
typedef struct tagINGREDIENT
|
||||
{
|
||||
QString szGroup;
|
||||
QString szIngredient;
|
||||
} INGREDIENT, *LPINGREDIENT;
|
||||
|
||||
typedef QList<INGREDIENT> INGREDIENT_LIST;
|
||||
|
||||
|
||||
#endif // TYPEDEF_H
|
||||
@@ -0,0 +1,100 @@
|
||||
#include "cconfigdialog.h"
|
||||
#include "ui_cconfigdialog.h"
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
#include <QCloseEvent>
|
||||
|
||||
|
||||
cConfigDialog::cConfigDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::cConfigDialog),
|
||||
m_bPasswordChanged(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
cConfigDialog::~cConfigDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cConfigDialog::setHostname(const QString& szHostname)
|
||||
{
|
||||
ui->m_lpHostname->setText(szHostname);
|
||||
}
|
||||
|
||||
void cConfigDialog::setDatabase(const QString& szDatabase)
|
||||
{
|
||||
ui->m_lpDatabase->setText(szDatabase);
|
||||
}
|
||||
|
||||
void cConfigDialog::setUserName(const QString& szUserName)
|
||||
{
|
||||
ui->m_lpUsername->setText(szUserName);
|
||||
}
|
||||
|
||||
void cConfigDialog::setPassword(const QString& szPassword)
|
||||
{
|
||||
ui->m_lpPassword->setText(szPassword);
|
||||
ui->m_lpPassword2->setText(szPassword);
|
||||
}
|
||||
|
||||
QString cConfigDialog::hostname()
|
||||
{
|
||||
return(ui->m_lpHostname->text());
|
||||
}
|
||||
|
||||
QString cConfigDialog::database()
|
||||
{
|
||||
return(ui->m_lpDatabase->text());
|
||||
}
|
||||
|
||||
QString cConfigDialog::userName()
|
||||
{
|
||||
return(ui->m_lpUsername->text());
|
||||
}
|
||||
|
||||
QString cConfigDialog::password()
|
||||
{
|
||||
return(ui->m_lpPassword->text());
|
||||
}
|
||||
|
||||
void cConfigDialog::on_m_lpTestButton_clicked()
|
||||
{
|
||||
}
|
||||
|
||||
void cConfigDialog::on_m_lpOKButton_clicked()
|
||||
{
|
||||
if(ui->m_lpPassword->text() != ui->m_lpPassword2->text())
|
||||
QMessageBox::critical(this, "Database", "password does not match");
|
||||
else
|
||||
accept();
|
||||
}
|
||||
|
||||
void cConfigDialog::on_m_lpCancelButton_clicked()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
void cConfigDialog::on_m_lpPassword_textChanged(const QString&/*arg1*/)
|
||||
{
|
||||
m_bPasswordChanged = true;
|
||||
if(ui->m_lpPassword->text() != ui->m_lpPassword2->text())
|
||||
ui->m_lpPasswordMatch->setText("password does not match");
|
||||
else
|
||||
ui->m_lpPasswordMatch->setText("");
|
||||
}
|
||||
|
||||
void cConfigDialog::on_m_lpPassword2_textChanged(const QString&/*arg1*/)
|
||||
{
|
||||
m_bPasswordChanged = true;
|
||||
if(ui->m_lpPassword->text() != ui->m_lpPassword2->text())
|
||||
ui->m_lpPasswordMatch->setText("password does not match");
|
||||
else
|
||||
ui->m_lpPasswordMatch->setText("");
|
||||
}
|
||||
|
||||
QWidget* cConfigDialog::widget()
|
||||
{
|
||||
return((QWidget*)ui->gridLayout);
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* \class cConfigDialog
|
||||
*
|
||||
* \brief Configuration Dialog for dMySQL
|
||||
*
|
||||
* \ingroup MYSQL
|
||||
*
|
||||
* This class implements basic import functionality for Kooky.
|
||||
* All functions may be overwritten by derriving classes.
|
||||
*
|
||||
* \note Attempts at zen rarely work.
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CCONFIGDIALOG_H
|
||||
#define CCONFIGDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QCloseEvent>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cConfigDialog;
|
||||
}
|
||||
|
||||
class cConfigDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\param parent
|
||||
*/
|
||||
explicit cConfigDialog(QWidget *parent = 0);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
~cConfigDialog();
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\param szHostname
|
||||
*/
|
||||
void setHostname(const QString& szHostname);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\param szDatabase
|
||||
*/
|
||||
void setDatabase(const QString& szDatabase);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\param szUserName
|
||||
*/
|
||||
void setUserName(const QString& szUserName);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\param szPassword
|
||||
*/
|
||||
void setPassword(const QString& szPassword);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\return QString
|
||||
*/
|
||||
QString hostname();
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\return QString
|
||||
*/
|
||||
QString database();
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\return QString
|
||||
*/
|
||||
QString userName();
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\return QString
|
||||
*/
|
||||
QString password();
|
||||
|
||||
QWidget* widget();
|
||||
private slots:
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
|
||||
*/
|
||||
void on_m_lpTestButton_clicked();
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\param arg1
|
||||
*/
|
||||
void on_m_lpPassword_textChanged(const QString &arg1);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
\param arg1
|
||||
*/
|
||||
void on_m_lpPassword2_textChanged(const QString &arg1);
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
void on_m_lpOKButton_clicked();
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
void on_m_lpCancelButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::cConfigDialog *ui; /*!< TODO: describe */
|
||||
bool m_bPasswordChanged; /*!< TODO: describe */
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // CCONFIGDIALOG_H
|
||||
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cConfigDialog</class>
|
||||
<widget class="QDialog" name="cConfigDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>398</width>
|
||||
<height>173</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MySQL Plugin - Configure</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" colspan="5">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Hostname:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="m_lpHostname">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Normal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Database:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="m_lpDatabase"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>User:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="m_lpUsername"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="m_lpPassword">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>retype Password:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="m_lpPassword2">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="m_lpPasswordMatch">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel { red; color : red; }</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="m_lpTestButton">
|
||||
<property name="text">
|
||||
<string>Test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>134</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="m_lpOKButton">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="m_lpCancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,353 @@
|
||||
#include "cmysqlplugin.h"
|
||||
#include "cconfigdialog.h"
|
||||
|
||||
#include <QSqlError>
|
||||
#include <QSettings>
|
||||
#include <QSqlQuery>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
bool cMySQLPlugin::connect()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
m_db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
m_db.setHostName(settings.value(QString("plugins/%1/hostName").arg(pluginName())).toString());
|
||||
m_db.setDatabaseName(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
m_db.setUserName(settings.value(QString("plugins/%1/userName").arg(pluginName())).toString());
|
||||
m_db.setPassword(settings.value(QString("plugins/%1/password").arg(pluginName())).toString());
|
||||
|
||||
return(open());
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::init()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
m_db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
m_db.setHostName(settings.value(QString("plugins/%1/hostName").arg(pluginName())).toString());
|
||||
m_db.setDatabaseName(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
m_db.setUserName(settings.value(QString("plugins/%1/userName").arg(pluginName())).toString());
|
||||
m_db.setPassword(settings.value(QString("plugins/%1/password").arg(pluginName())).toString());
|
||||
|
||||
m_bConnected = m_db.open();
|
||||
|
||||
if(m_bConnected)
|
||||
{
|
||||
QStringList tables = m_db.tables();
|
||||
if(tables.count())
|
||||
{
|
||||
if(QMessageBox::question(0, "Tables exist", "Database not empty.\nExisting tables will be deleted.\nContinue?", QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)
|
||||
return(m_bConnected);
|
||||
}
|
||||
QSqlQuery query(m_db);
|
||||
for(int z = 0;z < tables.count();z++)
|
||||
query.exec(QString("DROP TABLE %1;").arg(tables.at(z)));
|
||||
|
||||
if(!query.exec("CREATE TABLE `kooky`.settings ( `var` VARCHAR(100) NOT NULL , `val` VARCHAR(100) NOT NULL ) ENGINE = InnoDB;"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("INSERT INTO `kooky`.settings values ('version', '1.0');"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("CREATE TABLE `kooky`.ingredient_group ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, PRIMARY KEY (id) )"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("CREATE TABLE `kooky`.ingredient ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, ingredient_group_id INT NOT NULL, PRIMARY KEY (id) )"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("CREATE TABLE `kooky`.ingredient_values ( `id` INT NOT NULL AUTO_INCREMENT, `ingredient_id` INT NOT NULL, `ingredient_number` INT NOT NULL, `value` DOUBLE, PRIMARY KEY (id), FOREIGN KEY(ingredient_id) REFERENCES ingredient(id) )"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
createGroup("default");
|
||||
}
|
||||
else
|
||||
m_szLastError = m_db.lastError().text();
|
||||
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::open()
|
||||
{
|
||||
m_bConnected = m_db.open();
|
||||
|
||||
if(m_bConnected)
|
||||
{
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec("SELECT * FROM settings"))
|
||||
{
|
||||
init();
|
||||
|
||||
QSqlQuery query1(m_db);
|
||||
if(!query1.exec("SELECT * FROM settings"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
m_szLastError = m_db.lastError().text();
|
||||
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
QString cMySQLPlugin::lastError()
|
||||
{
|
||||
return(m_szLastError);
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::config()
|
||||
{
|
||||
cConfigDialog dlg;
|
||||
QSettings settings;
|
||||
dlg.setHostname(settings.value(QString("plugins/%1/hostName").arg(pluginName())).toString());
|
||||
dlg.setDatabase(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
dlg.setUserName(settings.value(QString("plugins/%1/userName").arg(pluginName())).toString());
|
||||
dlg.setPassword(settings.value(QString("plugins/%1/password").arg(pluginName())).toString());
|
||||
|
||||
if(dlg.exec() == QDialog::Accepted)
|
||||
{
|
||||
m_db.close();
|
||||
settings.setValue(QString("plugins/%1/hostName").arg(pluginName()), dlg.hostname());
|
||||
settings.setValue(QString("plugins/%1/databaseName").arg(pluginName()), dlg.database());
|
||||
settings.setValue(QString("plugins/%1/userName").arg(pluginName()), dlg.userName());
|
||||
settings.setValue(QString("plugins/%1/password").arg(pluginName()), dlg.password());
|
||||
|
||||
m_db.setHostName(settings.value(QString("plugins/%1/hostName").arg(pluginName())).toString());
|
||||
m_db.setDatabaseName(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
m_db.setUserName(settings.value(QString("plugins/%1/userName").arg(pluginName())).toString());
|
||||
m_db.setPassword(settings.value(QString("plugins/%1/password").arg(pluginName())).toString());
|
||||
return(open());
|
||||
}
|
||||
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
qint32 cMySQLPlugin::exists(const QString& szName, const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
qint32 iGroup = existsGroup(szGroup);
|
||||
if(iGroup == -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("SELECT id FROM ingredient WHERE name = \"%1\" AND ingredient_group_id=%2").arg(szName).arg(iGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
query.first();
|
||||
if(!query.isValid())
|
||||
return(-1);
|
||||
|
||||
return(query.value(0).toInt());
|
||||
}
|
||||
|
||||
qint32 cMySQLPlugin::existsGroup(const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("SELECT id FROM ingredient_group WHERE name = \"%1\"").arg(szGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
query.first();
|
||||
if(!query.isValid())
|
||||
return(-1);
|
||||
|
||||
return(query.value(0).toInt());
|
||||
}
|
||||
|
||||
qint32 cMySQLPlugin::existsIngredient(qint32 id, qint16 ingredientNumber)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("SELECT id FROM ingredient_values WHERE ingredient_id = %1 AND ingredient_number = %2").arg(id).arg(ingredientNumber)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
query.first();
|
||||
if(!query.isValid())
|
||||
return(-1);
|
||||
|
||||
return(query.value(0).toInt());
|
||||
}
|
||||
|
||||
qint32 cMySQLPlugin::create(const QString& szName, const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
qint32 iGroup = existsGroup(szGroup);
|
||||
if(iGroup == -1)
|
||||
return(-1);
|
||||
|
||||
if(exists(szName, szGroup) != -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("INSERT INTO ingredient (name, ingredient_group_id) VALUES (\"%1\", %2)").arg(szName).arg(iGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
return(exists(szName, szGroup));
|
||||
}
|
||||
|
||||
qint32 cMySQLPlugin::createGroup(const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
if(existsGroup(szGroup) != -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("INSERT INTO ingredient_group (name) VALUES (\"%1\")").arg(szGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
return(existsGroup(szGroup));
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::set(qint32 id, qint16 ingredientNumber, qreal value)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
if(existsIngredient(id, ingredientNumber) != -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("INSERT INTO ingredient_values (ingredient_id, ingredient_number, value) VALUES (%1, %2, %3)").arg(id).arg(ingredientNumber).arg(value)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
return(existsIngredient(id, ingredientNumber));
|
||||
}
|
||||
|
||||
INGREDIENT_LIST cMySQLPlugin::ingredients()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(INGREDIENT_LIST());
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("SELECT ingredient.name, ingredient_group.name FROM ingredient, ingredient_group WHERE ingredient.ingredient_group_id = ingredient_group.id ORDER BY ingredient_group.name, ingredient.name")))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(INGREDIENT_LIST());
|
||||
}
|
||||
|
||||
INGREDIENT_LIST list;
|
||||
while(query.next())
|
||||
{
|
||||
INGREDIENT i;
|
||||
i.szGroup = query.value(1).toString();
|
||||
i.szIngredient = query.value(0).toString();
|
||||
list.append(i);
|
||||
}
|
||||
|
||||
return(list);
|
||||
}
|
||||
|
||||
QStringList cMySQLPlugin::groups()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(QStringList());
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("SELECT name FROM ingredient_group ORDER BY name")))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(QStringList());
|
||||
}
|
||||
|
||||
QStringList list;
|
||||
while(query.next())
|
||||
list.append(query.value(0).toString());
|
||||
|
||||
return(list);
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::beginTransaction()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(false);
|
||||
QSqlQuery query(m_db);
|
||||
return(query.exec("SET autocommit = 0"));
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::endTransaction()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(false);
|
||||
QSqlQuery query(m_db);
|
||||
query.exec("SET autocommit = 1");
|
||||
return(m_db.commit());
|
||||
}
|
||||
|
||||
QString cMySQLPlugin::author()
|
||||
{
|
||||
return("Herwig Birke");
|
||||
}
|
||||
|
||||
QString cMySQLPlugin::company()
|
||||
{
|
||||
return("WIN-DESIGN");
|
||||
}
|
||||
|
||||
QString cMySQLPlugin::link()
|
||||
{
|
||||
return("http://www.windesign.at");
|
||||
}
|
||||
|
||||
QString cMySQLPlugin::description()
|
||||
{
|
||||
return("This is the description.");
|
||||
}
|
||||
|
||||
QString cMySQLPlugin::copyright()
|
||||
{
|
||||
return("This is the copyright.");
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* \defgroup MYSQL MySQL Database Connector Plugin
|
||||
*
|
||||
* \brief
|
||||
*
|
||||
* This module is designed to connect to MySQL Databases.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \class cMySQLPlugin
|
||||
*
|
||||
* \brief MySQL Database Connector Plugin class
|
||||
*
|
||||
* \ingroup MYSQL
|
||||
*
|
||||
* This class implements the database connector for MySQL.
|
||||
* All functions may be overwritten by derriving classes.
|
||||
*
|
||||
* \note
|
||||
*
|
||||
* \author Herwig Birke
|
||||
*
|
||||
* \version 1.0
|
||||
*
|
||||
* \date $Date: 2016/02/09
|
||||
*/
|
||||
|
||||
#ifndef CMYSQLPLUGIN_H
|
||||
#define CMYSQLPLUGIN_H
|
||||
|
||||
|
||||
#include "cdbinterface.h"
|
||||
|
||||
#include <QtCore>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QSqlDatabase>
|
||||
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
*/
|
||||
class cMySQLPlugin : public QObject, public cDBInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "cMySQLPlugin" FILE "dMySQL.json")
|
||||
Q_INTERFACES(cDBInterface)
|
||||
|
||||
public:
|
||||
/**
|
||||
* \brief Returns the version of the plugin API
|
||||
*
|
||||
* \return qint16 plugin API version
|
||||
*/
|
||||
qint16 pluginAPIVersion() { return(1); }
|
||||
/**
|
||||
* \brief Returns the name of the plugin
|
||||
*
|
||||
* \return QString name of the plugin
|
||||
*/
|
||||
QString pluginName() { return("MySQL DB"); }
|
||||
/**
|
||||
* \brief returns the version of the plugin
|
||||
*
|
||||
* \return qint16 version of the plugin
|
||||
*/
|
||||
qint16 pluginVersion() { return(1); }
|
||||
/**
|
||||
* \brief returns the type of the plugin.
|
||||
*
|
||||
* \return iType type of the plugin.
|
||||
*
|
||||
* Returns the type of the plugin. Possible values are:
|
||||
* <ul>
|
||||
* <li> cInterface::iTypeDB
|
||||
* <br> plugin provides DB connector
|
||||
* <li> cInterface::iTypeExport
|
||||
* <br> plugin provides export capabilities
|
||||
* <li> cInterface::iTypeImport
|
||||
* <br> plugin provides import capabilities
|
||||
* </ol>
|
||||
* </ul>
|
||||
*/
|
||||
iType pluginType() { return(cInterface::iTypeDB); }
|
||||
|
||||
/**
|
||||
* \brief connects to the database.
|
||||
*
|
||||
* \return bool true on success or false otherwise
|
||||
*/
|
||||
bool connect();
|
||||
/**
|
||||
* \brief initializes default settings for the plugin.
|
||||
*
|
||||
* \return bool true if settings where successfully tested or false otherwise.
|
||||
*/
|
||||
bool init();
|
||||
/**
|
||||
* \brief returns the last error string.
|
||||
*
|
||||
* \return QString last error
|
||||
*/
|
||||
QString lastError();
|
||||
|
||||
/**
|
||||
* \brief calls the configuration dialog.
|
||||
*
|
||||
* \return bool true if the configuration has been changed successfully or false otherwise.
|
||||
*/
|
||||
bool config();
|
||||
|
||||
qint32 exists(const QString& szName, const QString& szGroup);
|
||||
qint32 existsGroup(const QString& szGroup);
|
||||
qint32 existsIngredient(qint32 id, qint16 ingredientNumber);
|
||||
qint32 create(const QString& szName, const QString& szGroup);
|
||||
qint32 createGroup(const QString& szGroup);
|
||||
bool set(qint32 id, qint16 ingredientNumber, qreal value);
|
||||
INGREDIENT_LIST ingredients();
|
||||
QStringList groups();
|
||||
bool beginTransaction();
|
||||
bool endTransaction();
|
||||
|
||||
QString author();
|
||||
QString company();
|
||||
QString link();
|
||||
QString description();
|
||||
QString copyright();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* \brief opens the database.
|
||||
*
|
||||
* \return bool true on success or false otherwise.
|
||||
*/
|
||||
bool open();
|
||||
|
||||
QSqlDatabase m_db; /*!< holds the database connection */
|
||||
QString m_szLastError; /*!< holds the last error message */
|
||||
};
|
||||
|
||||
#endif // CMYSQLPLUGIN_H
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys" : [ ]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2015-11-18T11:56:38
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui sql
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = dMySQL
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
|
||||
SOURCES += \
|
||||
cmysqlplugin.cpp \
|
||||
cconfigdialog.cpp
|
||||
|
||||
HEADERS += \
|
||||
cmysqlplugin.h \
|
||||
cconfigdialog.h
|
||||
OTHER_FILES += dMySQL.json
|
||||
|
||||
DESTDIR = ../bin/plugins
|
||||
INCLUDEPATH += ../Kooky
|
||||
|
||||
unix {
|
||||
target.path = /usr/lib
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
DISTFILES += \
|
||||
dMySQL.json
|
||||
|
||||
FORMS += \
|
||||
cconfigdialog.ui
|
||||
@@ -0,0 +1,257 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.5.0, 2016-01-25T10:39:00. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{90551da6-f083-4f65-96d6-4435a4c6527f}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.5.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.5.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.55.win32_mingw492_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/Kooky/build-dMySQL-Desktop_Qt_5_5_0_MinGW_32bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/Projects/Kooky/build-dMySQL-Desktop_Qt_5_5_0_MinGW_32bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
|
||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value>
|
||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -0,0 +1,49 @@
|
||||
#include "cconfigdialog.h"
|
||||
#include "ui_cconfigdialog.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
|
||||
|
||||
cConfigDialog::cConfigDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::cConfigDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->m_lpButtonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
}
|
||||
|
||||
cConfigDialog::~cConfigDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cConfigDialog::setFile(const QString& szFile)
|
||||
{
|
||||
ui->m_lpFile->setText(szFile);
|
||||
}
|
||||
|
||||
QString cConfigDialog::file()
|
||||
{
|
||||
return(ui->m_lpFile->text());
|
||||
}
|
||||
|
||||
void cConfigDialog::on_m_lpBrowse_clicked()
|
||||
{
|
||||
QString szFile = ui->m_lpFile->text();
|
||||
if(szFile.isEmpty())
|
||||
szFile = QDir::homePath();
|
||||
|
||||
szFile = QFileDialog::getOpenFileName(this, tr("Select Database"), szFile, tr("Database Files (*.db)"));
|
||||
if(szFile.isNull())
|
||||
return;
|
||||
ui->m_lpFile->setText(szFile);
|
||||
}
|
||||
|
||||
void cConfigDialog::on_m_lpFile_textChanged(const QString &arg1)
|
||||
{
|
||||
if(arg1.isEmpty())
|
||||
ui->m_lpButtonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
else
|
||||
ui->m_lpButtonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef CCONFIGDIALOG_H
|
||||
#define CCONFIGDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class cConfigDialog;
|
||||
}
|
||||
|
||||
class cConfigDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit cConfigDialog(QWidget *parent = 0);
|
||||
~cConfigDialog();
|
||||
|
||||
void setFile(const QString& szFile);
|
||||
QString file();
|
||||
private slots:
|
||||
void on_m_lpBrowse_clicked();
|
||||
|
||||
void on_m_lpFile_textChanged(const QString &arg1);
|
||||
|
||||
private:
|
||||
Ui::cConfigDialog *ui;
|
||||
};
|
||||
|
||||
#endif // CCONFIGDIALOG_H
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cConfigDialog</class>
|
||||
<widget class="QDialog" name="cConfigDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>72</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>SQLite Plugin Config</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Database File:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpFile"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpBrowse">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDialogButtonBox" name="m_lpButtonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>m_lpButtonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>cConfigDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_lpButtonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>cConfigDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,336 @@
|
||||
#include "csqliteplugin.h"
|
||||
#include "cconfigdialog.h"
|
||||
|
||||
#include <QSqlError>
|
||||
#include <QSettings>
|
||||
#include <QSqlQuery>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
bool cSQLitePlugin::connect()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
m_db = QSqlDatabase::addDatabase("QSQLITE");
|
||||
m_db.setHostName(settings.value(QString("plugins/%1/hostName").arg(pluginName())).toString());
|
||||
m_db.setDatabaseName(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
|
||||
return(open());
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::init()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
m_db = QSqlDatabase::addDatabase("QSQLITE");
|
||||
m_db.setHostName(settings.value(QString("plugins/%1/hostName").arg(pluginName())).toString());
|
||||
m_db.setDatabaseName(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
|
||||
m_bConnected = m_db.open();
|
||||
|
||||
if(m_bConnected)
|
||||
{
|
||||
QStringList tables = m_db.tables();
|
||||
if(tables.count())
|
||||
{
|
||||
if(QMessageBox::question(0, "Tables exist", "Database not empty.\nExisting tables will be deleted.\nContinue?", QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)
|
||||
return(m_bConnected);
|
||||
}
|
||||
QSqlQuery query(m_db);
|
||||
for(int z = 0;z < tables.count();z++)
|
||||
query.exec(QString("DROP TABLE %1;").arg(tables.at(z)));
|
||||
|
||||
if(!query.exec("CREATE TABLE settings ( `var` VARCHAR(100) NOT NULL , `val` VARCHAR(100) NOT NULL )"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("INSERT INTO settings values ('version', '1.0');"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("CREATE TABLE ingredient_group ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(100) NOT NULL )"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("CREATE TABLE ingredient ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(100) NOT NULL, ingredient_group_id INTEGER NOT NULL )"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
if(!query.exec("CREATE TABLE ingredient_values ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `ingredient_id` INTEGER NOT NULL, `ingredient_number` INTEGER NOT NULL, `value` REAL, FOREIGN KEY(ingredient_id) REFERENCES ingredient(id) )"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
createGroup("default");
|
||||
}
|
||||
else
|
||||
m_szLastError = m_db.lastError().text();
|
||||
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::open()
|
||||
{
|
||||
m_bConnected = m_db.open();
|
||||
|
||||
if(m_bConnected)
|
||||
{
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec("SELECT * FROM settings"))
|
||||
{
|
||||
init();
|
||||
|
||||
if(!query.exec("SELECT * FROM settings"))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
m_db.close();
|
||||
m_bConnected = false;
|
||||
return(m_bConnected);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
m_szLastError = m_db.lastError().text();
|
||||
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
QString cSQLitePlugin::lastError()
|
||||
{
|
||||
return(m_szLastError);
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::config()
|
||||
{
|
||||
cConfigDialog dlg;
|
||||
QSettings settings;
|
||||
dlg.setFile(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
|
||||
if(dlg.exec() == QDialog::Accepted)
|
||||
{
|
||||
m_db.close();
|
||||
settings.setValue(QString("plugins/%1/databaseName").arg(pluginName()), dlg.file());
|
||||
m_db.setDatabaseName(settings.value(QString("plugins/%1/databaseName").arg(pluginName())).toString());
|
||||
return(open());
|
||||
}
|
||||
return(m_bConnected);
|
||||
}
|
||||
|
||||
qint32 cSQLitePlugin::exists(const QString& szName, const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
qint32 iGroup = existsGroup(szGroup);
|
||||
if(iGroup == -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("SELECT id FROM ingredient WHERE name = \"%1\" AND ingredient_group_id=%2").arg(szName).arg(iGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
query.first();
|
||||
if(!query.isValid())
|
||||
return(-1);
|
||||
|
||||
return(query.value(0).toInt());
|
||||
}
|
||||
|
||||
qint32 cSQLitePlugin::existsGroup(const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("SELECT id FROM ingredient_group WHERE name = \"%1\"").arg(szGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
query.first();
|
||||
if(!query.isValid())
|
||||
return(-1);
|
||||
|
||||
return(query.value(0).toInt());
|
||||
}
|
||||
|
||||
qint32 cSQLitePlugin::existsIngredient(qint32 id, qint16 ingredientNumber)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("SELECT id FROM ingredient_values WHERE ingredient_id = %1 AND ingredient_number = %2").arg(id).arg(ingredientNumber)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
query.first();
|
||||
if(!query.isValid())
|
||||
return(-1);
|
||||
|
||||
return(query.value(0).toInt());
|
||||
}
|
||||
|
||||
qint32 cSQLitePlugin::create(const QString& szName, const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
if(exists(szName, szGroup) != -1)
|
||||
return(-1);
|
||||
|
||||
qint32 iGroup = existsGroup(szGroup);
|
||||
if(iGroup == -1)
|
||||
iGroup = createGroup(szGroup);
|
||||
if(iGroup == -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("INSERT INTO ingredient (name, ingredient_group_id) VALUES (\"%1\", %2)").arg(szName).arg(iGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
return(exists(szName, szGroup));
|
||||
}
|
||||
|
||||
qint32 cSQLitePlugin::createGroup(const QString& szGroup)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
if(existsGroup(szGroup) != -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("INSERT INTO ingredient_group (name) VALUES (\"%1\")").arg(szGroup)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
return(existsGroup(szGroup));
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::set(qint32 id, qint16 ingredientNumber, qreal value)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
|
||||
if(existsIngredient(id, ingredientNumber) != -1)
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("INSERT INTO ingredient_values (ingredient_id, ingredient_number, value) VALUES (%1, %2, %3)").arg(id).arg(ingredientNumber).arg(value)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(-1);
|
||||
}
|
||||
return(existsIngredient(id, ingredientNumber));
|
||||
}
|
||||
|
||||
INGREDIENT_LIST cSQLitePlugin::ingredients()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(INGREDIENT_LIST());
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("SELECT ingredient.name, ingredient_group.name FROM ingredient, ingredient_group WHERE ingredient.ingredient_group_id = ingredient_group.id ORDER BY ingredient_group.name, ingredient.name")))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(INGREDIENT_LIST());
|
||||
}
|
||||
|
||||
INGREDIENT_LIST list;
|
||||
while(query.next())
|
||||
{
|
||||
INGREDIENT i;
|
||||
i.szGroup = query.value(1).toString();
|
||||
i.szIngredient = query.value(0).toString();
|
||||
list.append(i);
|
||||
}
|
||||
|
||||
return(list);
|
||||
}
|
||||
|
||||
QStringList cSQLitePlugin::groups()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(QStringList());
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec(QString("SELECT name FROM ingredient_group ORDER BY name")))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(QStringList());
|
||||
}
|
||||
|
||||
QStringList list;
|
||||
while(query.next())
|
||||
list.append(query.value(0).toString());
|
||||
|
||||
return(list);
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::beginTransaction()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(false);
|
||||
return(m_db.transaction());
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::endTransaction()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(false);
|
||||
return(m_db.commit());
|
||||
}
|
||||
|
||||
QString cSQLitePlugin::author()
|
||||
{
|
||||
return("Herwig Birke");
|
||||
}
|
||||
|
||||
QString cSQLitePlugin::company()
|
||||
{
|
||||
return("WIN-DESIGN");
|
||||
}
|
||||
|
||||
QString cSQLitePlugin::link()
|
||||
{
|
||||
return("http://www.windesign.at");
|
||||
}
|
||||
|
||||
QString cSQLitePlugin::description()
|
||||
{
|
||||
return("This is the description.");
|
||||
}
|
||||
|
||||
QString cSQLitePlugin::copyright()
|
||||
{
|
||||
return("This is the copyright.");
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
#ifndef CSQLITEPLUGIN_H
|
||||
#define CSQLITEPLUGIN_H
|
||||
|
||||
|
||||
#include "cdbinterface.h"
|
||||
|
||||
#include <QtCore>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QSqlDatabase>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
*/
|
||||
class cSQLitePlugin : public QObject, public cDBInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "cSQLitePlugin" FILE "dSQLite.json")
|
||||
Q_INTERFACES(cDBInterface)
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return qint16
|
||||
*/
|
||||
qint16 pluginAPIVersion() { return(1); }
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return QString
|
||||
*/
|
||||
QString pluginName() { return("SQLite DB"); }
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return qint16
|
||||
*/
|
||||
qint16 pluginVersion() { return(1); }
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return iType
|
||||
*/
|
||||
iType pluginType() { return(cInterface::iTypeDB); }
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return bool
|
||||
*/
|
||||
bool connect();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return bool
|
||||
*/
|
||||
bool init();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return QString
|
||||
*/
|
||||
QString lastError();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return bool
|
||||
*/
|
||||
bool config();
|
||||
|
||||
qint32 exists(const QString& szName, const QString& szGroup);
|
||||
qint32 existsGroup(const QString& szGroup);
|
||||
qint32 existsIngredient(qint32 id, qint16 ingredientNumber);
|
||||
qint32 create(const QString& szName, const QString &szGroup);
|
||||
qint32 createGroup(const QString& szGroup);
|
||||
bool set(qint32 id, qint16 ingredientNumber, qreal value);
|
||||
INGREDIENT_LIST ingredients();
|
||||
QStringList groups();
|
||||
bool beginTransaction();
|
||||
bool endTransaction();
|
||||
|
||||
QString author();
|
||||
QString company();
|
||||
QString link();
|
||||
QString description();
|
||||
QString copyright();
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\return bool
|
||||
*/
|
||||
bool open();
|
||||
|
||||
QSqlDatabase m_db; /*!< TODO: describe */
|
||||
QString m_szLastError; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CSQLITEPLUGIN_H
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys" : [ ]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2016-02-09T11:18:10
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui sql
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = dSQLite
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
|
||||
SOURCES += csqliteplugin.cpp \
|
||||
cconfigdialog.cpp
|
||||
|
||||
HEADERS += csqliteplugin.h \
|
||||
cconfigdialog.h
|
||||
|
||||
DESTDIR = ../bin/plugins
|
||||
INCLUDEPATH += ../Kooky
|
||||
|
||||
DISTFILES += dSQLite.json
|
||||
|
||||
unix {
|
||||
target.path = /usr/lib
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
FORMS += \
|
||||
cconfigdialog.ui
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="c_interface_8h">
|
||||
<title>cInterface.h File Reference</title>
|
||||
<programlisting>#include <QString></programlisting>
|
||||
<para>Include dependency diagram for cInterface.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="c_interface_8h__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>Included by dependency diagram for cInterface.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="c_interface_8h__dep__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<section>
|
||||
<title> Classes </title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>struct <link linkend="classc_interface">cInterface</link></para>
|
||||
<para><emphasis>This is the base class for all plugins.</emphasis></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<simplesect>
|
||||
<title>Detailed Description</title>
|
||||
<para>Definition in file C:/Users/birkeh/Documents/Projects/Kooky/Kooky/cInterface.h</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
e0f959f5f793d0df6deed2fb7c80d0b2
|
||||
|
After Width: | Height: | Size: 68 KiB |
@@ -0,0 +1 @@
|
||||
9abd3a1e5d02aebf33b253fba069accf
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,66 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="cbleibfitplugin_8cpp">
|
||||
<title>cbleibfitplugin.cpp File Reference</title>
|
||||
<programlisting>#include "cbleibfitplugin.h"</programlisting>
|
||||
<programlisting>#include <QNetworkAccessManager></programlisting>
|
||||
<programlisting>#include <QNetworkRequest></programlisting>
|
||||
<programlisting>#include <QNetworkReply></programlisting>
|
||||
<programlisting>#include <QEventLoop></programlisting>
|
||||
<programlisting>#include <QMessageBox></programlisting>
|
||||
<para>Include dependency diagram for cbleibfitplugin.cpp</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cbleibfitplugin_8cpp__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>Included by dependency diagram for cbleibfitplugin.cpp</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cbleibfitplugin_8cpp__dep__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<section>
|
||||
<title> Classes </title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>struct <link linkend="structtag_m_a_p_p_e_r">tagMAPPER</link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Typedefs</title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>typedef struct <link linkend="structtag_m_a_p_p_e_r">tagMAPPER</link> <link linkend="cbleibfitplugin_8cpp_1a250823f72ebe6796400fef6f0812002f">MAPPER</link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Variables</title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend="cbleibfitplugin_8cpp_1a250823f72ebe6796400fef6f0812002f">MAPPER</link> <link linkend="cbleibfitplugin_8cpp_1a2f672fed9a71bbdcf8e2e61e4278dc32">g_ingredientMapper</link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<simplesect>
|
||||
<title>Detailed Description</title>
|
||||
<para>Definition in file C:/Users/birkeh/Documents/Projects/Kooky/iBleibFit/cbleibfitplugin.cpp</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
2d7282d20fb9b6d5dd4e8fb24436b81f
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
||||
1a734c49157032d68329feb9ebb3fa2f
|
||||
|
After Width: | Height: | Size: 39 KiB |
@@ -0,0 +1,44 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="cbleibfitplugin_8h">
|
||||
<title>cbleibfitplugin.h File Reference</title>
|
||||
<programlisting>#include <QtCore></programlisting>
|
||||
<programlisting>#include <QObject></programlisting>
|
||||
<programlisting>#include <QString></programlisting>
|
||||
<programlisting>#include "cimportinterface.h"</programlisting>
|
||||
<para>Include dependency diagram for cbleibfitplugin.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cbleibfitplugin_8h__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>Included by dependency diagram for cbleibfitplugin.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cbleibfitplugin_8h__dep__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<section>
|
||||
<title> Classes </title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>struct <link linkend="classc_bleib_fit_plugin">cBleibFitPlugin</link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<simplesect>
|
||||
<title>Detailed Description</title>
|
||||
<para>Definition in file C:/Users/birkeh/Documents/Projects/Kooky/iBleibFit/cbleibfitplugin.h</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
610064c35f8af3b43076e49c1dbd9976
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1 @@
|
||||
479bc1c94fce89138fe4450073aa7df2
|
||||
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,35 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="cconfigdialog_8cpp">
|
||||
<title>cconfigdialog.cpp File Reference</title>
|
||||
<programlisting>#include "cconfigdialog.h"</programlisting>
|
||||
<programlisting>#include "ui_cconfigdialog.h"</programlisting>
|
||||
<programlisting>#include <QMessageBox></programlisting>
|
||||
<programlisting>#include <QSettings></programlisting>
|
||||
<programlisting>#include <QCloseEvent></programlisting>
|
||||
<para>Include dependency diagram for cconfigdialog.cpp</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cconfigdialog_8cpp__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>Included by dependency diagram for cconfigdialog.cpp</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cconfigdialog_8cpp__dep__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<simplesect>
|
||||
<title>Detailed Description</title>
|
||||
<para>Definition in file C:/Users/birkeh/Documents/Projects/Kooky/dMySQL/cconfigdialog.cpp</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
b81142f86cf08cd128d6c7ef9a109356
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1 @@
|
||||
b9b700fde289a75100cbaeb39c87602c
|
||||
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,53 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="cconfigdialog_8h">
|
||||
<title>cconfigdialog.h File Reference</title>
|
||||
<programlisting>#include <QDialog></programlisting>
|
||||
<programlisting>#include <QCloseEvent></programlisting>
|
||||
<para>Include dependency diagram for cconfigdialog.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cconfigdialog_8h__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>Included by dependency diagram for cconfigdialog.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cconfigdialog_8h__dep__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<section>
|
||||
<title> Classes </title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>struct <link linkend="classc_config_dialog">cConfigDialog</link></para>
|
||||
<para><emphasis>Configuration Dialog for dMySQL.</emphasis></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<simplesect>
|
||||
<title> Namespaces </title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>struct <link linkend="namespace_ui">Ui</link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</simplesect>
|
||||
<simplesect>
|
||||
<title>Detailed Description</title>
|
||||
<para>Definition in file C:/Users/birkeh/Documents/Projects/Kooky/dMySQL/cconfigdialog.h</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
a765d8cb96edefc350f5cfa56966d102
|
||||
|
After Width: | Height: | Size: 5.7 KiB |
@@ -0,0 +1 @@
|
||||
183a92ad390d8c223994847df7b57af4
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,31 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="cdbinterface_8cpp">
|
||||
<title>cdbinterface.cpp File Reference</title>
|
||||
<programlisting>#include "cdbinterface.h"</programlisting>
|
||||
<para>Include dependency diagram for cdbinterface.cpp</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cdbinterface_8cpp__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>Included by dependency diagram for cdbinterface.cpp</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cdbinterface_8cpp__dep__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<simplesect>
|
||||
<title>Detailed Description</title>
|
||||
<para>Definition in file C:/Users/birkeh/Documents/Projects/Kooky/Kooky/cdbinterface.cpp</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
37ea5a717f22e8f6a4b5012411c63b62
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1 @@
|
||||
e90af5bdeb7ead25602a8ff3146cc200
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,56 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="cdbinterface_8h">
|
||||
<title>cdbinterface.h File Reference</title>
|
||||
<programlisting>#include "cInterface.h"</programlisting>
|
||||
<programlisting>#include <QtPlugin></programlisting>
|
||||
<programlisting>#include <QString></programlisting>
|
||||
<programlisting>#include <QStringList></programlisting>
|
||||
<para>Include dependency diagram for cdbinterface.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cdbinterface_8h__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>Included by dependency diagram for cdbinterface.h</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Dependency diagram</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata width="50%" align="center" valign="middle" scalefit="1" fileref="cdbinterface_8h__dep__incl.png"></imagedata>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<section>
|
||||
<title> Classes </title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>struct <link linkend="classc_d_b_interface">cDBInterface</link></para>
|
||||
<para><emphasis>This is the base class for all database connector plugins.</emphasis></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Functions</title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>QT_BEGIN_NAMESPACE <link linkend="cdbinterface_8h_1a43cdb680fe773bf2a94ea7022b852a0e">Q_DECLARE_INTERFACE</link> (
|
||||
<link linkend="classc_d_b_interface">cDBInterface</link> , "WIN-DESIGN.cDBInterface/1.0" )</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
<simplesect>
|
||||
<title>Detailed Description</title>
|
||||
<para>Definition in file C:/Users/birkeh/Documents/Projects/Kooky/Kooky/cdbinterface.h</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
ae6fae23c336069078c7b34a493dfae4
|
||||
|
After Width: | Height: | Size: 36 KiB |