From 1ed60cd00cd9fdcc45dab1f81e00dd723858a430 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Fri, 18 Nov 2022 16:06:36 -0600 Subject: Made progress on battery class. --- mainwindow.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mainwindow.cpp') 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() +{ + +} + -- cgit v1.2.3