Skip to content

Commit

Permalink
Flip Transparency property type to Opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 29, 2017
1 parent 07b45cd commit b7352bb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsproperty.sip
Expand Up @@ -37,7 +37,7 @@ class QgsPropertyDefinition
Double0To1,
Rotation,
String,
Transparency,
Opacity,
RenderUnits,
ColorWithAlpha,
ColorNoAlpha,
Expand Down
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposerobject.cpp
Expand Up @@ -50,8 +50,8 @@ void QgsComposerObject::initPropertyDefinitions()
{ QgsComposerObject::ItemWidth, QgsPropertyDefinition( "dataDefinedWidth", QObject::tr( "Width" ), QgsPropertyDefinition::DoublePositive ) },
{ QgsComposerObject::ItemHeight, QgsPropertyDefinition( "dataDefinedHeight", QObject::tr( "Height" ), QgsPropertyDefinition::DoublePositive ) },
{ QgsComposerObject::ItemRotation, QgsPropertyDefinition( "dataDefinedRotation", QObject::tr( "Rotation angle" ), QgsPropertyDefinition::Rotation ) },
{ QgsComposerObject::Transparency, QgsPropertyDefinition( "dataDefinedTransparency", QObject::tr( "Transparency" ), QgsPropertyDefinition::Transparency ) },
{ QgsComposerObject::Opacity, QgsPropertyDefinition( "dataDefinedOpacity", QObject::tr( "Opacity" ), QgsPropertyDefinition::Transparency ) },
{ QgsComposerObject::Transparency, QgsPropertyDefinition( "dataDefinedTransparency", QObject::tr( "Transparency" ), QgsPropertyDefinition::Opacity ) },
{ QgsComposerObject::Opacity, QgsPropertyDefinition( "dataDefinedOpacity", QObject::tr( "Opacity" ), QgsPropertyDefinition::Opacity ) },
{ QgsComposerObject::BlendMode, QgsPropertyDefinition( "dataDefinedBlendMode", QObject::tr( "Blend mode" ), QgsPropertyDefinition::BlendMode ) },
{ QgsComposerObject::ExcludeFromExports, QgsPropertyDefinition( "dataDefinedExcludeExports", QObject::tr( "Exclude item from exports" ), QgsPropertyDefinition::Boolean ) },
{ QgsComposerObject::FrameColor, QgsPropertyDefinition( "dataDefinedFrameColor", QObject::tr( "Frame color" ), QgsPropertyDefinition::ColorWithAlpha ) },
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsproperty.cpp
Expand Up @@ -79,7 +79,7 @@ QgsPropertyDefinition::QgsPropertyDefinition( const QString &name, const QString
mHelpText = QObject::tr( "string of variable length" );
break;

case Transparency:
case Opacity:
mTypes = DataTypeNumeric;
mHelpText = QObject::tr( "int [0-100]" );
break;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsproperty.h
Expand Up @@ -59,7 +59,7 @@ class CORE_EXPORT QgsPropertyDefinition
Double0To1, //!< Double value between 0-1 (inclusive)
Rotation, //!< Rotation (value between 0-360 degrees)
String, //!< Any string value
Transparency, //!< Transparency (0-100)
Opacity, //!< Opacity (0-100)
RenderUnits, //!< Render units (eg mm/pixels/map units)
ColorWithAlpha, //!< Color with alpha channel
ColorNoAlpha, //!< Color with no alpha channel
Expand Down

0 comments on commit b7352bb

Please sign in to comment.