20 #include <QColorDialog> 29 spinCount->setValue( ramp->
count() );
30 spinHue1->setValue( ramp->
hueMin() );
31 spinHue2->setValue( ramp->
hueMax() );
32 spinSat1->setValue( ramp->
satMin() );
33 spinSat2->setValue( ramp->
satMax() );
34 spinVal1->setValue( ramp->
valMin() );
35 spinVal2->setValue( ramp->
valMax() );
37 connect( spinCount, SIGNAL( valueChanged(
int ) ),
this, SLOT(
setCount(
int ) ) );
38 connect( spinHue1, SIGNAL( valueChanged(
int ) ),
this, SLOT(
setHue1(
int ) ) );
39 connect( spinHue2, SIGNAL( valueChanged(
int ) ),
this, SLOT(
setHue2(
int ) ) );
40 connect( spinSat1, SIGNAL( valueChanged(
int ) ),
this, SLOT(
setSat1(
int ) ) );
41 connect( spinSat2, SIGNAL( valueChanged(
int ) ),
this, SLOT(
setSat2(
int ) ) );
42 connect( spinVal1, SIGNAL( valueChanged(
int ) ),
this, SLOT(
setVal1(
int ) ) );
43 connect( spinVal2, SIGNAL( valueChanged(
int ) ),
this, SLOT(
setVal2(
int ) ) );
QgsVectorRandomColorRampV2Dialog(QgsVectorRandomColorRampV2 *ramp, QWidget *parent=nullptr)
int count() const override
Returns number of defined colors, or -1 if undefined.
static QPixmap colorRampPreviewPixmap(QgsVectorColorRampV2 *ramp, QSize size)
QgsVectorRandomColorRampV2 * mRamp
Random color ramp, which returns random colors based on preset parameters.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)