diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
commit | d24f813f3f2a05c112e803e4256b53535895fc98 (patch) | |
tree | 601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/study/NumberFrame.h |
Diffstat (limited to 'src/study/NumberFrame.h')
-rw-r--r-- | src/study/NumberFrame.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/study/NumberFrame.h b/src/study/NumberFrame.h new file mode 100644 index 0000000..44161ca --- /dev/null +++ b/src/study/NumberFrame.h @@ -0,0 +1,29 @@ +#ifndef NUMBER_FRAME_H
+#define NUMBER_FRAME_H
+
+#include <QtWidgets>
+
+class NumberFrame: public QLabel
+{
+public:
+ static const int MinWidth = 40;
+ static const int MinWidth100 = 50;
+
+public:
+ NumberFrame(QWidget* parent = 0);
+ void setColor(const QColor& color);
+ void setValue(int value);
+
+protected:
+ void paintEvent(QPaintEvent* event);
+
+private:
+ static const int Radius = 7;
+ static const int MinHeight = 16;
+
+private:
+ void init();
+
+};
+
+#endif
|