QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RColorCombo.h
Go to the documentation of this file.
1 
20 #ifndef RCOLORCOMBO_H_
21 #define RCOLORCOMBO_H_
22 
23 #include "gui_global.h"
24 
25 #include <QComboBox>
26 
27 #include "RColor.h"
28 
33 class QCADGUI_EXPORT RColorCombo: public QComboBox {
34 
35 Q_OBJECT
36 Q_PROPERTY(bool onlyFixed READ getOnlyFixed WRITE setOnlyFixed);
37 Q_PROPERTY(bool showAlphaChannel READ getShowAlphaChannel WRITE setShowAlphaChannel);
38 Q_PROPERTY(QColor color READ getColor WRITE setColor);
39 
40 public:
41  RColorCombo(QWidget *parent = 0);
42 
43  RColor getColor();
44  void setColor(const RColor& col);
45  void init();
46  bool getOnlyFixed();
47  void setOnlyFixed(bool onlyFixed);
48  //bool isBlackWhite();
49  //void setBlackWhite(bool blackWhite);
50  bool getShowAlphaChannel();
51  void setShowAlphaChannel(bool showAlphaChannel);
52 
53 signals:
54  void valueChanged(const RColor& color);
55  void dialogRunning(bool isRunning);
56 
57 public slots:
58  void colorChanged(int index);
59 
60 private:
62  bool onlyFixed;
63  bool showAlphaChannel;
64 };
65 
67 
68 #endif /* RCOLORCOMBO_H_ */