aboutsummaryrefslogtreecommitdiff
path: root/src/aobutton.cpp
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2018-12-26 16:43:08 +0100
committerDavid Skoland <davidskoland@gmail.com>2018-12-26 16:43:08 +0100
commit00cfd2750d39795e4c205aee2a33b92b1da2524d (patch)
tree839c1129418ca8fefe41e6814917f9dabb6efa4b /src/aobutton.cpp
parent6f1bce5882676ea7affe717a2f5a00b8c3b7fe12 (diff)
moved headers into include and cpp files into src + logo into resource
Diffstat (limited to 'src/aobutton.cpp')
-rw-r--r--src/aobutton.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/aobutton.cpp b/src/aobutton.cpp
new file mode 100644
index 00000000..5be2e678
--- /dev/null
+++ b/src/aobutton.cpp
@@ -0,0 +1,26 @@
+#include "aobutton.h"
+
+#include "debug_functions.h"
+#include "file_functions.h"
+
+AOButton::AOButton(QWidget *parent, AOApplication *p_ao_app) : QPushButton(parent)
+{
+ ao_app = p_ao_app;
+}
+
+AOButton::~AOButton()
+{
+
+}
+
+void AOButton::set_image(QString p_image)
+{
+ QString image_path = ao_app->get_theme_path(p_image);
+ QString default_image_path = ao_app->get_default_theme_path(p_image);
+
+ if (file_exists(image_path))
+ this->setStyleSheet("border-image:url(\"" + image_path + "\")");
+ else
+ this->setStyleSheet("border-image:url(\"" + default_image_path + "\")");
+}
+