color_selector.hpp
Go to the documentation of this file.
00001 
00022 #ifndef COLOR_SELECTOR_HPP
00023 #define COLOR_SELECTOR_HPP
00024 
00025 #include "color_preview.hpp"
00026 #include "color_wheel.hpp"
00027 
00028 namespace color_widgets {
00029 
00033 class  ColorSelector : public ColorPreview
00034 {
00035     Q_OBJECT
00036     Q_ENUMS(UpdateMode)
00037     Q_PROPERTY(UpdateMode updateMode READ updateMode WRITE setUpdateMode )
00038     Q_PROPERTY(Qt::WindowModality dialogModality READ dialogModality WRITE setDialogModality )
00039     Q_PROPERTY(ColorWheel::DisplayFlags wheelFlags READ wheelFlags WRITE setWheelFlags NOTIFY wheelFlagsChanged)
00040 
00041 public:
00042     enum UpdateMode {
00043         Confirm, 
00044         Continuous 
00045     };
00046 
00047     explicit ColorSelector(QWidget *parent = 0);
00048     ~ColorSelector();
00049 
00050     void setUpdateMode(UpdateMode m);
00051     UpdateMode updateMode() const;
00052 
00053     Qt::WindowModality dialogModality() const;
00054     void setDialogModality(Qt::WindowModality m);
00055 
00056     ColorWheel::DisplayFlags wheelFlags() const;
00057 
00058 signals:
00059     void wheelFlagsChanged(ColorWheel::DisplayFlags flags);
00060 
00061 public slots:
00062     void showDialog();
00063     void setWheelFlags(ColorWheel::DisplayFlags flags);
00064 
00065 private slots:
00066     void accept_dialog();
00067     void reject_dialog();
00068     void update_old_color(const QColor &c);
00069 
00070 protected:
00071     void dragEnterEvent(QDragEnterEvent *event);
00072     void dropEvent(QDropEvent * event);
00073 
00074 private:
00076     void connect_dialog();
00077 
00079     void disconnect_dialog();
00080 
00081     class Private;
00082     Private * const p;
00083     
00084 };
00085 
00086 } // namespace color_widgets
00087 
00088 #endif // COLOR_SELECTOR_HPP


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:04