From d24f813f3f2a05c112e803e4256b53535895fc98 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 14 Jul 2021 11:49:10 +1200 Subject: Initial mirror commit --- src/study/NumberFrame.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/study/NumberFrame.h (limited to 'src/study/NumberFrame.h') 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 + +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 -- cgit