A preview box which displays one or two colors as swatches.
More...
#include <qgscolorwidgets.h>
Public Slots |
virtual void | setColor2 (const QColor &color) |
| Sets the second color for the widget.
|
virtual void | setColor (const QColor &color, const bool emitSignals=false) |
| Sets the color for the widget.
|
virtual void | setComponent (const ColorComponent component) |
| Sets the color component which the widget controls.
|
virtual void | setComponentValue (const int value) |
| Alters the widget's color by setting the value for the widget's color component.
|
Detailed Description
A preview box which displays one or two colors as swatches.
- Note
- Added in version 2.5
Definition at line 596 of file qgscolorwidgets.h.
Constructor & Destructor Documentation
QgsColorPreviewWidget::QgsColorPreviewWidget |
( |
QWidget * |
parent = 0 | ) |
|
Construct a new color preview widget.
- Parameters
-
parent | parent QWidget for the widget |
Definition at line 1510 of file qgscolorwidgets.cpp.
QgsColorPreviewWidget::~QgsColorPreviewWidget |
( |
| ) |
|
|
virtual |
Member Function Documentation
QColor QgsColorPreviewWidget::color2 |
( |
| ) |
const |
|
inline |
Returns the secondary color for the widget.
- Returns
- secondary widget color, or an invalid color if the widget has no secondary color
- See Also
- color
-
setColor2
Definition at line 617 of file qgscolorwidgets.h.
void QgsColorPreviewWidget::mouseMoveEvent |
( |
QMouseEvent * |
e | ) |
|
|
overrideprotected |
void QgsColorPreviewWidget::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
overrideprotected |
void QgsColorPreviewWidget::mouseReleaseEvent |
( |
QMouseEvent * |
e | ) |
|
|
overrideprotected |
void QgsColorPreviewWidget::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
override |
void QgsColorPreviewWidget::setColor2 |
( |
const QColor & |
color | ) |
|
|
virtualslot |
Sets the second color for the widget.
- Parameters
-
color | secondary widget color. Set to an invalid color to prevent drawing of a secondary color |
- See Also
- setColor
-
color2
Definition at line 1574 of file qgscolorwidgets.cpp.
The documentation for this class was generated from the following files: