summaryrefslogtreecommitdiffstats
path: root/gui/LabeledToolButton.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/LabeledToolButton.h')
-rw-r--r--gui/LabeledToolButton.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gui/LabeledToolButton.h b/gui/LabeledToolButton.h
new file mode 100644
index 00000000..24ef798a
--- /dev/null
+++ b/gui/LabeledToolButton.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <QPushButton>
+#include <QToolButton>
+
+class QLabel;
+
+class LabeledToolButton : public QToolButton
+{
+ Q_OBJECT
+
+ QLabel * m_label;
+
+public:
+ LabeledToolButton(QWidget * parent = 0);
+
+ QString text() const;
+ void setText(const QString & text);
+ virtual QSize sizeHint() const;
+protected:
+ void resizeEvent(QResizeEvent * event);
+};