mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-27 00:07:16 -05:00
color ramp button widget for gradiant fill and categorized renderer
This commit is contained in:
parent
fa16e3e403
commit
deb18c40db
@ -48,7 +48,7 @@ class QgsColorRamp
|
||||
*/
|
||||
virtual QString type() const = 0;
|
||||
|
||||
virtual void invert() = 0;
|
||||
virtual void invert();
|
||||
|
||||
/** Creates a clone of the color ramp.
|
||||
*/
|
||||
@ -226,8 +226,6 @@ class QgsLimitedRandomColorRamp : QgsColorRamp
|
||||
|
||||
virtual QString type() const;
|
||||
|
||||
virtual void invert();
|
||||
|
||||
virtual QgsLimitedRandomColorRamp* clone() const /Factory/;
|
||||
|
||||
virtual QgsStringMap properties() const;
|
||||
@ -287,8 +285,6 @@ class QgsRandomColorRamp : QgsColorRamp
|
||||
|
||||
QString type() const;
|
||||
|
||||
virtual void invert();
|
||||
|
||||
virtual QgsRandomColorRamp* clone() const /Factory/;
|
||||
|
||||
QgsStringMap properties() const;
|
||||
|
||||
@ -157,16 +157,11 @@ class QgsCategorizedSymbolRenderer : QgsFeatureRenderer
|
||||
*/
|
||||
void setSourceColorRamp( QgsColorRamp* ramp /Transfer/ );
|
||||
|
||||
//! @note added in 2.1
|
||||
bool invertedColorRamp();
|
||||
void setInvertedColorRamp( bool inverted );
|
||||
|
||||
/** Update the color ramp used and all symbols colors.
|
||||
* @param ramp color ramp. Ownership is transferred to the renderer
|
||||
* @param inverted set to true to invert ramp colors
|
||||
* @note added in 2.5
|
||||
*/
|
||||
void updateColorRamp( QgsColorRamp* ramp /Transfer/, bool inverted = false );
|
||||
void updateColorRamp( QgsColorRamp* ramp /Transfer/ );
|
||||
|
||||
//! items of symbology items in legend should be checkable
|
||||
//! @note added in 2.5
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
%Include qgscharacterselectdialog.sip
|
||||
%Include qgscolorbrewercolorrampdialog.sip
|
||||
%Include qgscolorbutton.sip
|
||||
%Include qgscolorbutton.sip
|
||||
%Include qgscolorrampbutton.sip
|
||||
%Include qgscolordialog.sip
|
||||
%Include qgscolorschemelist.sip
|
||||
%Include qgscolorswatchgrid.sip
|
||||
|
||||
@ -72,8 +72,6 @@ class QgsCategorizedSymbolRendererWidget : QgsRendererWidget
|
||||
|
||||
void changeCategorySymbol();
|
||||
|
||||
QgsColorRamp* getColorRamp();
|
||||
|
||||
QList<QgsSymbol*> selectedSymbols();
|
||||
QgsCategoryList selectedCategoryList();
|
||||
void refreshSymbolView();
|
||||
|
||||
@ -51,7 +51,9 @@ class CORE_EXPORT QgsColorRamp
|
||||
virtual QString type() const = 0;
|
||||
|
||||
|
||||
virtual void invert() = 0;
|
||||
/** Inverts the ordering of the color ramp.
|
||||
*/
|
||||
virtual void invert() {}
|
||||
|
||||
/** Creates a clone of the color ramp.
|
||||
*/
|
||||
@ -259,7 +261,6 @@ class CORE_EXPORT QgsLimitedRandomColorRamp : public QgsColorRamp
|
||||
virtual double value( int index ) const override;
|
||||
virtual QColor color( double value ) const override;
|
||||
virtual QString type() const override { return QStringLiteral( "random" ); }
|
||||
virtual void invert() override { return; }
|
||||
virtual QgsLimitedRandomColorRamp* clone() const override;
|
||||
virtual QgsStringMap properties() const override;
|
||||
int count() const override { return mCount; }
|
||||
@ -375,8 +376,6 @@ class CORE_EXPORT QgsRandomColorRamp: public QgsColorRamp
|
||||
|
||||
QString type() const override;
|
||||
|
||||
virtual void invert() override { return; }
|
||||
|
||||
QgsRandomColorRamp* clone() const override;
|
||||
|
||||
QgsStringMap properties() const override;
|
||||
|
||||
@ -152,7 +152,6 @@ void QgsRendererCategory::toSld( QDomDocument &doc, QDomElement &element, QgsStr
|
||||
QgsCategorizedSymbolRenderer::QgsCategorizedSymbolRenderer( const QString& attrName, const QgsCategoryList& categories )
|
||||
: QgsFeatureRenderer( QStringLiteral( "categorizedSymbol" ) )
|
||||
, mAttrName( attrName )
|
||||
, mInvertedColorRamp( false )
|
||||
, mAttrNum( -1 )
|
||||
, mCounting( false )
|
||||
{
|
||||
@ -472,7 +471,6 @@ QgsCategorizedSymbolRenderer* QgsCategorizedSymbolRenderer::clone() const
|
||||
if ( mSourceColorRamp.data() )
|
||||
{
|
||||
r->setSourceColorRamp( mSourceColorRamp->clone() );
|
||||
r->setInvertedColorRamp( mInvertedColorRamp );
|
||||
}
|
||||
r->setUsingSymbolLevels( usingSymbolLevels() );
|
||||
|
||||
@ -631,9 +629,6 @@ QgsFeatureRenderer* QgsCategorizedSymbolRenderer::create( QDomElement& element )
|
||||
if ( !sourceColorRampElem.isNull() && sourceColorRampElem.attribute( QStringLiteral( "name" ) ) == QLatin1String( "[source]" ) )
|
||||
{
|
||||
r->setSourceColorRamp( QgsSymbolLayerUtils::loadColorRamp( sourceColorRampElem ) );
|
||||
QDomElement invertedColorRampElem = element.firstChildElement( QStringLiteral( "invertedcolorramp" ) );
|
||||
if ( !invertedColorRampElem.isNull() )
|
||||
r->setInvertedColorRamp( invertedColorRampElem.attribute( QStringLiteral( "value" ) ) == QLatin1String( "1" ) );
|
||||
}
|
||||
|
||||
QDomElement rotationElem = element.firstChildElement( QStringLiteral( "rotation" ) );
|
||||
@ -721,9 +716,6 @@ QDomElement QgsCategorizedSymbolRenderer::save( QDomDocument& doc )
|
||||
{
|
||||
QDomElement colorRampElem = QgsSymbolLayerUtils::saveColorRamp( QStringLiteral( "[source]" ), mSourceColorRamp.data(), doc );
|
||||
rendererElem.appendChild( colorRampElem );
|
||||
QDomElement invertedElem = doc.createElement( QStringLiteral( "invertedcolorramp" ) );
|
||||
invertedElem.setAttribute( QStringLiteral( "value" ), mInvertedColorRamp );
|
||||
rendererElem.appendChild( invertedElem );
|
||||
}
|
||||
|
||||
QDomElement rotationElem = doc.createElement( QStringLiteral( "rotation" ) );
|
||||
@ -864,10 +856,9 @@ void QgsCategorizedSymbolRenderer::setSourceColorRamp( QgsColorRamp* ramp )
|
||||
mSourceColorRamp.reset( ramp );
|
||||
}
|
||||
|
||||
void QgsCategorizedSymbolRenderer::updateColorRamp( QgsColorRamp* ramp, bool inverted )
|
||||
void QgsCategorizedSymbolRenderer::updateColorRamp( QgsColorRamp* ramp )
|
||||
{
|
||||
setSourceColorRamp( ramp );
|
||||
setInvertedColorRamp( inverted );
|
||||
double num = mCategories.count() - 1;
|
||||
double count = 0;
|
||||
|
||||
@ -882,7 +873,6 @@ void QgsCategorizedSymbolRenderer::updateColorRamp( QgsColorRamp* ramp, bool inv
|
||||
Q_FOREACH ( const QgsRendererCategory &cat, mCategories )
|
||||
{
|
||||
double value = count / num;
|
||||
if ( mInvertedColorRamp ) value = 1.0 - value;
|
||||
cat.symbol()->setColor( mSourceColorRamp->color( value ) );
|
||||
count += 1;
|
||||
}
|
||||
|
||||
@ -167,16 +167,11 @@ class CORE_EXPORT QgsCategorizedSymbolRenderer : public QgsFeatureRenderer
|
||||
*/
|
||||
void setSourceColorRamp( QgsColorRamp* ramp );
|
||||
|
||||
//! @note added in 2.1
|
||||
bool invertedColorRamp() { return mInvertedColorRamp; }
|
||||
void setInvertedColorRamp( bool inverted ) { mInvertedColorRamp = inverted; }
|
||||
|
||||
/** Update the color ramp used and all symbols colors.
|
||||
* @param ramp color ramp. Ownership is transferred to the renderer
|
||||
* @param inverted set to true to invert ramp colors
|
||||
* @note added in 2.5
|
||||
*/
|
||||
void updateColorRamp( QgsColorRamp* ramp, bool inverted = false );
|
||||
void updateColorRamp( QgsColorRamp* ramp );
|
||||
|
||||
virtual bool legendSymbolItemsCheckable() const override;
|
||||
virtual bool legendSymbolItemChecked( const QString& key ) override;
|
||||
@ -194,7 +189,6 @@ class CORE_EXPORT QgsCategorizedSymbolRenderer : public QgsFeatureRenderer
|
||||
QgsCategoryList mCategories;
|
||||
QScopedPointer<QgsSymbol> mSourceSymbol;
|
||||
QScopedPointer<QgsColorRamp> mSourceColorRamp;
|
||||
bool mInvertedColorRamp;
|
||||
QScopedPointer<QgsExpression> mExpression;
|
||||
|
||||
//! attribute index (derived from attribute name in startRender)
|
||||
|
||||
@ -188,6 +188,7 @@ SET(QGIS_GUI_SRCS
|
||||
qgscollapsiblegroupbox.cpp
|
||||
qgscolorbrewercolorrampdialog.cpp
|
||||
qgscolorbutton.cpp
|
||||
qgscolorrampbutton.cpp
|
||||
qgscolordialog.cpp
|
||||
qgscolorschemelist.cpp
|
||||
qgscolorswatchgrid.cpp
|
||||
@ -356,6 +357,7 @@ SET(QGIS_GUI_MOC_HDRS
|
||||
qgscollapsiblegroupbox.h
|
||||
qgscolorbrewercolorrampdialog.h
|
||||
qgscolorbutton.h
|
||||
qgscolorrampbutton.h
|
||||
qgscolordialog.h
|
||||
qgscolorschemelist.h
|
||||
qgscolorswatchgrid.h
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#include "qgssymbol.h"
|
||||
#include "qgssymbollayerutils.h"
|
||||
#include "qgscolorramp.h"
|
||||
#include "qgscolorrampbutton.h"
|
||||
#include "qgsstyle.h"
|
||||
#include "qgslogger.h"
|
||||
|
||||
@ -410,21 +411,15 @@ QgsCategorizedSymbolRendererWidget::QgsCategorizedSymbolRendererWidget( QgsVecto
|
||||
|
||||
mExpressionWidget->setLayer( mLayer );
|
||||
|
||||
cboCategorizedColorRamp->populate( mStyle );
|
||||
int randomIndex = cboCategorizedColorRamp->findText( tr( "Random colors" ) );
|
||||
if ( randomIndex != -1 )
|
||||
{
|
||||
cboCategorizedColorRamp->setCurrentIndex( randomIndex );
|
||||
mButtonEditRamp->setEnabled( false );
|
||||
}
|
||||
// initiate color ramp button to random
|
||||
btnColorRamp->setShowRandomColorRamp( true );
|
||||
btnColorRamp->setRandomColorRamp();
|
||||
|
||||
// set project default color ramp
|
||||
QString defaultColorRamp = QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/ColorRamp" ), QLatin1String( "" ) );
|
||||
if ( defaultColorRamp != QLatin1String( "" ) )
|
||||
{
|
||||
int index = cboCategorizedColorRamp->findText( defaultColorRamp, Qt::MatchCaseSensitive );
|
||||
if ( index >= 0 )
|
||||
cboCategorizedColorRamp->setCurrentIndex( index );
|
||||
btnColorRamp->setColorRampFromName( defaultColorRamp );
|
||||
}
|
||||
|
||||
mCategorizedSymbol = QgsSymbol::defaultSymbol( mLayer->geometryType() );
|
||||
@ -455,10 +450,8 @@ QgsCategorizedSymbolRendererWidget::QgsCategorizedSymbolRendererWidget( QgsVecto
|
||||
connect( btnDeleteCategories, SIGNAL( clicked() ), this, SLOT( deleteCategories() ) );
|
||||
connect( btnDeleteAllCategories, SIGNAL( clicked() ), this, SLOT( deleteAllCategories() ) );
|
||||
connect( btnAddCategory, SIGNAL( clicked() ), this, SLOT( addCategory() ) );
|
||||
connect( cbxInvertedColorRamp, SIGNAL( toggled( bool ) ), this, SLOT( applyColorRamp() ) );
|
||||
connect( cboCategorizedColorRamp, SIGNAL( currentIndexChanged( int ) ), this, SLOT( applyColorRamp() ) );
|
||||
connect( cboCategorizedColorRamp, SIGNAL( sourceRampEdited() ), this, SLOT( applyColorRamp() ) );
|
||||
connect( mButtonEditRamp, SIGNAL( clicked() ), cboCategorizedColorRamp, SLOT( editSourceRamp() ) );
|
||||
|
||||
connect( btnColorRamp, &QgsColorRampButton::colorRampChanged, this, &QgsCategorizedSymbolRendererWidget::applyColorRamp );
|
||||
|
||||
// menus for data-defined rotation/size
|
||||
QMenu* advMenu = new QMenu;
|
||||
@ -501,17 +494,11 @@ void QgsCategorizedSymbolRendererWidget::updateUiFromRenderer()
|
||||
updateCategorizedSymbolIcon();
|
||||
}
|
||||
|
||||
// set source color ramp
|
||||
// if a color ramp attached to the renderer, enable the color ramp button
|
||||
if ( mRenderer->sourceColorRamp() )
|
||||
{
|
||||
cboCategorizedColorRamp->setSourceColorRamp( mRenderer->sourceColorRamp() );
|
||||
cbxInvertedColorRamp->setChecked( mRenderer->invertedColorRamp() );
|
||||
btnColorRamp->setColorRamp( mRenderer->sourceColorRamp() );
|
||||
}
|
||||
|
||||
if ( cboCategorizedColorRamp->currentText() == tr( "Random colors" ) )
|
||||
mButtonEditRamp->setEnabled( false );
|
||||
else
|
||||
mButtonEditRamp->setEnabled( true );
|
||||
}
|
||||
|
||||
QgsFeatureRenderer* QgsCategorizedSymbolRendererWidget::renderer()
|
||||
@ -628,20 +615,6 @@ static void _createCategories( QgsCategoryList& cats, QList<QVariant>& values, Q
|
||||
}
|
||||
}
|
||||
|
||||
QgsColorRamp* QgsCategorizedSymbolRendererWidget::getColorRamp()
|
||||
{
|
||||
QgsColorRamp* ramp = cboCategorizedColorRamp->currentColorRamp();
|
||||
if ( !ramp )
|
||||
{
|
||||
if ( cboCategorizedColorRamp->count() == 0 )
|
||||
QMessageBox::critical( this, tr( "Error" ), tr( "There are no available color ramps. You can add them in Style Manager." ) );
|
||||
else if ( !cboCategorizedColorRamp->createNewColorRampSelected() )
|
||||
QMessageBox::critical( this, tr( "Error" ), tr( "The selected color ramp is not available." ) );
|
||||
}
|
||||
return ramp;
|
||||
}
|
||||
|
||||
|
||||
void QgsCategorizedSymbolRendererWidget::addCategories()
|
||||
{
|
||||
QString attrName = mExpressionWidget->currentField();
|
||||
@ -759,8 +732,7 @@ void QgsCategorizedSymbolRendererWidget::addCategories()
|
||||
// recreate renderer
|
||||
QgsCategorizedSymbolRenderer *r = new QgsCategorizedSymbolRenderer( attrName, cats );
|
||||
r->setSourceSymbol( mCategorizedSymbol->clone() );
|
||||
r->setInvertedColorRamp( cbxInvertedColorRamp->isChecked() );
|
||||
QScopedPointer< QgsColorRamp > ramp( getColorRamp() );
|
||||
QScopedPointer< QgsColorRamp > ramp( btnColorRamp->colorRamp() );
|
||||
if ( ramp )
|
||||
r->setSourceColorRamp( ramp->clone() );
|
||||
|
||||
@ -777,15 +749,9 @@ void QgsCategorizedSymbolRendererWidget::addCategories()
|
||||
|
||||
void QgsCategorizedSymbolRendererWidget::applyColorRamp()
|
||||
{
|
||||
if ( cboCategorizedColorRamp->currentText() == tr( "Random colors" ) )
|
||||
mButtonEditRamp->setEnabled( false );
|
||||
else
|
||||
mButtonEditRamp->setEnabled( true );
|
||||
|
||||
QgsColorRamp* ramp = getColorRamp();
|
||||
if ( ramp )
|
||||
if ( !btnColorRamp->isNull() )
|
||||
{
|
||||
mRenderer->updateColorRamp( ramp, cbxInvertedColorRamp->isChecked() );
|
||||
mRenderer->updateColorRamp( btnColorRamp->colorRamp()->clone() );
|
||||
}
|
||||
mModel->updateSymbology();
|
||||
}
|
||||
|
||||
@ -107,7 +107,11 @@ class GUI_EXPORT QgsCategorizedSymbolRendererWidget : public QgsRendererWidget,
|
||||
void categoriesDoubleClicked( const QModelIndex & idx );
|
||||
void addCategory();
|
||||
void addCategories();
|
||||
|
||||
/** Applies the color ramp passed on by the color ramp button
|
||||
*/
|
||||
void applyColorRamp();
|
||||
|
||||
void deleteCategories();
|
||||
void deleteAllCategories();
|
||||
|
||||
@ -156,8 +160,6 @@ class GUI_EXPORT QgsCategorizedSymbolRendererWidget : public QgsRendererWidget,
|
||||
|
||||
void changeCategorySymbol();
|
||||
|
||||
QgsColorRamp* getColorRamp();
|
||||
|
||||
QList<QgsSymbol*> selectedSymbols() override;
|
||||
QgsCategoryList selectedCategoryList();
|
||||
void refreshSymbolView() override;
|
||||
|
||||
@ -1012,8 +1012,7 @@ QgsGradientFillSymbolLayerWidget::QgsGradientFillSymbolLayerWidget( const QgsVec
|
||||
setupUi( this );
|
||||
mOffsetUnitWidget->setUnits( QgsUnitTypes::RenderUnitList() << QgsUnitTypes::RenderMillimeters << QgsUnitTypes::RenderMapUnits << QgsUnitTypes::RenderPixels );
|
||||
|
||||
cboGradientColorRamp->setShowGradientOnly( true );
|
||||
cboGradientColorRamp->populate( QgsStyle::defaultStyle() );
|
||||
btnColorRamp->setShowGradientOnly( true );
|
||||
|
||||
btnChangeColor->setAllowAlpha( true );
|
||||
btnChangeColor->setColorDialogTitle( tr( "Select gradient color" ) );
|
||||
@ -1031,9 +1030,7 @@ QgsGradientFillSymbolLayerWidget::QgsGradientFillSymbolLayerWidget( const QgsVec
|
||||
|
||||
connect( btnChangeColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor( const QColor& ) ) );
|
||||
connect( btnChangeColor2, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor2( const QColor& ) ) );
|
||||
connect( cboGradientColorRamp, SIGNAL( currentIndexChanged( int ) ), this, SLOT( applyColorRamp() ) );
|
||||
connect( cboGradientColorRamp, SIGNAL( sourceRampEdited() ), this, SLOT( applyColorRamp() ) );
|
||||
connect( mButtonEditRamp, SIGNAL( clicked() ), cboGradientColorRamp, SLOT( editSourceRamp() ) );
|
||||
connect( btnColorRamp, &QgsColorRampButton::colorRampChanged, this, &QgsGradientFillSymbolLayerWidget::applyColorRamp );
|
||||
connect( cboGradientType, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setGradientType( int ) ) );
|
||||
connect( cboCoordinateMode, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setCoordinateMode( int ) ) );
|
||||
connect( cboGradientSpread, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setGradientSpread( int ) ) );
|
||||
@ -1067,7 +1064,7 @@ void QgsGradientFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayer* layer )
|
||||
if ( mLayer->gradientColorType() == QgsGradientFillSymbolLayer::SimpleTwoColor )
|
||||
{
|
||||
radioTwoColor->setChecked( true );
|
||||
cboGradientColorRamp->setEnabled( false );
|
||||
btnColorRamp->setEnabled( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1079,9 +1076,9 @@ void QgsGradientFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayer* layer )
|
||||
// set source color ramp
|
||||
if ( mLayer->colorRamp() )
|
||||
{
|
||||
cboGradientColorRamp->blockSignals( true );
|
||||
cboGradientColorRamp->setSourceColorRamp( mLayer->colorRamp() );
|
||||
cboGradientColorRamp->blockSignals( false );
|
||||
btnColorRamp->blockSignals( true );
|
||||
btnColorRamp->setColorRamp( mLayer->colorRamp() );
|
||||
btnColorRamp->blockSignals( false );
|
||||
}
|
||||
|
||||
cboGradientType->blockSignals( true );
|
||||
@ -1219,11 +1216,10 @@ void QgsGradientFillSymbolLayerWidget::colorModeChanged()
|
||||
|
||||
void QgsGradientFillSymbolLayerWidget::applyColorRamp()
|
||||
{
|
||||
QgsColorRamp* ramp = cboGradientColorRamp->currentColorRamp();
|
||||
if ( !ramp )
|
||||
if ( btnColorRamp->isNull() )
|
||||
return;
|
||||
|
||||
mLayer->setColorRamp( ramp );
|
||||
mLayer->setColorRamp( btnColorRamp->colorRamp()->clone() );
|
||||
emit changed();
|
||||
}
|
||||
|
||||
|
||||
@ -314,7 +314,11 @@ class GUI_EXPORT QgsGradientFillSymbolLayerWidget : public QgsSymbolLayerWidget,
|
||||
public slots:
|
||||
void setColor( const QColor& color );
|
||||
void setColor2( const QColor& color );
|
||||
|
||||
/** Applies the color ramp passed on by the color ramp button
|
||||
*/
|
||||
void applyColorRamp();
|
||||
|
||||
void setGradientType( int index );
|
||||
void setCoordinateMode( int index );
|
||||
void setGradientSpread( int index );
|
||||
|
||||
@ -76,32 +76,24 @@
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QgsColorRampComboBox" name="cboCategorizedColorRamp">
|
||||
<widget class="QgsColorRampButton" name="btnColorRamp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mButtonEditRamp">
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbxInvertedColorRamp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Invert</string>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -223,9 +215,10 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsColorRampComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>qgscolorrampcombobox.h</header>
|
||||
<class>QgsColorRampButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgscolorrampbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
|
||||
@ -331,9 +331,10 @@ suffix</string>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QgsColorRampComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>qgscolorrampcombobox.h</header>
|
||||
<class>QgsColorRampButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgscolorrampbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
|
||||
@ -152,18 +152,24 @@
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QgsColorRampComboBox" name="cboGradientColorRamp"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mButtonEditRamp">
|
||||
<property name="maximumSize">
|
||||
<widget class="QgsColorRampButton" name="btnColorRamp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -544,6 +550,12 @@
|
||||
<header>qgscolorbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsColorRampButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgscolorrampbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsDataDefinedButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
@ -560,18 +572,13 @@
|
||||
<header>qgsunitselectionwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsColorRampComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>qgscolorrampcombobox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>radioTwoColor</tabstop>
|
||||
<tabstop>btnChangeColor</tabstop>
|
||||
<tabstop>btnChangeColor2</tabstop>
|
||||
<tabstop>radioColorRamp</tabstop>
|
||||
<tabstop>cboGradientColorRamp</tabstop>
|
||||
<tabstop>btnColorRamp</tabstop>
|
||||
<tabstop>mButtonEditRamp</tabstop>
|
||||
<tabstop>cboGradientType</tabstop>
|
||||
<tabstop>cboCoordinateMode</tabstop>
|
||||
@ -623,7 +630,7 @@
|
||||
<connection>
|
||||
<sender>radioColorRamp</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>cboGradientColorRamp</receiver>
|
||||
<receiver>btnColorRamp</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user