Skip to content

Commit 90e80c1

Browse files
committed
Stronger definitions of properties in collections
Instead of defining the suitable field types and values for properties when registering them to a data defined button, now properties are fully defined when the valid property keys are defined.
1 parent 6c53ba2 commit 90e80c1

43 files changed

Lines changed: 1009 additions & 1099 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎python/core/qgsproperty.sip‎

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
class QgsPropertyDefinition
2+
{
3+
%TypeHeaderCode
4+
#include <qgsproperty.h>
5+
%End
6+
public:
7+
8+
enum StandardPropertyTemplate
9+
{
10+
Boolean,
11+
Integer,
12+
IntegerPositive,
13+
IntegerPositiveGreaterZero,
14+
Double,
15+
DoublePositive,
16+
Double0To1,
17+
String,
18+
Transparency,
19+
RenderUnits,
20+
ColorWithAlpha,
21+
ColorNoAlpha,
22+
PenJoinStyle,
23+
BlendMode,
24+
Point,
25+
Size,
26+
LineStyle,
27+
FillStyle,
28+
CapStyle,
29+
HorizontalAnchor,
30+
VerticalAnchor,
31+
SvgPath,
32+
Offset,
33+
Custom,
34+
};
35+
36+
enum DataType
37+
{
38+
DataTypeString,
39+
DataTypeNumeric,
40+
DataTypeBoolean,
41+
};
42+
43+
QgsPropertyDefinition();
44+
45+
QgsPropertyDefinition( const QString& name, const QString& description, StandardPropertyTemplate type );
46+
47+
QgsPropertyDefinition( const QString& name, DataType dataTypes, const QString& description, const QString& helpText );
48+
49+
QString name() const;
50+
51+
QString description() const;
52+
53+
QString helpText() const;
54+
55+
DataType dataType() const;
56+
57+
};
58+
159
/** \ingroup core
260
* \class QgsAbstractProperty
361
* \brief Abstract base class for properties.
@@ -209,7 +267,7 @@ class QgsStaticProperty : QgsAbstractProperty
209267

210268
/** Constructor for QgsStaticProperty.
211269
* @param value initial static value to use for property
212-
* @param isActive whether the property is intially active
270+
* @param isActive whether the property is initially active
213271
*/
214272
QgsStaticProperty( const QVariant& value = QVariant(), bool isActive = true );
215273

@@ -255,7 +313,7 @@ class QgsFieldBasedProperty : QgsAbstractProperty
255313

256314
/** Constructor for QgsFieldBasedProperty.
257315
* @param field field name
258-
* @param isActive whether the property is intially active
316+
* @param isActive whether the property is initially active
259317
*/
260318
QgsFieldBasedProperty( const QString& field = QString(), bool isActive = true );
261319

@@ -303,7 +361,7 @@ class QgsExpressionBasedProperty : QgsAbstractProperty
303361

304362
/** Constructor for QgsExpressionBasedProperty.
305363
* @param expression expression string
306-
* @param isActive whether the property is intially active
364+
* @param isActive whether the property is initially active
307365
*/
308366
QgsExpressionBasedProperty( const QString& expression = QString(), bool isActive = true );
309367

‎python/core/qgspropertycollection.sip‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
typedef QMap< int, QString > QgsPropertyDefinition;
1+
typedef QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition;
22

33
/**
44
* \ingroup core
@@ -198,7 +198,7 @@ class QgsAbstractPropertyCollection
198198
* to avoid writing the raw integer key values to XML, for readability and future-proofness.
199199
* @see readXML()
200200
*/
201-
virtual bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertyDefinition& propertyNameMap ) const = 0;
201+
virtual bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertiesDefinition& definitions ) const = 0;
202202

203203
/**
204204
* Reads property collection state from an XML element.
@@ -208,7 +208,7 @@ class QgsAbstractPropertyCollection
208208
* the propertyNameMap specified when writeXML() was called.
209209
* @see writeXML()
210210
*/
211-
virtual bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertyDefinition &propertyNameMap ) = 0;
211+
virtual bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertiesDefinition &definitions ) = 0;
212212

213213
};
214214

@@ -257,8 +257,8 @@ class QgsPropertyCollection : QgsAbstractPropertyCollection
257257
bool isActive( int key ) const;
258258
bool hasActiveProperties() const;
259259
bool hasActiveDynamicProperties() const;
260-
bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertyDefinition& propertyNameMap ) const;
261-
bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertyDefinition& propertyNameMap );
260+
bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertiesDefinition& definitions ) const;
261+
bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertiesDefinition& definitions );
262262

263263
/** Adds a property to the collection and takes ownership of it.
264264
* @param key integer key for property. Any existing property with the same key will be deleted
@@ -383,7 +383,7 @@ class QgsPropertyCollectionStack : QgsAbstractPropertyCollection
383383

384384
QSet<int> propertyKeys() const;
385385
bool hasProperty( int key ) const;
386-
bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertyDefinition& propertyNameMap ) const;
387-
bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertyDefinition &propertyNameMap );
386+
bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertiesDefinition& definitions ) const;
387+
bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertiesDefinition &definitions );
388388
};
389389

‎python/gui/symbology-ng/qgsrendererwidget.sip‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class QgsDataDefinedValueDialog : QDialog
125125
*
126126
* @note May be missing Python bindings depending on the platform.
127127
*/
128-
void init( const QString& description ); // needed in children ctor to call virtual
128+
void init( int propertyKey ); // needed in children ctor to call virtual
129129

130130
private:
131131
QgsAbstractProperty* symbolDataDefined() const /Factory/;

‎src/app/composer/qgscomposerhtmlwidget.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ QgsComposerHtmlWidget::QgsComposerHtmlWidget( QgsComposerHtml* html, QgsComposer
6666

6767
//connections for data defined buttons
6868
connect( mUrlDDBtn, &QgsDataDefinedButtonV2::activated, mUrlLineEdit, &QLineEdit::setDisabled );
69-
registerDataDefinedButton( mUrlDDBtn, QgsComposerObject::SourceUrl,
70-
QgsDataDefinedButtonV2::AnyType, tr( "url string" ) );
69+
registerDataDefinedButton( mUrlDDBtn, QgsComposerObject::SourceUrl );
7170
}
7271

7372
QgsComposerHtmlWidget::QgsComposerHtmlWidget()

‎src/app/composer/qgscomposeritemwidget.cpp‎

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ void QgsComposerConfigObject::updateDataDefinedProperty()
5353
}
5454
QgsComposerObject::DataDefinedProperty key = QgsComposerObject::NoProperty;
5555

56-
if ( ddButton->property( "propertyKey" ).isValid() )
57-
key = static_cast< QgsComposerObject::DataDefinedProperty >( ddButton->property( "propertyKey" ).toInt() );
56+
if ( ddButton->propertyKey() >= 0 )
57+
key = static_cast< QgsComposerObject::DataDefinedProperty >( ddButton->propertyKey() );
5858

5959
if ( key == QgsComposerObject::NoProperty )
6060
{
@@ -74,12 +74,10 @@ void QgsComposerConfigObject::updateDataDefinedButtons()
7474
}
7575
}
7676

77-
void QgsComposerConfigObject::initializeDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty key,
78-
QgsDataDefinedButtonV2::DataType type, const QString& description )
77+
void QgsComposerConfigObject::initializeDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty key )
7978
{
8079
button->blockSignals( true );
81-
button->init( atlasCoverageLayer(), mComposerObject->dataDefinedProperties().property( key ), type, description );
82-
button->setProperty( "propertyKey", key );
80+
button->init( key, mComposerObject->dataDefinedProperties(), QgsComposerObject::PROPERTY_DEFINITIONS, atlasCoverageLayer() );
8381
connect( button, &QgsDataDefinedButtonV2::changed, this, &QgsComposerConfigObject::updateDataDefinedProperty );
8482
button->registerExpressionContextGenerator( mComposerObject );
8583
button->blockSignals( false );
@@ -90,10 +88,10 @@ void QgsComposerConfigObject::updateDataDefinedButton( QgsDataDefinedButtonV2* b
9088
if ( !button )
9189
return;
9290

93-
if ( !button->property( "propertyKey" ).isValid() )
91+
if ( button->propertyKey() < 0 )
9492
return;
9593

96-
QgsComposerObject::DataDefinedProperty key = static_cast< QgsComposerObject::DataDefinedProperty >( button->property( "propertyKey" ).toInt() );
94+
QgsComposerObject::DataDefinedProperty key = static_cast< QgsComposerObject::DataDefinedProperty >( button->propertyKey() );
9795
whileBlocking( button )->setToProperty( mComposerObject->dataDefinedProperties().property( key ) );
9896
}
9997

@@ -539,26 +537,16 @@ void QgsComposerItemWidget::setValuesForGuiNonPositionElements()
539537

540538
void QgsComposerItemWidget::initializeDataDefinedButtons()
541539
{
542-
mConfigObject->initializeDataDefinedButton( mXPositionDDBtn, QgsComposerObject::PositionX,
543-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
544-
mConfigObject->initializeDataDefinedButton( mYPositionDDBtn, QgsComposerObject::PositionY,
545-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
546-
mConfigObject->initializeDataDefinedButton( mWidthDDBtn, QgsComposerObject::ItemWidth,
547-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
548-
mConfigObject->initializeDataDefinedButton( mHeightDDBtn, QgsComposerObject::ItemHeight,
549-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
550-
mConfigObject->initializeDataDefinedButton( mItemRotationDDBtn, QgsComposerObject::ItemRotation,
551-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::double180RotDesc() );
552-
mConfigObject->initializeDataDefinedButton( mTransparencyDDBtn, QgsComposerObject::Transparency,
553-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::intTranspDesc() );
554-
mConfigObject->initializeDataDefinedButton( mBlendModeDDBtn, QgsComposerObject::BlendMode,
555-
QgsDataDefinedButtonV2::String, QgsDataDefinedButtonV2::blendModesDesc() );
556-
mConfigObject->initializeDataDefinedButton( mExcludePrintsDDBtn, QgsComposerObject::ExcludeFromExports,
557-
QgsDataDefinedButtonV2::String, QgsDataDefinedButtonV2::boolDesc() );
558-
mConfigObject->initializeDataDefinedButton( mItemFrameColorDDBtn, QgsComposerObject::FrameColor,
559-
QgsDataDefinedButtonV2::String, QgsDataDefinedButtonV2::colorAlphaDesc() );
560-
mConfigObject->initializeDataDefinedButton( mItemBackgroundColorDDBtn, QgsComposerObject::BackgroundColor,
561-
QgsDataDefinedButtonV2::String, QgsDataDefinedButtonV2::colorAlphaDesc() );
540+
mConfigObject->initializeDataDefinedButton( mXPositionDDBtn, QgsComposerObject::PositionX );
541+
mConfigObject->initializeDataDefinedButton( mYPositionDDBtn, QgsComposerObject::PositionY );
542+
mConfigObject->initializeDataDefinedButton( mWidthDDBtn, QgsComposerObject::ItemWidth );
543+
mConfigObject->initializeDataDefinedButton( mHeightDDBtn, QgsComposerObject::ItemHeight );
544+
mConfigObject->initializeDataDefinedButton( mItemRotationDDBtn, QgsComposerObject::ItemRotation );
545+
mConfigObject->initializeDataDefinedButton( mTransparencyDDBtn, QgsComposerObject::Transparency );
546+
mConfigObject->initializeDataDefinedButton( mBlendModeDDBtn, QgsComposerObject::BlendMode );
547+
mConfigObject->initializeDataDefinedButton( mExcludePrintsDDBtn, QgsComposerObject::ExcludeFromExports );
548+
mConfigObject->initializeDataDefinedButton( mItemFrameColorDDBtn, QgsComposerObject::FrameColor );
549+
mConfigObject->initializeDataDefinedButton( mItemBackgroundColorDDBtn, QgsComposerObject::BackgroundColor );
562550
}
563551

564552
void QgsComposerItemWidget::populateDataDefinedButtons()
@@ -793,9 +781,9 @@ QgsComposerItemBaseWidget::QgsComposerItemBaseWidget( QWidget* parent, QgsCompos
793781

794782
}
795783

796-
void QgsComposerItemBaseWidget::registerDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty property, QgsDataDefinedButtonV2::DataType type, const QString& description )
784+
void QgsComposerItemBaseWidget::registerDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty property )
797785
{
798-
mConfigObject->initializeDataDefinedButton( button, property, type, description );
786+
mConfigObject->initializeDataDefinedButton( button, property );
799787
}
800788

801789
void QgsComposerItemBaseWidget::updateDataDefinedButton( QgsDataDefinedButtonV2* button )

‎src/app/composer/qgscomposeritemwidget.h‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,9 @@ class QgsComposerConfigObject: public QObject
5858

5959
/** Registers a data defined button, setting up its initial value, connections and description.
6060
* @param button button to register
61-
* @param property corresponding data defined property
62-
* @param type valid data types for button
63-
* @param description user visible description for data defined property
61+
* @param key corresponding data defined property key
6462
*/
65-
void initializeDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty key,
66-
QgsDataDefinedButtonV2::DataType type, const QString& description );
63+
void initializeDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty key );
6764

6865
/**
6966
* Updates a data defined button to reflect the item's current properties.
@@ -103,12 +100,9 @@ class QgsComposerItemBaseWidget: public QgsPanelWidget
103100

104101
/** Registers a data defined button, setting up its initial value, connections and description.
105102
* @param button button to register
106-
* @param property corresponding data defined property
107-
* @param type valid data types for button
108-
* @param description user visible description for data defined property
103+
* @param property corresponding data defined property key
109104
*/
110-
void registerDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty property,
111-
QgsDataDefinedButtonV2::DataType type, const QString& description );
105+
void registerDataDefinedButton( QgsDataDefinedButtonV2* button, QgsComposerObject::DataDefinedProperty property );
112106

113107
/**
114108
* Updates a previously registered data defined button to reflect the item's current properties.

‎src/app/composer/qgscomposerlegendwidget.cpp‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,8 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend* legend )
100100
connect( &legend->composition()->atlasComposition(), SIGNAL( coverageLayerChanged( QgsVectorLayer* ) ), this, SLOT( updateFilterLegendByAtlasButton() ) );
101101
}
102102

103-
registerDataDefinedButton( mLegendTitleDDBtn, QgsComposerObject::LegendTitle,
104-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::anyStringDesc() );
105-
registerDataDefinedButton( mColumnsDDBtn, QgsComposerObject::LegendColumnCount,
106-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::intPosOneDesc() );
103+
registerDataDefinedButton( mLegendTitleDDBtn, QgsComposerObject::LegendTitle );
104+
registerDataDefinedButton( mColumnsDDBtn, QgsComposerObject::LegendColumnCount );
107105

108106
setGuiElements();
109107

‎src/app/composer/qgscomposermapwidget.cpp‎

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,15 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap )
105105

106106
connect( mCrsSelector, &QgsProjectionSelectionWidget::crsChanged, this, &QgsComposerMapWidget::mapCrsChanged );
107107

108-
registerDataDefinedButton( mScaleDDBtn, QgsComposerObject::MapScale,
109-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
110-
registerDataDefinedButton( mMapRotationDDBtn, QgsComposerObject::MapRotation,
111-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
112-
registerDataDefinedButton( mXMinDDBtn, QgsComposerObject::MapXMin,
113-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
114-
registerDataDefinedButton( mYMinDDBtn, QgsComposerObject::MapYMin,
115-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
116-
registerDataDefinedButton( mXMaxDDBtn, QgsComposerObject::MapXMax,
117-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
118-
registerDataDefinedButton( mYMaxDDBtn, QgsComposerObject::MapYMax,
119-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
120-
registerDataDefinedButton( mAtlasMarginDDBtn, QgsComposerObject::MapAtlasMargin,
121-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doubleDesc() );
122-
registerDataDefinedButton( mStylePresetsDDBtn, QgsComposerObject::MapStylePreset,
123-
QgsDataDefinedButtonV2::String, tr( "string matching a style preset name" ) );
124-
registerDataDefinedButton( mLayersDDBtn, QgsComposerObject::MapLayers,
125-
QgsDataDefinedButtonV2::String, tr( "list of map layer names separated by | characters" ) );
108+
registerDataDefinedButton( mScaleDDBtn, QgsComposerObject::MapScale );
109+
registerDataDefinedButton( mMapRotationDDBtn, QgsComposerObject::MapRotation );
110+
registerDataDefinedButton( mXMinDDBtn, QgsComposerObject::MapXMin );
111+
registerDataDefinedButton( mYMinDDBtn, QgsComposerObject::MapYMin );
112+
registerDataDefinedButton( mXMaxDDBtn, QgsComposerObject::MapXMax );
113+
registerDataDefinedButton( mYMaxDDBtn, QgsComposerObject::MapYMax );
114+
registerDataDefinedButton( mAtlasMarginDDBtn, QgsComposerObject::MapAtlasMargin );
115+
registerDataDefinedButton( mStylePresetsDDBtn, QgsComposerObject::MapStylePreset );
116+
registerDataDefinedButton( mLayersDDBtn, QgsComposerObject::MapLayers );
126117

127118
updateGuiElements();
128119
loadGridEntries();

‎src/app/composer/qgscomposerpicturewidget.cpp‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,10 @@ QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture
7878

7979
//connections for data defined buttons
8080
connect( mSourceDDBtn, &QgsDataDefinedButtonV2::activated, mPictureLineEdit, &QLineEdit::setDisabled );
81-
registerDataDefinedButton( mSourceDDBtn, QgsComposerObject::PictureSource,
82-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::anyStringDesc() );
83-
registerDataDefinedButton( mFillColorDDBtn, QgsComposerObject::PictureSvgBackgroundColor,
84-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::colorAlphaDesc() );
85-
registerDataDefinedButton( mOutlineColorDDBtn, QgsComposerObject::PictureSvgOutlineColor,
86-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::colorAlphaDesc() );
87-
registerDataDefinedButton( mOutlineWidthDDBtn, QgsComposerObject::PictureSvgOutlineWidth,
88-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doublePosDesc() );
81+
registerDataDefinedButton( mSourceDDBtn, QgsComposerObject::PictureSource );
82+
registerDataDefinedButton( mFillColorDDBtn, QgsComposerObject::PictureSvgBackgroundColor );
83+
registerDataDefinedButton( mOutlineColorDDBtn, QgsComposerObject::PictureSvgOutlineColor );
84+
registerDataDefinedButton( mOutlineWidthDDBtn, QgsComposerObject::PictureSvgOutlineWidth );
8985
}
9086

9187
QgsComposerPictureWidget::~QgsComposerPictureWidget()

‎src/app/composer/qgscomposerscalebarwidget.cpp‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,10 @@ QgsComposerScaleBarWidget::QgsComposerScaleBarWidget( QgsComposerScaleBar* scale
9191

9292
connect( mMapItemComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( composerMapChanged( QgsComposerItem* ) ) );
9393

94-
registerDataDefinedButton( mFillColorDDBtn, QgsComposerObject::ScalebarFillColor,
95-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::colorAlphaDesc() );
96-
registerDataDefinedButton( mFillColor2DDBtn, QgsComposerObject::ScalebarFillColor2,
97-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::colorAlphaDesc() );
98-
registerDataDefinedButton( mLineColorDDBtn, QgsComposerObject::ScalebarLineColor,
99-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::colorAlphaDesc() );
100-
registerDataDefinedButton( mLineWidthDDBtn, QgsComposerObject::ScalebarLineWidth,
101-
QgsDataDefinedButtonV2::AnyType, QgsDataDefinedButtonV2::doublePosDesc() );
94+
registerDataDefinedButton( mFillColorDDBtn, QgsComposerObject::ScalebarFillColor );
95+
registerDataDefinedButton( mFillColor2DDBtn, QgsComposerObject::ScalebarFillColor2 );
96+
registerDataDefinedButton( mLineColorDDBtn, QgsComposerObject::ScalebarLineColor );
97+
registerDataDefinedButton( mLineWidthDDBtn, QgsComposerObject::ScalebarLineWidth );
10298

10399
blockMemberSignals( false );
104100
setGuiElements(); //set the GUI elements to the state of scaleBar

0 commit comments

Comments
 (0)