Salome HOME
basic implementation of images operations support
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ColorWidget.h
1
2 #ifndef HYDROGUI_COLOR_WIDGET_HEADER
3 #define HYDROGUI_COLOR_WIDGET_HEADER
4
5 #include <QFrame>
6
7 /** \class HYDROGUI_ColorWidget
8  * \brief The class representing widget for color selection
9  */
10 class HYDROGUI_ColorWidget : public QFrame
11 {
12   Q_OBJECT
13
14 public:
15   /** Constructor 
16    * \param parent - parent widget
17    */
18   HYDROGUI_ColorWidget( QWidget* parent );
19   /** Destructor */
20   virtual ~HYDROGUI_ColorWidget();
21
22   /** \return color value */
23   QColor color() const;
24   /** Sets color value */
25   void   setColor( const QColor& );
26   /** \return color value in the integer form */
27   //int    intColor() const;
28   /** Sets color value in the integer form */
29   //void   setColor( const int );
30   /** Sets a randomized color as current value */
31   //void   setRandColor();
32
33 signals:
34   /** is emitted when signal is changed */
35   void colorChanged( const QColor& );
36
37 protected:
38   /** mouse double click event handler, activates the standard color dialog for color choice */
39   virtual void mouseDoubleClickEvent( QMouseEvent* );
40 };
41
42 #endif