QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSCOLORWIDGETS_H
17 #define QGSCOLORWIDGETS_H
19 #include <QWidgetAction>
88 int componentValue()
const;
94 static QPixmap createDragIcon(
const QColor &color );
104 virtual void setColor(
const QColor &color,
bool emitSignals =
false );
122 virtual void setComponentValue(
int value );
148 int mExplicitHue = 0;
154 int componentRange()
const;
191 static const QPixmap &transparentBackground();
194 void dragEnterEvent( QDragEnterEvent *e )
override;
197 void dropEvent( QDropEvent *e )
override;
199 void mouseMoveEvent( QMouseEvent *e )
override;
200 void mousePressEvent( QMouseEvent *e )
override;
201 void mouseReleaseEvent( QMouseEvent *e )
override;
258 QMenu *mMenu =
nullptr;
262 bool mSuppressRecurse;
264 bool mDismissOnColorSelection;
276 void setColor(
const QColor &color );
303 QSize sizeHint()
const override;
304 void paintEvent( QPaintEvent *event )
override;
308 void setColor(
const QColor &color,
bool emitSignals =
false )
override;
312 void resizeEvent( QResizeEvent *event )
override;
330 int mWheelThickness = 18;
333 ControlPart mClickedPart = QgsColorWheel::None;
336 QImage *mWheelImage =
nullptr;
339 QImage *mTriangleImage =
nullptr;
342 QImage *mWidgetImage =
nullptr;
345 bool mWheelDirty =
true;
348 bool mTriangleDirty =
true;
357 void createImages( QSizeF size );
363 void createTriangle();
369 void setColorFromPos( QPointF pos );
400 QSize sizeHint()
const override;
401 void paintEvent( QPaintEvent *event )
override;
406 void setColor(
const QColor &color,
bool emitSignals =
false )
override;
410 void resizeEvent( QResizeEvent *event )
override;
420 QImage *mBoxImage =
nullptr;
434 int valueRangeX()
const;
440 int valueRangeY()
const;
450 int yComponentValue()
const;
460 int xComponentValue()
const;
466 void setColorFromPoint( QPoint point );
504 QSize sizeHint()
const override;
505 void paintEvent( QPaintEvent *event )
override;
512 void setOrientation( Orientation orientation );
526 void setInteriorMargin(
int margin );
540 void setShowFrame(
bool showFrame );
553 void setMarkerSize(
int markerSize );
566 void wheelEvent( QWheelEvent *event )
override;
568 void keyPressEvent( QKeyEvent *event )
override;
579 bool mShowFrame =
false;
582 QPolygonF mTopTriangle;
585 QPolygonF mBottomTriangle;
591 void setColorFromPoint( QPointF point );
618 void setColor(
const QColor &color,
bool emitSignals =
false )
override;
626 QSpinBox *mSpinBox =
nullptr;
635 int convertRealToDisplay(
int realValue )
const;
643 int convertDisplayToReal(
int displayValue )
const;
650 void rampColorChanged(
const QColor &color );
655 void spinChanged(
int value );
660 void rampChanged(
int value );
689 Q_ENUM( ColorTextFormat )
697 void setColor(
const QColor &color,
bool emitSignals =
false )
override;
700 void resizeEvent( QResizeEvent *event )
override;
704 QLineEdit *mLineEdit =
nullptr;
707 QToolButton *mMenuButton =
nullptr;
750 void paintEvent( QPaintEvent *event )
override;
751 QSize sizeHint()
const override;
760 QColor
color2()
const {
return mColor2; }
771 virtual void setColor2(
const QColor &color );
789 QPoint mDragStartPosition;
796 void drawColor(
const QColor &color, QRect rect, QPainter &painter );
799 #endif // #ifndef QGSCOLORWIDGETS_H
@ Rgb
Rgb( r, g, b ) format.
@ HexRgb
#RRGGBB in hexadecimal
@ HexRgbA
#RRGGBBAA in hexadecimal, with alpha
ColorTextFormat
Specifies the display format for a color.
A line edit widget which displays colors as text and accepts string representations of colors.
QList< QPair< QRgb, int > > QgsColorBox