16#ifndef QGSGRADIENTCOLORRAMPDIALOG_H
17#define QGSGRADIENTCOLORRAMPDIALOG_H
22#include "ui_qgsgradientcolorrampdialogbase.h"
30class QgsGradientPlotEventFilter;
69 QDialogButtonBox *buttonBox()
const;
82 void setColor1(
const QColor &color );
88 void setColor2(
const QColor &color );
91 void cboType_currentIndexChanged(
int index );
92 void btnInformation_pressed();
93 void updateRampFromStopEditor();
94 void updateColorButtons();
95 void updateStopEditor();
97 void colorWidgetChanged(
const QColor &color );
98 void mPositionSpinBox_valueChanged(
double val );
99 void mPlotHueCheckbox_toggled(
bool checked );
100 void mPlotLightnessCheckbox_toggled(
bool checked );
101 void mPlotSaturationCheckbox_toggled(
bool checked );
102 void mPlotAlphaCheckbox_toggled(
bool checked );
103 void plotMousePress( QPointF point );
104 void plotMouseRelease( QPointF point );
105 void plotMouseMove( QPointF point );
111 QwtPlotCurve *mLightnessCurve =
nullptr;
112 QwtPlotCurve *mSaturationCurve =
nullptr;
113 QwtPlotCurve *mHueCurve =
nullptr;
114 QwtPlotCurve *mAlphaCurve =
nullptr;
115 QList< QwtPlotMarker * > mMarkers;
116 QgsGradientPlotEventFilter *mPlotFilter =
nullptr;
117 int mCurrentPlotColorComponent;
118 int mCurrentPlotMarkerIndex;
119 int mBlockChanges = 0;
122 void addPlotMarker(
double x,
double y,
const QColor &color,
bool isSelected =
false );
123 void addMarkersForColor(
double x,
const QColor &color,
bool isSelected =
false );
133class GUI_EXPORT QgsGradientPlotEventFilter:
public QObject
139 QgsGradientPlotEventFilter( QwtPlot *plot );
141 bool eventFilter( QObject *
object, QEvent *event )
override;
145 void mousePress( QPointF );
146 void mouseRelease( QPointF );
147 void mouseMove( QPointF );
151 QwtPlot *mPlot =
nullptr;
152 QPointF mapPoint( QPointF point )
const;
A dialog which allows users to modify the properties of a QgsGradientColorRamp.
QgsGradientColorRamp ramp() const
Returns a color ramp representing the current settings from the dialog.
void changed()
Emitted when the dialog settings change.
Gradient color ramp, which smoothly interpolates between two colors and also supports optional extra ...
Represents a color stop within a QgsGradientColorRamp color ramp.