summaryrefslogtreecommitdiff
path: root/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp18
1 files changed, 18 insertions, 0 deletions
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()
+{
+
+}
+