tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
color_selector.hpp
Go to the documentation of this file.
1 
23 #ifndef COLOR_SELECTOR_HPP
24 #define COLOR_SELECTOR_HPP
25 
26 #include "color_preview.hpp"
27 #include "color_wheel.hpp"
28 
33 {
34  Q_OBJECT
35  Q_ENUMS(Update_Mode)
36  Q_PROPERTY(Update_Mode updateMode READ updateMode WRITE setUpdateMode )
37  Q_PROPERTY(Qt::WindowModality dialogModality READ dialogModality WRITE setDialogModality )
38  Q_PROPERTY(Color_Wheel::Display_Flags wheelFlags READ wheelFlags WRITE setWheelFlags NOTIFY wheelFlagsChanged)
39 
40 public:
41  enum Update_Mode {
43  Continuous
44  };
45 
46  explicit Color_Selector(QWidget *parent = 0);
47  ~Color_Selector();
48 
49  void setUpdateMode(Update_Mode m);
50  Update_Mode updateMode() const;
51 
52  Qt::WindowModality dialogModality() const;
53  void setDialogModality(Qt::WindowModality m);
54 
55  Color_Wheel::Display_Flags wheelFlags() const;
56 
57 signals:
58  void wheelFlagsChanged(Color_Wheel::Display_Flags flags);
59 
60 public slots:
61  void showDialog();
62  void setWheelFlags(Color_Wheel::Display_Flags flags);
63 
64 private slots:
65  void accept_dialog();
66  void reject_dialog();
67  void update_old_color(const QColor &c);
68 
69 protected:
70  void dragEnterEvent(QDragEnterEvent *event);
71  void dropEvent(QDropEvent * event);
72 
73 private:
75  void connect_dialog();
76 
78  void disconnect_dialog();
79 
80  class Private;
81  Private * const p;
82 
83 };
84 
85 #endif // COLOR_SELECTOR_HPP
Definition: color_selector.hpp:32
Update color only after the dialog has been accepted.
Definition: color_selector.hpp:42
#define QCP_EXPORT
Definition: colorpicker_global.hpp:9
Definition: color_preview.hpp:37
Update_Mode
Definition: color_selector.hpp:41
Display an analog widget that allows the selection of a HSV color.
Definition: color_wheel.hpp:36