1 #ifndef BALL_VIEW_WIDGETS_COLORBUTTON_H
2 #define BALL_VIEW_WIDGETS_COLORBUTTON_H
4 #ifndef BALL_COMMON_GLOBAL_
8 #include <QtGui/QPushButton>
9 #include <QtGui/QColor>
23 Q_PROPERTY (QColor default_color_ READ getDefaultColor WRITE setDefaultColor)
28 explicit ColorButton(
const QColor& color,
const QColor& default_color,
QWidget* parent);
38 void setDefaultColor(
const QColor& color);
39 void setDefaultColor(
const ColorRGBA& color);
40 const QColor& getDefaultColor()
const;
42 void setEnableAlpha(
bool enable);
43 bool isAlphaEnabled()
const;
45 QSize sizeHint()
const;
51 void colorChanged(QColor color);
55 QColor default_color_;
59 virtual void paintEvent(QPaintEvent* evt);
67 #endif //BALL_VIEW_WIDGETS_COLORBUTTON_H
BALL_VIEW_EXPORT void setColor(const QLabel *label, const ColorRGBA &color)
BALL_VIEW_EXPORT ColorRGBA getColor(const QLabel *label)
-*- Mode: C++; tab-width: 2; -*-
BALL_VIEW_EXPORT QColor chooseColor(QLabel *label)