diff --git a/python/gui/qgscolorbrewercolorrampdialog.sip b/python/gui/qgscolorbrewercolorrampdialog.sip index 527bd9dc5a0..ca63842c1e1 100644 --- a/python/gui/qgscolorbrewercolorrampdialog.sip +++ b/python/gui/qgscolorbrewercolorrampdialog.sip @@ -1,3 +1,40 @@ +/** \ingroup gui + * \class QgsColorBrewerColorRampDialog + * A widget which allows users to modify the properties of a QgsColorBrewerColorRamp. + * \note added in QGIS 3.0 + */ + +class QgsColorBrewerColorRampWidget : QgsPanelWidget +{ +%TypeHeaderCode +#include +%End + + public: + + /** Constructor for QgsColorBrewerColorRampDialog. + * @param ramp initial ramp to show in dialog + * @param parent parent widget + */ + QgsColorBrewerColorRampWidget( const QgsColorBrewerColorRamp& ramp, QWidget* parent /TransferThis/ = nullptr ); + + /** Returns a color ramp representing the current settings from the dialog. + * @see setRamp() + */ + QgsColorBrewerColorRamp ramp() const; + + /** Sets the color ramp to show in the dialog. + * @param ramp color ramp + * @see ramp() + */ + void setRamp( const QgsColorBrewerColorRamp& ramp ); + + signals: + + //! Emitted when the dialog settings change + void changed(); +}; + /** \ingroup gui * \class QgsColorBrewerColorRampDialog * A dialog which allows users to modify the properties of a QgsColorBrewerColorRamp. diff --git a/python/gui/qgslimitedrandomcolorrampdialog.sip b/python/gui/qgslimitedrandomcolorrampdialog.sip index 22d83991b42..057a52482fb 100644 --- a/python/gui/qgslimitedrandomcolorrampdialog.sip +++ b/python/gui/qgslimitedrandomcolorrampdialog.sip @@ -1,3 +1,57 @@ +/** \ingroup gui + * \class QgsLimitedRandomColorRampWidget + * A widget which allows users to modify the properties of a QgsLimitedRandomColorRamp. + * \note added in QGIS 3.0 + */ + +class QgsLimitedRandomColorRampWidget : QgsPanelWidget +{ +%TypeHeaderCode +#include +%End + + public: + + /** Constructor for QgsLimitedRandomColorRampWidget. + * @param ramp initial ramp to show in dialog + * @param parent parent widget + */ + QgsLimitedRandomColorRampWidget( const QgsLimitedRandomColorRamp& ramp, QWidget* parent /TransferThis/ = nullptr ); + + /** Returns a color ramp representing the current settings from the dialog. + * @see setRamp() + */ + QgsLimitedRandomColorRamp ramp() const; + + /** Sets the color ramp to show in the dialog. + * @param ramp color ramp + * @see ramp() + */ + void setRamp( const QgsLimitedRandomColorRamp& ramp ); + + signals: + + //! Emitted when the dialog settings change + void changed(); + + public slots: + + //! Sets the number of colors to create in the ramp + void setCount( int val ); + //! Sets the minimum hue for colors in the ramp + void setHue1( int val ); + //! Sets the maximum hue for colors in the ramp + void setHue2( int val ); + //! Sets the minimum saturation for colors in the ramp + void setSat1( int val ); + //! Sets the maximum saturation for colors in the ramp + void setSat2( int val ); + //! Sets the minimum value for colors in the ramp + void setVal1( int val ); + //! Sets the maximum value for colors in the ramp + void setVal2( int val ); +}; + /** \ingroup gui * \class QgsLimitedRandomColorRampDialog * A dialog which allows users to modify the properties of a QgsLimitedRandomColorRamp. @@ -34,20 +88,4 @@ class QgsLimitedRandomColorRampDialog : QDialog //! Emitted when the dialog settings change void changed(); - public slots: - - //! Sets the number of colors to create in the ramp - void setCount( int val ); - //! Sets the minimum hue for colors in the ramp - void setHue1( int val ); - //! Sets the maximum hue for colors in the ramp - void setHue2( int val ); - //! Sets the minimum saturation for colors in the ramp - void setSat1( int val ); - //! Sets the maximum saturation for colors in the ramp - void setSat2( int val ); - //! Sets the minimum value for colors in the ramp - void setVal1( int val ); - //! Sets the maximum value for colors in the ramp - void setVal2( int val ); }; diff --git a/src/gui/qgscolorbrewercolorrampdialog.cpp b/src/gui/qgscolorbrewercolorrampdialog.cpp index 5327bc2668f..6f8f32c923d 100644 --- a/src/gui/qgscolorbrewercolorrampdialog.cpp +++ b/src/gui/qgscolorbrewercolorrampdialog.cpp @@ -18,6 +18,7 @@ #include "qgscolorramp.h" #include "qgssymbollayerutils.h" #include +#include #if 0 // unused static void updateColorButton( QAbstractButton* button, QColor color ) @@ -31,8 +32,8 @@ static void updateColorButton( QAbstractButton* button, QColor color ) ///////// -QgsColorBrewerColorRampDialog::QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp& ramp, QWidget* parent ) - : QDialog( parent ) +QgsColorBrewerColorRampWidget::QgsColorBrewerColorRampWidget( const QgsColorBrewerColorRamp& ramp, QWidget* parent ) + : QgsPanelWidget( parent ) , mRamp( ramp ) { @@ -56,14 +57,14 @@ QgsColorBrewerColorRampDialog::QgsColorBrewerColorRampDialog( const QgsColorBrew connect( cboColors, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setColors() ) ); } -void QgsColorBrewerColorRampDialog::setRamp( const QgsColorBrewerColorRamp& ramp ) +void QgsColorBrewerColorRampWidget::setRamp( const QgsColorBrewerColorRamp& ramp ) { mRamp = ramp; updateUi(); emit changed(); } -void QgsColorBrewerColorRampDialog::populateVariants() +void QgsColorBrewerColorRampWidget::populateVariants() { QString oldVariant = cboColors->currentText(); @@ -85,13 +86,13 @@ void QgsColorBrewerColorRampDialog::populateVariants() cboColors->setCurrentIndex( idx ); } -void QgsColorBrewerColorRampDialog::updatePreview() +void QgsColorBrewerColorRampWidget::updatePreview() { QSize size( 300, 40 ); lblPreview->setPixmap( QgsSymbolLayerUtils::colorRampPreviewPixmap( &mRamp, size ) ); } -void QgsColorBrewerColorRampDialog::updateUi() +void QgsColorBrewerColorRampWidget::updateUi() { whileBlocking( cboSchemeName )->setCurrentIndex( cboSchemeName->findText( mRamp.schemeName() ) ); populateVariants(); @@ -99,7 +100,7 @@ void QgsColorBrewerColorRampDialog::updateUi() updatePreview(); } -void QgsColorBrewerColorRampDialog::setSchemeName() +void QgsColorBrewerColorRampWidget::setSchemeName() { // populate list of variants populateVariants(); @@ -109,10 +110,24 @@ void QgsColorBrewerColorRampDialog::setSchemeName() emit changed(); } -void QgsColorBrewerColorRampDialog::setColors() +void QgsColorBrewerColorRampWidget::setColors() { int num = cboColors->currentText().toInt(); mRamp.setColors( num ); updatePreview(); emit changed(); } + +QgsColorBrewerColorRampDialog::QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp& ramp, QWidget* parent ) + : QDialog( parent ) +{ + QVBoxLayout* vLayout = new QVBoxLayout(); + mWidget = new QgsColorBrewerColorRampWidget( ramp ); + vLayout->addWidget( mWidget ); + QDialogButtonBox* bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal ); + connect( bbox, SIGNAL( accepted() ), this, SLOT( accept() ) ); + connect( bbox, SIGNAL( rejected() ), this, SLOT( reject() ) ); + vLayout->addWidget( bbox ); + setLayout( vLayout ); + connect( mWidget, SIGNAL( changed() ), this, SIGNAL( changed() ) ); +} diff --git a/src/gui/qgscolorbrewercolorrampdialog.h b/src/gui/qgscolorbrewercolorrampdialog.h index c655ed69f8d..92e474bbe30 100644 --- a/src/gui/qgscolorbrewercolorrampdialog.h +++ b/src/gui/qgscolorbrewercolorrampdialog.h @@ -17,29 +17,29 @@ #define QGSCOLORBREWERCOLORRAMPDIALOG_H #include - +#include "qgspanelwidget.h" #include "qgscolorramp.h" -#include "ui_qgscolorbrewercolorrampdialogbase.h" +#include "ui_qgscolorbrewercolorrampwidgetbase.h" class QgsColorBrewerColorRamp; /** \ingroup gui - * \class QgsColorBrewerColorRampDialog - * A dialog which allows users to modify the properties of a QgsColorBrewerColorRamp. + * \class QgsColorBrewerColorRampWidget + * A widget which allows users to modify the properties of a QgsColorBrewerColorRamp. * \note added in QGIS 3.0 */ -class GUI_EXPORT QgsColorBrewerColorRampDialog : public QDialog, private Ui::QgsColorBrewerColorRampDialogBase +class GUI_EXPORT QgsColorBrewerColorRampWidget : public QgsPanelWidget, private Ui::QgsColorBrewerColorRampWidgetBase { Q_OBJECT Q_PROPERTY( QgsColorBrewerColorRamp ramp READ ramp WRITE setRamp ) public: - /** Constructor for QgsColorBrewerColorRampDialog. + /** Constructor for QgsColorBrewerColorRampWidget. * @param ramp initial ramp to show in dialog * @param parent parent widget */ - QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp& ramp, QWidget* parent = nullptr ); + QgsColorBrewerColorRampWidget( const QgsColorBrewerColorRamp& ramp, QWidget* parent = nullptr ); /** Returns a color ramp representing the current settings from the dialog. * @see setRamp() @@ -70,4 +70,44 @@ class GUI_EXPORT QgsColorBrewerColorRampDialog : public QDialog, private Ui::Qgs QgsColorBrewerColorRamp mRamp; }; +/** \ingroup gui + * \class QgsColorBrewerColorRampDialog + * A dialog which allows users to modify the properties of a QgsColorBrewerColorRamp. + * \note added in QGIS 3.0 + */ +class GUI_EXPORT QgsColorBrewerColorRampDialog : public QDialog +{ + Q_OBJECT + Q_PROPERTY( QgsColorBrewerColorRamp ramp READ ramp WRITE setRamp ) + + public: + + /** Constructor for QgsColorBrewerColorRampDialog. + * @param ramp initial ramp to show in dialog + * @param parent parent widget + */ + QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp& ramp, QWidget* parent = nullptr ); + + /** Returns a color ramp representing the current settings from the dialog. + * @see setRamp() + */ + QgsColorBrewerColorRamp ramp() const { return mWidget->ramp(); } + + /** Sets the color ramp to show in the dialog. + * @param ramp color ramp + * @see ramp() + */ + void setRamp( const QgsColorBrewerColorRamp& ramp ) { mWidget->setRamp( ramp ); } + + signals: + + //! Emitted when the dialog settings change + void changed(); + + private: + + QgsColorBrewerColorRampWidget* mWidget; + +}; + #endif diff --git a/src/gui/qgslimitedrandomcolorrampdialog.cpp b/src/gui/qgslimitedrandomcolorrampdialog.cpp index d2b153456eb..1ef886326d5 100644 --- a/src/gui/qgslimitedrandomcolorrampdialog.cpp +++ b/src/gui/qgslimitedrandomcolorrampdialog.cpp @@ -19,10 +19,11 @@ #include "qgscolorramp.h" #include +#include -QgsLimitedRandomColorRampDialog::QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp& ramp, QWidget* parent ) - : QDialog( parent ) +QgsLimitedRandomColorRampWidget::QgsLimitedRandomColorRampWidget( const QgsLimitedRandomColorRamp& ramp, QWidget* parent ) + : QgsPanelWidget( parent ) , mRamp( ramp ) { setupUi( this ); @@ -38,14 +39,14 @@ QgsLimitedRandomColorRampDialog::QgsLimitedRandomColorRampDialog( const QgsLimit connect( spinVal2, SIGNAL( valueChanged( int ) ), this, SLOT( setVal2( int ) ) ); } -void QgsLimitedRandomColorRampDialog::setRamp( const QgsLimitedRandomColorRamp& ramp ) +void QgsLimitedRandomColorRampWidget::setRamp( const QgsLimitedRandomColorRamp& ramp ) { mRamp = ramp; updateUi(); emit changed(); } -void QgsLimitedRandomColorRampDialog::updatePreview() +void QgsLimitedRandomColorRampWidget::updatePreview() { mRamp.updateColors(); @@ -53,7 +54,7 @@ void QgsLimitedRandomColorRampDialog::updatePreview() lblPreview->setPixmap( QgsSymbolLayerUtils::colorRampPreviewPixmap( &mRamp, size ) ); } -void QgsLimitedRandomColorRampDialog::updateUi() +void QgsLimitedRandomColorRampWidget::updateUi() { spinCount->setValue( mRamp.count() ); spinHue1->setValue( mRamp.hueMin() ); @@ -65,51 +66,65 @@ void QgsLimitedRandomColorRampDialog::updateUi() updatePreview(); } -void QgsLimitedRandomColorRampDialog::setCount( int val ) +void QgsLimitedRandomColorRampWidget::setCount( int val ) { mRamp.setCount( val ); updatePreview(); emit changed(); } -void QgsLimitedRandomColorRampDialog::setHue1( int val ) +void QgsLimitedRandomColorRampWidget::setHue1( int val ) { mRamp.setHueMin( val ); updatePreview(); emit changed(); } -void QgsLimitedRandomColorRampDialog::setHue2( int val ) +void QgsLimitedRandomColorRampWidget::setHue2( int val ) { mRamp.setHueMax( val ); updatePreview(); emit changed(); } -void QgsLimitedRandomColorRampDialog::setSat1( int val ) +void QgsLimitedRandomColorRampWidget::setSat1( int val ) { mRamp.setSatMin( val ); updatePreview(); emit changed(); } -void QgsLimitedRandomColorRampDialog::setSat2( int val ) +void QgsLimitedRandomColorRampWidget::setSat2( int val ) { mRamp.setSatMax( val ); updatePreview(); emit changed(); } -void QgsLimitedRandomColorRampDialog::setVal1( int val ) +void QgsLimitedRandomColorRampWidget::setVal1( int val ) { mRamp.setValMin( val ); updatePreview(); emit changed(); } -void QgsLimitedRandomColorRampDialog::setVal2( int val ) +void QgsLimitedRandomColorRampWidget::setVal2( int val ) { mRamp.setValMax( val ); updatePreview(); emit changed(); } + +QgsLimitedRandomColorRampDialog::QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp& ramp, QWidget* parent ) + : QDialog( parent ) +{ + QVBoxLayout* vLayout = new QVBoxLayout(); + mWidget = new QgsLimitedRandomColorRampWidget( ramp ); + vLayout->addWidget( mWidget ); + QDialogButtonBox* bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal ); + connect( bbox, SIGNAL( accepted() ), this, SLOT( accept() ) ); + connect( bbox, SIGNAL( rejected() ), this, SLOT( reject() ) ); + vLayout->addWidget( bbox ); + setLayout( vLayout ); + connect( mWidget, SIGNAL( changed() ), this, SIGNAL( changed() ) ); +} diff --git a/src/gui/qgslimitedrandomcolorrampdialog.h b/src/gui/qgslimitedrandomcolorrampdialog.h index 13e010a29f3..d4ab88f1dc3 100644 --- a/src/gui/qgslimitedrandomcolorrampdialog.h +++ b/src/gui/qgslimitedrandomcolorrampdialog.h @@ -17,27 +17,27 @@ #define QGsLIMITEDRANDOMCOLORRAMPDIALOG_H #include +#include "qgspanelwidget.h" #include "qgscolorramp.h" -#include "ui_qgslimitedrandomcolorrampdialogbase.h" - +#include "ui_qgslimitedrandomcolorrampwidgetbase.h" /** \ingroup gui - * \class QgsLimitedRandomColorRampDialog - * A dialog which allows users to modify the properties of a QgsLimitedRandomColorRamp. + * \class QgsLimitedRandomColorRampWidget + * A widget which allows users to modify the properties of a QgsLimitedRandomColorRamp. * \note added in QGIS 3.0 */ -class GUI_EXPORT QgsLimitedRandomColorRampDialog : public QDialog, private Ui::QgsLimitedRandomColorRampDialogBase +class GUI_EXPORT QgsLimitedRandomColorRampWidget : public QgsPanelWidget, private Ui::QgsLimitedRandomColorRampWidgetBase { Q_OBJECT Q_PROPERTY( QgsLimitedRandomColorRamp ramp READ ramp WRITE setRamp ) public: - /** Constructor for QgsLimitedRandomColorRampDialog. + /** Constructor for QgsLimitedRandomColorRampWidget. * @param ramp initial ramp to show in dialog * @param parent parent widget */ - QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp& ramp, QWidget* parent = nullptr ); + QgsLimitedRandomColorRampWidget( const QgsLimitedRandomColorRamp& ramp, QWidget* parent = nullptr ); /** Returns a color ramp representing the current settings from the dialog. * @see setRamp() @@ -80,4 +80,45 @@ class GUI_EXPORT QgsLimitedRandomColorRampDialog : public QDialog, private Ui::Q QgsLimitedRandomColorRamp mRamp; }; + +/** \ingroup gui + * \class QgsLimitedRandomColorRampDialog + * A dialog which allows users to modify the properties of a QgsLimitedRandomColorRamp. + * \note added in QGIS 3.0 + */ +class GUI_EXPORT QgsLimitedRandomColorRampDialog : public QDialog +{ + Q_OBJECT + Q_PROPERTY( QgsLimitedRandomColorRamp ramp READ ramp WRITE setRamp ) + + public: + + /** Constructor for QgsLimitedRandomColorRampDialog. + * @param ramp initial ramp to show in dialog + * @param parent parent widget + */ + QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp& ramp, QWidget* parent = nullptr ); + + /** Returns a color ramp representing the current settings from the dialog. + * @see setRamp() + */ + QgsLimitedRandomColorRamp ramp() const { return mWidget->ramp(); } + + /** Sets the color ramp to show in the dialog. + * @param ramp color ramp + * @see ramp() + */ + void setRamp( const QgsLimitedRandomColorRamp& ramp ) { mWidget->setRamp( ramp ); } + + signals: + + //! Emitted when the dialog settings change + void changed(); + + private: + + QgsLimitedRandomColorRampWidget* mWidget; + +}; + #endif diff --git a/src/gui/symbology-ng/qgscolorrampcombobox.cpp b/src/gui/symbology-ng/qgscolorrampcombobox.cpp index 87569f3c518..b5dd5b1abe1 100644 --- a/src/gui/symbology-ng/qgscolorrampcombobox.cpp +++ b/src/gui/symbology-ng/qgscolorrampcombobox.cpp @@ -135,6 +135,9 @@ void QgsColorRampComboBox::colorRampChanged( int index ) void QgsColorRampComboBox::editSourceRamp() { + QgsPanelWidget* panel = QgsPanelWidget::findParentPanel( this ); + bool panelMode = panel && panel->dockMode(); + QScopedPointer< QgsColorRamp > currentRamp( currentColorRamp() ); if ( !currentRamp ) return; @@ -152,21 +155,41 @@ void QgsColorRampComboBox::editSourceRamp() else if ( currentRamp->type() == "random" ) { QgsLimitedRandomColorRamp* randRamp = static_cast( currentRamp.data() ); - QgsLimitedRandomColorRampDialog dlg( *randRamp, this ); - if ( dlg.exec() ) + if ( panelMode ) { - setSourceColorRamp( dlg.ramp().clone() ); - emit sourceRampEdited(); + QgsLimitedRandomColorRampWidget* widget = new QgsLimitedRandomColorRampWidget( *randRamp, this ); + widget->setPanelTitle( tr( "Edit ramp" ) ); + connect( widget, SIGNAL( changed() ), this, SLOT( rampWidgetUpdated() ) ); + panel->openPanel( widget ); + } + else + { + QgsLimitedRandomColorRampDialog dlg( *randRamp, this ); + if ( dlg.exec() ) + { + setSourceColorRamp( dlg.ramp().clone() ); + emit sourceRampEdited(); + } } } else if ( currentRamp->type() == "colorbrewer" ) { QgsColorBrewerColorRamp* brewerRamp = static_cast( currentRamp.data() ); - QgsColorBrewerColorRampDialog dlg( *brewerRamp, this ); - if ( dlg.exec() ) + if ( panelMode ) { - setSourceColorRamp( dlg.ramp().clone() ); - emit sourceRampEdited(); + QgsColorBrewerColorRampWidget* widget = new QgsColorBrewerColorRampWidget( *brewerRamp, this ); + widget->setPanelTitle( tr( "Edit ramp" ) ); + connect( widget, SIGNAL( changed() ), this, SLOT( rampWidgetUpdated() ) ); + panel->openPanel( widget ); + } + else + { + QgsColorBrewerColorRampDialog dlg( *brewerRamp, this ); + if ( dlg.exec() ) + { + setSourceColorRamp( dlg.ramp().clone() ); + emit sourceRampEdited(); + } } } else if ( currentRamp->type() == "cpt-city" ) @@ -187,3 +210,21 @@ void QgsColorRampComboBox::editSourceRamp() } } } + +void QgsColorRampComboBox::rampWidgetUpdated() +{ + QgsLimitedRandomColorRampWidget* limitedRampWidget = qobject_cast< QgsLimitedRandomColorRampWidget* >( sender() ); + if ( limitedRampWidget ) + { + setSourceColorRamp( limitedRampWidget->ramp().clone() ); + emit sourceRampEdited(); + return; + } + QgsColorBrewerColorRampWidget* colorBrewerRampWidget = qobject_cast< QgsColorBrewerColorRampWidget* >( sender() ); + if ( colorBrewerRampWidget ) + { + setSourceColorRamp( colorBrewerRampWidget->ramp().clone() ); + emit sourceRampEdited(); + return; + } +} diff --git a/src/gui/symbology-ng/qgscolorrampcombobox.h b/src/gui/symbology-ng/qgscolorrampcombobox.h index 1a84583275b..18395f63e16 100644 --- a/src/gui/symbology-ng/qgscolorrampcombobox.h +++ b/src/gui/symbology-ng/qgscolorrampcombobox.h @@ -83,6 +83,10 @@ class GUI_EXPORT QgsColorRampComboBox : public QComboBox QgsStyle* mStyle; QgsColorRamp* mSourceColorRamp; // owns the copy + private slots: + + void rampWidgetUpdated(); + private: bool mShowGradientOnly; diff --git a/src/ui/qgscolorbrewercolorrampdialogbase.ui b/src/ui/qgscolorbrewercolorrampwidgetbase.ui similarity index 53% rename from src/ui/qgscolorbrewercolorrampdialogbase.ui rename to src/ui/qgscolorbrewercolorrampwidgetbase.ui index 34da0ba6252..b6c69579b37 100644 --- a/src/ui/qgscolorbrewercolorrampdialogbase.ui +++ b/src/ui/qgscolorbrewercolorrampwidgetbase.ui @@ -1,13 +1,13 @@ - QgsColorBrewerColorRampDialogBase - + QgsColorBrewerColorRampWidgetBase + 0 0 - 400 - 300 + 224 + 164 @@ -16,32 +16,6 @@ - - - - Scheme name - - - cboSchemeName - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 40 - 71 - - - - @@ -58,24 +32,18 @@ + + + + Scheme name + + + cboSchemeName + + + - - - - Qt::Vertical - - - QSizePolicy::Preferred - - - - 20 - 40 - - - - @@ -99,55 +67,32 @@ - + - Qt::Horizontal + Qt::Vertical - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + 20 + 40 + - + + + + QgsPanelWidget + QWidget +
qgspanelwidget.h
+ 1 +
+
cboSchemeName cboColors - buttonBox - - - buttonBox - accepted() - QgsColorBrewerColorRampDialogBase - accept() - - - 258 - 281 - - - 168 - 256 - - - - - buttonBox - rejected() - QgsColorBrewerColorRampDialogBase - reject() - - - 363 - 273 - - - 371 - 259 - - - - +
diff --git a/src/ui/qgslimitedrandomcolorrampdialogbase.ui b/src/ui/qgslimitedrandomcolorrampwidgetbase.ui similarity index 62% rename from src/ui/qgslimitedrandomcolorrampdialogbase.ui rename to src/ui/qgslimitedrandomcolorrampwidgetbase.ui index bac24a371de..ebd5ccfb985 100644 --- a/src/ui/qgslimitedrandomcolorrampdialogbase.ui +++ b/src/ui/qgslimitedrandomcolorrampwidgetbase.ui @@ -1,13 +1,13 @@ - QgsLimitedRandomColorRampDialogBase - + QgsLimitedRandomColorRampWidgetBase + 0 0 - 429 - 266 + 277 + 205 @@ -15,7 +15,7 @@ - + @@ -24,27 +24,20 @@ - - - from - - - - 359 - + to - + 359 @@ -54,6 +47,13 @@ + + + + 255 + + + @@ -61,28 +61,14 @@ - - - - from - - - - - - 255 - - - - to - + 255 @@ -92,6 +78,13 @@ + + + + 255 + + + @@ -99,28 +92,14 @@ - - - - from - - - - - - 255 - - - - to - + 255 @@ -130,18 +109,14 @@ - - - - - + Classes - + 1 @@ -154,40 +129,8 @@ - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 150 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Preferred - - - - 20 - 20 - - - - @@ -208,50 +151,28 @@ - + - Qt::Horizontal + Qt::Vertical - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + 20 + 40 + - + + + + QgsPanelWidget + QWidget +
qgspanelwidget.h
+ 1 +
+
- - - buttonBox - accepted() - QgsLimitedRandomColorRampDialogBase - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - QgsLimitedRandomColorRampDialogBase - reject() - - - 316 - 260 - - - 286 - 274 - - - - +