aboutsummaryrefslogtreecommitdiff
path: root/aoevidencebutton.cpp
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2017-02-14 15:58:36 +0100
committerDavid Skoland <davidskoland@gmail.com>2017-02-14 15:58:36 +0100
commit47f96cf0a4efe785389db8a3dad16e17976bc46b (patch)
treefd261bba50e39d2be898c7d264acd46c44f5b072 /aoevidencebutton.cpp
parent9e5598cbedde4eda5fc3e4bf3efda08da939056c (diff)
added emote comments to emote buttons with missing image
Diffstat (limited to 'aoevidencebutton.cpp')
-rw-r--r--aoevidencebutton.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/aoevidencebutton.cpp b/aoevidencebutton.cpp
new file mode 100644
index 00000000..d4adce86
--- /dev/null
+++ b/aoevidencebutton.cpp
@@ -0,0 +1,24 @@
+#include "aoevidencebutton.h"
+
+#include "file_functions.h"
+
+AOEvidenceButton::AOEvidenceButton(QWidget *p_parent, AOApplication *p_ao_app) : QPushButton(p_parent)
+{
+ ao_app = p_ao_app;
+}
+
+void AOEvidenceButton::set_image(QString p_image)
+{
+ QString image_path = ao_app->get_evidence_path() + p_image;
+
+ if (file_exists(image_path))
+ {
+ this->setText("");
+ this->setStyleSheet("border-image:url(\"" + image_path + "\")");
+ }
+ else
+ {
+ this->setText("evi");
+ this->setStyleSheet("");
+ }
+}