1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00
GPXSee/src/GUI/colorbox.h

32 lines
520 B
C
Raw Normal View History

2016-12-06 01:48:26 +01:00
#ifndef COLORBOX_H
#define COLORBOX_H
#include <QWidget>
class ColorBox : public QWidget
{
Q_OBJECT
public:
ColorBox(QWidget *parent = 0);
const QColor &color() const {return _color;}
void setColor(const QColor &color);
void enableAlphaChannel(bool enable) {_alpha = enable;}
2016-12-06 01:48:26 +01:00
QSize sizeHint() const;
signals:
void colorChanged(const QColor &color);
protected:
void mousePressEvent(QMouseEvent *event);
void paintEvent(QPaintEvent *event);
private:
QColor _color;
bool _alpha;
2016-12-06 01:48:26 +01:00
};
#endif // COLORBOX_H