aboutsummaryrefslogtreecommitdiff
path: root/src/aobutton.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/aobutton.h')
-rw-r--r--src/aobutton.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/aobutton.h b/src/aobutton.h
new file mode 100644
index 00000000..8104bdbd
--- /dev/null
+++ b/src/aobutton.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include "aoapplication.h"
+
+#include <QMovie>
+#include <QPushButton>
+
+class AOButton : public QPushButton
+{
+ Q_OBJECT
+
+public:
+ explicit AOButton(AOApplication *ao_app, QWidget *parent = nullptr);
+ virtual ~AOButton();
+
+ void setImage(QString image_name);
+
+private:
+ AOApplication *ao_app;
+
+ QMovie *m_movie = nullptr;
+
+ void deleteMovie();
+
+private Q_SLOTS:
+ void handleNextFrame();
+
+ void updateIcon(QPixmap icon);
+};