16#ifndef QGSGRADIENTSTOPEDITOR_H
17#define QGSGRADIENTSTOPEDITOR_H
63 void selectStop(
int index );
71 QSize sizeHint()
const override;
72 void paintEvent( QPaintEvent *event )
override;
84 void setSelectedStopColor(
const QColor &color );
93 void setSelectedStopOffset(
double offset );
100 void setSelectedStopColorSpec( QColor::Spec spec );
116 void setSelectedStopDetails(
const QColor &color,
double offset );
122 void deleteSelectedStop();
130 void setColor1(
const QColor &color );
138 void setColor2(
const QColor &color );
153 void mouseMoveEvent( QMouseEvent *event )
override;
154 void mousePressEvent( QMouseEvent *event )
override;
155 void mouseDoubleClickEvent( QMouseEvent *event )
override;
156 void keyPressEvent( QKeyEvent *event )
override;
159 void dragEnterEvent( QDragEnterEvent *e )
override;
162 void dropEvent( QDropEvent *e )
override;
170 QPixmap transparentBackground();
179 void drawStopMarker( QPainter &painter, QPoint topMiddle,
const QColor &color,
bool selected =
false );
182 double pointToRelativePosition(
int x )
const;
185 int relativePositionToPoint(
double position )
const;
188 bool selectedStopIsMovable()
const;
191 int findClosestStop(
int x,
int threshold = -1 )
const;
199 int mSelectedStop = 0;
202 QPolygonF sOuterTriangle;
205 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.