|
QGIS API Documentation 4.3.0-Master (b46232e4f9a)
|
An interactive editor for previewing a gradient color ramp and modifying the position of color stops along the gradient. More...
#include <qgsgradientstopeditor.h>

Public Slots | |
| void | deleteSelectedStop () |
| Deletes the current selected stop. | |
| void | setColor1 (const QColor &color) |
| Sets the color for the first stop. | |
| void | setColor2 (const QColor &color) |
| Sets the color for the last stop. | |
| void | setSelectedStopColor (const QColor &color) |
| Sets the color for the current selected stop. | |
| void | setSelectedStopColorSpec (QColor::Spec spec) |
| Sets the color spec for the current selected stop. | |
| void | setSelectedStopDetails (const QColor &color, double offset) |
| Sets the color and offset for the current selected stop. | |
| void | setSelectedStopDirection (Qgis::AngularDirection direction) |
| Sets the hue angular direction for the current selected stop. | |
| void | setSelectedStopOffset (double offset) |
| Sets the offset for the current selected stop. | |
Signals | |
| void | changed () |
| Emitted when the gradient ramp is changed by a user. | |
| void | selectedStopChanged (const QgsGradientStop &stop) |
| Emitted when the current selected stop changes. | |
Public Member Functions | |
| QgsGradientStopEditor (QWidget *parent=nullptr, QgsGradientColorRamp *ramp=nullptr) | |
| Constructor for QgsGradientStopEditor. | |
| QgsGradientColorRamp | gradientRamp () const |
| Returns the current ramp created by the editor. | |
| void | paintEvent (QPaintEvent *event) override |
| QgsGradientStop | selectedStop () const |
| Returns details about the currently selected stop. | |
| void | selectStop (int index) |
| Sets the currently selected stop. | |
| void | setGradientRamp (const QgsGradientColorRamp &ramp) |
| Sets the current ramp shown in the editor. | |
| QSize | sizeHint () const override |
Protected Member Functions | |
| void | dragEnterEvent (QDragEnterEvent *e) override |
| void | dropEvent (QDropEvent *e) override |
| void | keyPressEvent (QKeyEvent *event) override |
| void | mouseDoubleClickEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
An interactive editor for previewing a gradient color ramp and modifying the position of color stops along the gradient.
Definition at line 32 of file qgsgradientstopeditor.h.
| QgsGradientStopEditor::QgsGradientStopEditor | ( | QWidget * | parent = nullptr, |
| QgsGradientColorRamp * | ramp = nullptr ) |
Constructor for QgsGradientStopEditor.
| parent | parent widget |
| ramp | optional initial gradient ramp |
Definition at line 31 of file qgsgradientstopeditor.cpp.
|
signal |
Emitted when the gradient ramp is changed by a user.
|
slot |
Deletes the current selected stop.
This slot has no effect if either the first or last stop is selected, as they cannot be deleted.
Definition at line 262 of file qgsgradientstopeditor.cpp.
|
overrideprotected |
Definition at line 479 of file qgsgradientstopeditor.cpp.
|
overrideprotected |
Definition at line 492 of file qgsgradientstopeditor.cpp.
|
inline |
Returns the current ramp created by the editor.
Definition at line 55 of file qgsgradientstopeditor.h.
|
overrideprotected |
Definition at line 383 of file qgsgradientstopeditor.cpp.
|
overrideprotected |
Definition at line 368 of file qgsgradientstopeditor.cpp.
|
overrideprotected |
Definition at line 293 of file qgsgradientstopeditor.cpp.
|
overrideprotected |
Definition at line 353 of file qgsgradientstopeditor.cpp.
|
override |
Definition at line 78 of file qgsgradientstopeditor.cpp.
| QgsGradientStop QgsGradientStopEditor::selectedStop | ( | ) | const |
Returns details about the currently selected stop.
Definition at line 158 of file qgsgradientstopeditor.cpp.
|
signal |
Emitted when the current selected stop changes.
| stop | details about newly selected stop |
| void QgsGradientStopEditor::selectStop | ( | int | index | ) |
Sets the currently selected stop.
| index | index of stop, where 0 corresponds to the first stop |
Definition at line 135 of file qgsgradientstopeditor.cpp.
|
slot |
Sets the color for the first stop.
| color | new stop color |
Definition at line 279 of file qgsgradientstopeditor.cpp.
|
slot |
Sets the color for the last stop.
| color | new stop color |
Definition at line 286 of file qgsgradientstopeditor.cpp.
| void QgsGradientStopEditor::setGradientRamp | ( | const QgsGradientColorRamp & | ramp | ) |
Sets the current ramp shown in the editor.
| ramp | color ramp |
Definition at line 63 of file qgsgradientstopeditor.cpp.
|
slot |
Sets the color for the current selected stop.
| color | new stop color |
Definition at line 177 of file qgsgradientstopeditor.cpp.
|
slot |
Sets the color spec for the current selected stop.
Definition at line 207 of file qgsgradientstopeditor.cpp.
|
slot |
Sets the color and offset for the current selected stop.
| color | new stop color |
| offset | new stop offset |
Definition at line 241 of file qgsgradientstopeditor.cpp.
|
slot |
Sets the hue angular direction for the current selected stop.
Definition at line 224 of file qgsgradientstopeditor.cpp.
|
slot |
Sets the offset for the current selected stop.
This slot has no effect if either the first or last stop is selected, as they cannot be repositioned.
| offset | new stop offset |
Definition at line 196 of file qgsgradientstopeditor.cpp.
|
override |
Definition at line 72 of file qgsgradientstopeditor.cpp.