blob: c454024574efbcbfda9ac3c7c9f2ed568a467916 (
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
30
|
#ifndef VALUE_H
#define VALUE_H
#include <QGraphicsObject>
#include <QPainter>
namespace coreview {
class Value : public QGraphicsObject {
Q_OBJECT
public:
Value(bool vertical = false, unsigned width = 8, unsigned init_val = 0); // width is for number of character to be shown from number
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
public slots:
void value_update(std::uint32_t);
protected:
std::uint32_t val;
private:
unsigned wid;
bool vertical;
};
}
#endif // VALUE_H
|