diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39d04d1..edbf303 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ find_package(Qt6 COMPONENTS OpenGLWidgets REQUIRED)
find_package(Eigen3 REQUIRED)
file(GLOB_RECURSE SOURCE_FILES src/**.cpp)
-add_executable(Pendulum WIN32 ${SOURCE_FILES})
+add_executable(Pendulum WIN32 ${SOURCE_FILES} icons/icons.qrc)
include_directories(${EIGEN3_INCLUDE_DIR})
diff --git a/icons/add.svg b/icons/add.svg
new file mode 100644
index 0000000..c907b9a
--- /dev/null
+++ b/icons/add.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/compress.svg b/icons/compress.svg
new file mode 100644
index 0000000..b7d2a5b
--- /dev/null
+++ b/icons/compress.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/delete.svg b/icons/delete.svg
new file mode 100644
index 0000000..d985243
--- /dev/null
+++ b/icons/delete.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/icons.qrc b/icons/icons.qrc
new file mode 100644
index 0000000..10305d2
--- /dev/null
+++ b/icons/icons.qrc
@@ -0,0 +1,10 @@
+
+
+ add.svg
+ compress.svg
+ delete.svg
+ pause.svg
+ play.svg
+ refresh.svg
+
+
\ No newline at end of file
diff --git a/icons/pause.svg b/icons/pause.svg
new file mode 100644
index 0000000..584a801
--- /dev/null
+++ b/icons/pause.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/play.svg b/icons/play.svg
new file mode 100644
index 0000000..da059ed
--- /dev/null
+++ b/icons/play.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/refresh.svg b/icons/refresh.svg
new file mode 100644
index 0000000..dec3a89
--- /dev/null
+++ b/icons/refresh.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 1208c20..d50f359 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -134,6 +134,10 @@ QWidget * MainWindow::buildAddUI() {
auto normalizeLengthsBtn = new QPushButton("Normalize");
auto resetLengthsBtn = new QPushButton("Reset");
+ resetMassesBtn->setIcon(QIcon(":/icons/refresh.svg"));
+ normalizeLengthsBtn->setIcon(QIcon(":/icons/compress.svg"));
+ resetLengthsBtn->setIcon(QIcon(":/icons/refresh.svg"));
+
connect(resetMassesBtn, &QPushButton::clicked, this, &MainWindow::resetMasses);
connect(normalizeLengthsBtn, &QPushButton::clicked, this, &MainWindow::normalizeLengths);
connect(resetLengthsBtn, &QPushButton::clicked, this, &MainWindow::resetLengths);
@@ -278,7 +282,9 @@ QWidget * MainWindow::buildAddUI() {
lyt->addLayout(btnLyt);
auto addBtn = new QPushButton("Add");
- auto removeBtn = new QPushButton("Remove");
+ auto removeBtn = new QPushButton("Remove all");
+ addBtn->setIcon(QIcon(":/icons/add.svg"));
+ removeBtn->setIcon(QIcon(":/icons/delete.svg"));
connect(addBtn, &QPushButton::clicked, this, &MainWindow::add);
connect(removeBtn, &QPushButton::clicked, this, &MainWindow::remove);
@@ -330,10 +336,13 @@ QWidget * MainWindow::buildSimulationUI() {
auto reset = new QPushButton("Reset");
auto togglePlay = new QPushButton("Resume");
+ reset->setIcon(QIcon(":/icons/refresh.svg"));
+ togglePlay->setIcon(QIcon(":/icons/play.svg"));
connect(reset, &QPushButton::clicked, this, &MainWindow::resetSimulationControl);
connect(togglePlay, &QPushButton::clicked, this, &MainWindow::toggleSimulation);
connect(togglePlay, &QPushButton::clicked, [this, togglePlay](){
+ togglePlay->setIcon(QIcon(QString(":/icons/") + (simulation->isPlaying ? "pause.svg" : "play.svg")));
togglePlay->setText(simulation->isPlaying ? "Pause" : "Resume");
});