QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RColorCombo.h
Go to the documentation of this file.
1 #ifndef RCOLORCOMBO_H_
2 #define RCOLORCOMBO_H_
3 
4 #include <QComboBox>
5 
6 #include "RColor.h"
7 
11 class RColorCombo: public QComboBox {
12 
13 Q_OBJECT
14 Q_PROPERTY(bool onlyFixed READ getOnlyFixed WRITE setOnlyFixed);
16 Q_PROPERTY(QColor color READ getColor WRITE setColor);
17 
18 public:
19  RColorCombo(QWidget *parent = 0);
20 
21  RColor getColor();
22  void setColor(const RColor& col);
23  void init();
24  bool getOnlyFixed();
25  void setOnlyFixed(bool onlyFixed);
26  //bool isBlackWhite();
27  //void setBlackWhite(bool blackWhite);
28  bool getShowAlphaChannel();
30 
31 signals:
32  void valueChanged(const RColor& color);
33  void dialogRunning(bool isRunning);
34 
35 public slots:
36  void colorChanged(int index);
37 
38 private:
40  bool onlyFixed;
41  bool showAlphaChannel;
42 };
43 
45 
46 #endif /* RCOLORCOMBO_H_ */