summaryrefslogtreecommitdiffstats
path: root/toolwindow.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-03-25 09:01:41 +0100
committerArno <arno@disconnect.de>2017-03-25 09:01:41 +0100
commitbe7f32353d736ff1dc1f74ae80e301ce72044dee (patch)
tree46e0bdc022605058031da77c2d9e1b6edd39411d /toolwindow.h
parenta55b7eb7a765f09f0e83e9d3ce5696f540b6bd9b (diff)
downloadBeetPlayer-be7f32353d736ff1dc1f74ae80e301ce72044dee.tar.gz
BeetPlayer-be7f32353d736ff1dc1f74ae80e301ce72044dee.tar.bz2
BeetPlayer-be7f32353d736ff1dc1f74ae80e301ce72044dee.zip
Show Popup-Window on various occasions
When we play a new song, get paused, continue and change volume. The hardest part was to display the QWidget on the current desktop. Turns out KWindowSystem and Qt::ToolWindow don't work together well... I should post that on my blog, I guess...
Diffstat (limited to 'toolwindow.h')
-rw-r--r--toolwindow.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/toolwindow.h b/toolwindow.h
new file mode 100644
index 0000000..7f8e621
--- /dev/null
+++ b/toolwindow.h
@@ -0,0 +1,24 @@
+#ifndef TOOLWINDOW_H
+#define TOOLWINDOW_H
+
+#include <QWidget>
+
+class QLabel;
+class QTimer;
+
+class ToolWindow : public QWidget {
+ Q_OBJECT
+ public:
+ explicit ToolWindow(QWidget *parent = 0, Qt::WindowFlags f = Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus);
+
+ public slots:
+ void setText(const QString &text);
+ void toHTML(const QString &text);
+ void showMe();
+
+ private:
+ QLabel *mLabel;
+ QTimer *mHideTimer;
+};
+
+#endif // TOOLWINDOW_H