16 #ifndef QGSCOLORWIDGETS_H 
   17 #define QGSCOLORWIDGETS_H 
   59     QgsColorWidget( QWidget* parent = 0, 
const ColorComponent component = Multiple );
 
   81     int componentValue() 
const;
 
   86     static QPixmap createDragIcon( 
const QColor color );
 
   95     virtual void setColor( 
const QColor color, 
const bool emitSignals = 
false );
 
  101     virtual void setComponent( 
const ColorComponent component );
 
  111     virtual void setComponentValue( 
const int value );
 
  118     void colorChanged( 
const QColor color );
 
  134     int componentRange() 
const;
 
  166     static const QPixmap& transparentBackground();
 
  169     void dragEnterEvent( QDragEnterEvent * e );
 
  172     void dropEvent( QDropEvent *e );
 
  196     void paintEvent( QPaintEvent* event );
 
  200     virtual void setColor( 
const QColor color, 
const bool emitSignals = 
false );
 
  204     virtual void resizeEvent( QResizeEvent *event );
 
  205     virtual void mouseMoveEvent( QMouseEvent *event );
 
  206     virtual void mousePressEvent( QMouseEvent *event );
 
  207     virtual void mouseReleaseEvent( QMouseEvent *event );
 
  225     ControlPart mClickedPart;
 
  231     QImage* mTriangleImage;
 
  234     QImage* mWidgetImage;
 
  248     void createImages( 
const QSizeF 
size );
 
  254     void createTriangle();
 
  259     void setColorFromPos( 
const QPointF pos );
 
  288     virtual QSize sizeHint() 
const;
 
  289     void paintEvent( QPaintEvent* event );
 
  295     virtual void setColor( 
const QColor color, 
const bool emitSignals = 
false );
 
  299     virtual void resizeEvent( QResizeEvent *event );
 
  300     virtual void mouseMoveEvent( QMouseEvent *event );
 
  301     virtual void mousePressEvent( QMouseEvent *event );
 
  321     int valueRangeX() 
const;
 
  326     int valueRangeY() 
const;
 
  334     int yComponentValue() 
const;
 
  342     int xComponentValue() 
const;
 
  347     void setColorFromPoint( 
const QPoint& point );
 
  384     virtual QSize sizeHint() 
const;
 
  385     void paintEvent( QPaintEvent* event );
 
  391     void setOrientation( 
const Orientation orientation );
 
  403     void setInteriorMargin( 
const int margin );
 
  415     void setShowFrame( 
const bool showFrame );
 
  426     void setMarkerSize( 
const int markerSize );
 
  433     void valueChanged( 
const int value );
 
  437     virtual void mouseMoveEvent( QMouseEvent *event );
 
  438     virtual void mousePressEvent( QMouseEvent *event );
 
  439     virtual void keyPressEvent( QKeyEvent * event );
 
  444     Orientation mOrientation;
 
  453     QPolygonF mTopTriangle;
 
  456     QPolygonF mBottomTriangle;
 
  461     void setColorFromPoint( 
const QPointF &point );
 
  488     virtual void setColor( 
const QColor color, 
const bool emitSignals = 
false );
 
  504     int convertRealToDisplay( 
const int realValue ) 
const;
 
  511     int convertDisplayToReal( 
const int displayValue ) 
const;
 
  517     void rampColorChanged( 
const QColor color );
 
  521     void spinChanged( 
int value );
 
  525     void rampChanged( 
int value );
 
  550     virtual void setColor( 
const QColor color, 
const bool emitSignals = 
false );
 
  553     void resizeEvent( QResizeEvent * event );
 
  567     QLineEdit* mLineEdit;
 
  570     QToolButton* mMenuButton;
 
  573     ColorTextFormat mFormat;
 
  610     void paintEvent( QPaintEvent* event );
 
  618     QColor 
color2()
 const { 
return mColor2; }
 
  628     virtual void setColor2( 
const QColor& color );
 
  633     void mousePressEvent( QMouseEvent* e );
 
  636     void mouseReleaseEvent( QMouseEvent* e );
 
  639     void mouseMoveEvent( QMouseEvent *e );
 
  646     QPoint mDragStartPosition;
 
  653     void drawColor( 
const QColor& color, 
const QRect& rect, QPainter &painter );
 
  656 #endif // #ifndef QGSCOLORWIDGETS_H