color_selector.hpp
Go to the documentation of this file.
1 
22 #ifndef COLOR_SELECTOR_HPP
23 #define COLOR_SELECTOR_HPP
24 
25 #include "color_preview.hpp"
26 #include "color_wheel.hpp"
27 
28 namespace color_widgets {
29 
34 {
35  Q_OBJECT
36  Q_ENUMS(UpdateMode)
38  Q_PROPERTY(Qt::WindowModality dialogModality READ dialogModality WRITE setDialogModality )
39  Q_PROPERTY(ColorWheel::DisplayFlags wheelFlags READ wheelFlags WRITE setWheelFlags NOTIFY wheelFlagsChanged)
40 
41 public:
42  enum UpdateMode {
45  };
46 
47  explicit ColorSelector(QWidget *parent = 0);
49 
50  void setUpdateMode(UpdateMode m);
51  UpdateMode updateMode() const;
52 
53  Qt::WindowModality dialogModality() const;
54  void setDialogModality(Qt::WindowModality m);
55 
56  ColorWheel::DisplayFlags wheelFlags() const;
57 
58 signals:
59  void wheelFlagsChanged(ColorWheel::DisplayFlags flags);
60 
61 public slots:
62  void showDialog();
63  void setWheelFlags(ColorWheel::DisplayFlags flags);
64 
65 private slots:
66  void accept_dialog();
67  void reject_dialog();
68  void update_old_color(const QColor &c);
69 
70 protected:
71  void dragEnterEvent(QDragEnterEvent *event);
72  void dropEvent(QDropEvent * event);
73 
74 private:
76  void connect_dialog();
77 
79  void disconnect_dialog();
80 
81  class Private;
82  Private * const p;
83 
84 };
85 
86 } // namespace color_widgets
87 
88 #endif // COLOR_SELECTOR_HPP
void dragEnterEvent(QDragEnterEvent *event)
Display an analog widget that allows the selection of a HSV color.
Definition: color_wheel.hpp:35
void wheelFlagsChanged(ColorWheel::DisplayFlags flags)
ColorSelector(QWidget *parent=0)
Update color as it's being modified in the dialog.
void dropEvent(QDropEvent *event)
void connect_dialog()
Connect/Disconnect colorChanged based on UpdateMode.
void update_old_color(const QColor &c)
void setDialogModality(Qt::WindowModality m)
UpdateMode updateMode() const
MQTTClient c
Definition: test10.c:1656
void disconnect_dialog()
Disconnect from dialog update.
Update color only after the dialog has been accepted.
Qt::WindowModality dialogModality() const
void setWheelFlags(ColorWheel::DisplayFlags flags)
void setUpdateMode(UpdateMode m)
ColorWheel::DisplayFlags wheelFlags() const


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:47:33