summaryrefslogtreecommitdiff
path: root/src/study/NumberFrame.h
blob: 44161ca2bbc286099e92fc880aefa7d0e9110c7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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