blob: 584461077151599dc9bec52a58e9e777f1241d65 (
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
|
#ifndef COLOR_BOX_H
#define COLOR_BOX_H
#include <QtWidgets>
class ColorBox: public QFrame
{
Q_OBJECT
public:
ColorBox( QColor aColor = Qt::white );
QColor color() const { return m_color; }
void setColor( QColor aColor );
protected:
void mousePressEvent ( QMouseEvent* event );
void changeEvent ( QEvent* event );
signals:
void colorChanged( QColor aColor );
private:
static const int MinHeight = 25;
static const int MinWidth = 50;
QColor m_color;
};
#endif
|