16 #ifndef QGSGRADIENTCOLORRAMPDIALOG_H
17 #define QGSGRADIENTCOLORRAMPDIALOG_H
22 #include "ui_qgsgradientcolorrampdialogbase.h"
30 class QgsGradientPlotEventFilter;
70 QDialogButtonBox *buttonBox()
const;
83 void setColor1(
const QColor &color );
89 void setColor2(
const QColor &color );
92 void cboType_currentIndexChanged(
int index );
93 void btnInformation_pressed();
94 void updateRampFromStopEditor();
95 void updateColorButtons();
96 void updateStopEditor();
98 void colorWidgetChanged(
const QColor &color );
99 void mPositionSpinBox_valueChanged(
double val );
100 void mPlotHueCheckbox_toggled(
bool checked );
101 void mPlotLightnessCheckbox_toggled(
bool checked );
102 void mPlotSaturationCheckbox_toggled(
bool checked );
103 void mPlotAlphaCheckbox_toggled(
bool checked );
104 void plotMousePress( QPointF point );
105 void plotMouseRelease( QPointF point );
106 void plotMouseMove( QPointF point );
112 QwtPlotCurve *mLightnessCurve =
nullptr;
113 QwtPlotCurve *mSaturationCurve =
nullptr;
114 QwtPlotCurve *mHueCurve =
nullptr;
115 QwtPlotCurve *mAlphaCurve =
nullptr;
116 QList< QwtPlotMarker * > mMarkers;
117 QgsGradientPlotEventFilter *mPlotFilter =
nullptr;
118 int mCurrentPlotColorComponent;
119 int mCurrentPlotMarkerIndex;
120 int mBlockChanges = 0;
123 void addPlotMarker(
double x,
double y,
const QColor &color,
bool isSelected =
false );
124 void addMarkersForColor(
double x,
const QColor &color,
bool isSelected =
false );
134 class GUI_EXPORT QgsGradientPlotEventFilter:
public QObject
140 QgsGradientPlotEventFilter( QwtPlot *plot );
142 bool eventFilter( QObject *
object, QEvent *event )
override;
146 void mousePress( QPointF );
147 void mouseRelease( QPointF );
148 void mouseMove( QPointF );
152 QwtPlot *mPlot =
nullptr;
153 QPointF mapPoint( QPointF point )
const;