summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EVPC.pro2
-rw-r--r--EVPC.pro.user319
-rw-r--r--battery.cpp25
-rw-r--r--battery.h10
-rw-r--r--mainwindow.cpp18
-rw-r--r--mainwindow.h9
-rw-r--r--mainwindow.ui30
7 files changed, 397 insertions, 16 deletions
diff --git a/EVPC.pro b/EVPC.pro
index 2cfb74e..fc1919d 100644
--- a/EVPC.pro
+++ b/EVPC.pro
@@ -26,11 +26,9 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
- res.qrc \
resources/res.qrc
DISTFILES += \
- res.rc \
resources/boxout-th.png \
resources/connect.png \
resources/connected.png \
diff --git a/EVPC.pro.user b/EVPC.pro.user
new file mode 100644
index 0000000..7dccbb4
--- /dev/null
+++ b/EVPC.pro.user
@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 4.15.0, 2022-11-18T08:17:03. -->
+<qtcreator>
+ <data>
+ <variable>EnvironmentId</variable>
+ <value type="QByteArray">{254b9858-411f-4b26-805e-af190719973f}</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.PreferSingleLineComments">false</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.SmartSelectionChanging">true</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="bool" key="EditorConfiguration.UseIndenter">false</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="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
+ <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+ <value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.PluginSettings</variable>
+ <valuemap type="QVariantMap">
+ <valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
+ <value type="bool" key="AutoTest.Framework.Boost">true</value>
+ <value type="bool" key="AutoTest.Framework.CTest">false</value>
+ <value type="bool" key="AutoTest.Framework.Catch">true</value>
+ <value type="bool" key="AutoTest.Framework.GTest">true</value>
+ <value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
+ <value type="bool" key="AutoTest.Framework.QtTest">true</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
+ <value type="int" key="AutoTest.RunAfterBuild">0</value>
+ <value type="bool" key="AutoTest.UseGlobal">true</value>
+ <valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
+ <value type="QString">-fno-delayed-template-parsing</value>
+ </valuelist>
+ <value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
+ <value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
+ <valuemap type="QVariantMap" key="ClangTools">
+ <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
+ <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
+ <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
+ <value type="int" key="ClangTools.ParallelJobs">4</value>
+ <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
+ <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
+ <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
+ <value type="bool" key="ClangTools.UseGlobalSettings">true</value>
+ </valuemap>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value type="QString" key="DeviceType">Desktop</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.12.11 MinGW 64-bit</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.12.11 MinGW 64-bit</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.51211.win64_mingw73_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="int" key="EnableQmlDebugging">0</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:\Users\30720.DITCHWITCH\Desktop\Programming\build-EVPC-Desktop_Qt_5_12_11_MinGW_64_bit-Debug</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/Users/30720.DITCHWITCH/Desktop/Programming/build-EVPC-Desktop_Qt_5_12_11_MinGW_64_bit-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.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</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">Build</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.Id">Qt4ProjectManager.MakeStep</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</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">Clean</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.CustomParsers"/>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:\Users\30720.DITCHWITCH\Desktop\Programming\build-EVPC-Desktop_Qt_5_12_11_MinGW_64_bit-Release</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/Users/30720.DITCHWITCH/Desktop/Programming/build-EVPC-Desktop_Qt_5_12_11_MinGW_64_bit-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.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</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">Build</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.Id">Qt4ProjectManager.MakeStep</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</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">Clean</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.CustomParsers"/>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+ <value type="int" key="QtQuickCompiler">0</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+ <value type="int" key="EnableQmlDebugging">0</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:\Users\30720.DITCHWITCH\Desktop\Programming\build-EVPC-Desktop_Qt_5_12_11_MinGW_64_bit-Profile</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/Users/30720.DITCHWITCH/Desktop/Programming/build-EVPC-Desktop_Qt_5_12_11_MinGW_64_bit-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.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</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">Build</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.Id">Qt4ProjectManager.MakeStep</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</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">Clean</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.CustomParsers"/>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+ <value type="int" key="QtQuickCompiler">0</value>
+ <value type="int" key="SeparateDebugInfo">0</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">
+ <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">Deploy</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
+ <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</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.RunConfiguration.0">
+ <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
+ <valuelist type="QVariantList" key="Analyzer.Perf.Events">
+ <value type="QString">cpu-cycles</value>
+ </valuelist>
+ <valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
+ <value type="int" key="Analyzer.Perf.Frequency">250</value>
+ <valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
+ <value type="QString">-e</value>
+ <value type="QString">cpu-cycles</value>
+ <value type="QString">--call-graph</value>
+ <value type="QString">dwarf,4096</value>
+ <value type="QString">-F</value>
+ <value type="QString">250</value>
+ </valuelist>
+ <value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
+ <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
+ <value type="int" key="Analyzer.Perf.StackSize">4096</value>
+ <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
+ <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
+ <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</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="QString" key="Analyzer.Valgrind.Callgrind.Arguments"></value>
+ <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="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
+ <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
+ <value type="QString" key="Analyzer.Valgrind.Memcheck.Arguments"></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.ValgrindArguments"></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>
+ <valuelist type="QVariantList" key="CustomOutputParsers"/>
+ <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+ <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
+ <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
+ <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+ <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</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">22</value>
+ </data>
+ <data>
+ <variable>Version</variable>
+ <value type="int">22</value>
+ </data>
+</qtcreator>
diff --git a/battery.cpp b/battery.cpp
index e91b05f..5be2fc8 100644
--- a/battery.cpp
+++ b/battery.cpp
@@ -3,7 +3,13 @@
Battery::Battery() :
activeBattery(batteries[0]),
seriesCells(0),
- parallelCells(0)
+ parallelCells(0),
+ systemVoltage(0),
+ peakPower(0),
+ packDischargeRate(0),
+ packChargeRate(0),
+ packWeight(0),
+ packEnergy(0)
{
}
@@ -12,3 +18,20 @@ void Battery::changeBatteryChemistry(int name)
{
activeBattery= batteries[name];
}
+
+void Battery::setSystemVoltage(double voltage)
+{
+ systemVoltage = voltage;
+}
+
+void Battery::setPeakSystemPower(double power)
+{
+ peakPower = power;
+}
+
+void Battery::calculate()
+{
+ seriesCells = ceil(systemVoltage/activeBattery.nominalVoltage);
+
+
+}
diff --git a/battery.h b/battery.h
index c1b7a86..887fb0e 100644
--- a/battery.h
+++ b/battery.h
@@ -2,6 +2,7 @@
#define BATTERY_H
#include <QObject>
+#include "math.h"
typedef struct batteryData {
QString name;
@@ -33,16 +34,23 @@ class Battery : public QObject
Q_OBJECT
public:
Battery();
-private:
+
+ void setSystemVoltage(double voltage);
+ void setPeakSystemPower(double power);
void changeBatteryChemistry(int name);
+private:
batteryData_t activeBattery;
int seriesCells;
int parallelCells;
+ double systemVoltage;
+ double peakPower;
float packDischargeRate;
float packChargeRate;
float packWeight;
float packEnergy;
+
+ void calculate(void);
signals:
};
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 93464f0..6fb2bf5 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1,11 +1,13 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
+#include "QDebug"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
+ initializeGraphics();
}
MainWindow::~MainWindow()
@@ -19,3 +21,19 @@ void MainWindow::on_spinBoxPeakSystemPower_valueChanged(double arg1)
}
+void MainWindow :: initializeGraphics()
+{
+ for(auto entry : batteries)ui->comboBoxBatteryChemistry->addItem(entry.name);
+}
+
+void MainWindow::on_comboBoxBatteryChemistry_currentIndexChanged(int index)
+{
+ m_battery.changeBatteryChemistry(index);
+}
+
+
+void MainWindow::on_actionactionSettings_triggered()
+{
+
+}
+
diff --git a/mainwindow.h b/mainwindow.h
index 9fb7515..0add526 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -2,6 +2,8 @@
#define MAINWINDOW_H
#include <QMainWindow>
+#include <QSettings>
+#include "battery.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
@@ -18,7 +20,14 @@ public:
private slots:
void on_spinBoxPeakSystemPower_valueChanged(double arg1);
+ void on_comboBoxBatteryChemistry_currentIndexChanged(int index);
+
+ void on_actionactionSettings_triggered();
+
private:
+ Battery m_battery;
+
Ui::MainWindow *ui;
+ void initializeGraphics(void);
};
#endif // MAINWINDOW_H
diff --git a/mainwindow.ui b/mainwindow.ui
index e82ca53..c7a03c8 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -20,7 +20,7 @@
<string>Electric Vehicle Parameter Calculator</string>
</property>
<property name="windowIcon">
- <iconset resource="res.qrc">
+ <iconset resource="resources/res.qrc">
<normaloff>:/img/icon.png</normaloff>:/img/icon.png</iconset>
</property>
<property name="layoutDirection">
@@ -249,9 +249,6 @@
<property name="editable">
<bool>false</bool>
</property>
- <property name="placeholderText">
- <string notr="true"/>
- </property>
</widget>
</item>
<item row="0" column="1">
@@ -329,11 +326,7 @@
</widget>
</item>
<item row="4" column="1">
- <widget class="QComboBox" name="comboBoxWireMaterial">
- <property name="placeholderText">
- <string/>
- </property>
- </widget>
+ <widget class="QComboBox" name="comboBoxWireMaterial"/>
</item>
</layout>
</widget>
@@ -441,10 +434,11 @@
</attribute>
<addaction name="actionCapture"/>
<addaction name="fileLoad"/>
+ <addaction name="actionactionSettings"/>
</widget>
<action name="fileLoad">
<property name="icon">
- <iconset resource="res.qrc">
+ <iconset resource="resources/res.qrc">
<normaloff>:/img/boxout-th.png</normaloff>:/img/boxout-th.png</iconset>
</property>
<property name="text">
@@ -456,7 +450,7 @@
</action>
<action name="actionCapture">
<property name="icon">
- <iconset resource="res.qrc">
+ <iconset resource="resources/res.qrc">
<normaloff>:/img/disk_green.png</normaloff>
<normalon>:/img/disk_green.png</normalon>:/img/disk_green.png</iconset>
</property>
@@ -467,9 +461,21 @@
<string>Save Data</string>
</property>
</action>
+ <action name="actionactionSettings">
+ <property name="icon">
+ <iconset resource="resources/res.qrc">
+ <normaloff>:/img/gear.png</normaloff>:/img/gear.png</iconset>
+ </property>
+ <property name="text">
+ <string>actionSettings</string>
+ </property>
+ <property name="toolTip">
+ <string>Change Calculator Settings</string>
+ </property>
+ </action>
</widget>
<resources>
- <include location="res.qrc"/>
+ <include location="resources/res.qrc"/>
</resources>
<connections/>
</ui>