16#ifndef QGSGRADIENTSTOPEDITOR_H
17#define QGSGRADIENTSTOPEDITOR_H
64 void selectStop(
int index );
72 QSize sizeHint()
const override;
73 void paintEvent( QPaintEvent *event )
override;
85 void setSelectedStopColor(
const QColor &color );
94 void setSelectedStopOffset(
double offset );
101 void setSelectedStopColorSpec( QColor::Spec spec );
117 void setSelectedStopDetails(
const QColor &color,
double offset );
123 void deleteSelectedStop();
131 void setColor1(
const QColor &color );
139 void setColor2(
const QColor &color );
154 void mouseMoveEvent( QMouseEvent *event )
override;
155 void mousePressEvent( QMouseEvent *event )
override;
156 void mouseDoubleClickEvent( QMouseEvent *event )
override;
157 void keyPressEvent( QKeyEvent *event )
override;
160 void dragEnterEvent( QDragEnterEvent *e )
override;
163 void dropEvent( QDropEvent *e )
override;
171 QPixmap transparentBackground();
180 void drawStopMarker( QPainter &painter, QPoint topMiddle,
const QColor &color,
bool selected =
false );
183 double pointToRelativePosition(
int x )
const;
186 int relativePositionToPoint(
double position )
const;
189 bool selectedStopIsMovable()
const;
192 int findClosestStop(
int x,
int threshold = -1 )
const;
200 int mSelectedStop = 0;
203 QPolygonF sOuterTriangle;
206 QPolygonF sInnerTriangle;
AngularDirection
Angular directions.
Gradient color ramp, which smoothly interpolates between two colors and also supports optional extra ...
An interactive editor for previewing a gradient color ramp and modifying the position of color stops ...
QgsGradientColorRamp gradientRamp() const
Returns the current ramp created by the editor.
void changed()
Emitted when the gradient ramp is changed by a user.
void selectedStopChanged(const QgsGradientStop &stop)
Emitted when the current selected stop changes.
Represents a color stop within a QgsGradientColorRamp color ramp.
QList< QgsGradientStop > QgsGradientStopsList
List of gradient stops.