Quark  0.1
ColorButton.h++
Go to the documentation of this file.
1 
2 #ifndef __libquark_gui_ColorButton_hxx
3 #define __libquark_gui_ColorButton_hxx
4 
5 #include <QColor>
6 #include <QToolButton>
7 
8 #include <quark/Quark.h++>
9 
10 namespace quark {
11 namespace gui {
12 
20 class LIBQUARK_API ColorButton : public QToolButton
21 {
22  Q_OBJECT;
23 
24  public:
25 
27  explicit ColorButton(QWidget *parent = NULL);
28 
30  virtual ~ColorButton();
31 
33  inline QColor getColor() const
34  { return(_color); }
35 
37  void setColor(const QColor &color);
38 
39  signals:
40 
42  void colorChanged(const QColor &color);
43 
44  private slots:
45 
46  void selectColor();
47 
48  private:
49 
50  QColor _color;
51 };
52 
53 } // namespace gui
54 } // namespace quark
55 
56 #endif // __libquark_gui_ColorButton_hxx
QColor getColor() const
Gets the currently selected color.
Definition: ColorButton.h++:33
Definition: BarChartView.h++:6
#define LIBQUARK_API
Definition: Quark.h++:18
A tool button for selecting a color.
Definition: ColorButton.h++:20