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
color_widgets::ColorSelector::dialogModality
Qt::WindowModality dialogModality
Definition: color_selector.hpp:38
color_widgets::ColorSelector::update_old_color
void update_old_color(const QColor &c)
color_widgets::ColorSelector::accept_dialog
void accept_dialog()
color_preview.hpp
color_widgets::ColorSelector::~ColorSelector
~ColorSelector()
color_widgets::ColorSelector::disconnect_dialog
void disconnect_dialog()
Disconnect from dialog update.
color_widgets::ColorSelector::setUpdateMode
void setUpdateMode(UpdateMode m)
color_widgets::ColorSelector::setWheelFlags
void setWheelFlags(ColorWheel::DisplayFlags flags)
color_widgets::ColorSelector::dropEvent
void dropEvent(QDropEvent *event)
color_widgets
Definition: color_dialog.hpp:33
color_widgets::ColorSelector::UpdateMode
UpdateMode
Definition: color_selector.hpp:42
color_widgets::ColorWheel
Display an analog widget that allows the selection of a HSV color.
Definition: color_wheel.hpp:35
color_widgets::ColorSelector::updateMode
UpdateMode updateMode
Definition: color_selector.hpp:37
color_wheel.hpp
color_widgets::ColorSelector::Confirm
@ Confirm
Update color only after the dialog has been accepted.
Definition: color_selector.hpp:43
color_widgets::ColorSelector::reject_dialog
void reject_dialog()
color_widgets::ColorPreview::Private
Definition: color_preview.cpp:33
color_widgets::ColorSelector
Definition: color_selector.hpp:33
color_widgets::ColorPreview
Definition: color_preview.hpp:33
color_widgets::ColorSelector::Continuous
@ Continuous
Update color as it's being modified in the dialog.
Definition: color_selector.hpp:44
color_widgets::ColorSelector::connect_dialog
void connect_dialog()
Connect/Disconnect colorChanged based on UpdateMode.
color_widgets::ColorSelector::ColorSelector
ColorSelector(QWidget *parent=0)
color_widgets::ColorSelector::p
Private *const p
Definition: color_selector.hpp:81
color_widgets::ColorSelector::setDialogModality
void setDialogModality(Qt::WindowModality m)
color_widgets::ColorSelector::wheelFlagsChanged
void wheelFlagsChanged(ColorWheel::DisplayFlags flags)
color_widgets::ColorSelector::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
color_widgets::ColorSelector::wheelFlags
ColorWheel::DisplayFlags wheelFlags
Definition: color_selector.hpp:39
color_widgets::ColorSelector::showDialog
void showDialog()


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:43