Skip to content

Commit

Permalink
Follow up 2041fc2
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 14, 2014
1 parent 2041fc2 commit 6f3cea1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 334 deletions.
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposermap.sip
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class QgsComposerMap : QgsComposerItem
* or the current evaluated rotation (which may be affected by data driven rotation
* settings).
*/
// double mapRotation( QgsComposerBaseItem::PropertyValueType valueType = QgsComposerBaseItem::EvaluatedValue ) const;
double mapRotation( QgsComposerObject::PropertyValueType valueType = QgsComposerObject::EvaluatedValue ) const;

void updateItem();

Expand Down
12 changes: 6 additions & 6 deletions src/app/composer/qgscomposeritemwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

//QgsComposerItemBaseWidget

QgsComposerItemBaseWidget::QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject *baseItem ): QWidget( parent ), mBaseItem( baseItem )
QgsComposerItemBaseWidget::QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject *composerObject ): QWidget( parent ), mComposerObject( composerObject )
{

}
Expand All @@ -54,18 +54,18 @@ void QgsComposerItemBaseWidget::updateDataDefinedProperty()

//set the data defined property and refresh the item
setDataDefinedProperty( ddButton, property );
mBaseItem->refreshDataDefinedProperty( property );
mComposerObject->refreshDataDefinedProperty( property );
}

void QgsComposerItemBaseWidget::setDataDefinedProperty( const QgsDataDefinedButton *ddBtn, QgsComposerObject::DataDefinedProperty p )
{
if ( !mBaseItem )
if ( !mComposerObject )
{
return;
}

const QMap< QString, QString >& map = ddBtn->definedProperty();
mBaseItem->setDataDefinedProperty( p, map.value( "active" ).toInt(), map.value( "useexpr" ).toInt(), map.value( "expression" ), map.value( "field" ) );
mComposerObject->setDataDefinedProperty( p, map.value( "active" ).toInt(), map.value( "useexpr" ).toInt(), map.value( "expression" ), map.value( "field" ) );
}

QgsComposerObject::DataDefinedProperty QgsComposerItemBaseWidget::ddPropertyForWidget( QgsDataDefinedButton *widget )
Expand All @@ -78,12 +78,12 @@ QgsComposerObject::DataDefinedProperty QgsComposerItemBaseWidget::ddPropertyForW

QgsAtlasComposition* QgsComposerItemBaseWidget::atlasComposition() const
{
if ( !mBaseItem )
if ( !mComposerObject )
{
return 0;
}

QgsComposition* composition = mBaseItem->composition();
QgsComposition* composition = mComposerObject->composition();

if ( !composition )
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/composer/qgscomposeritemwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class QgsComposerItemBaseWidget: public QWidget
{
Q_OBJECT
public:
QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject* baseItem );
QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject* composerObject );
~QgsComposerItemBaseWidget();

protected slots:
Expand All @@ -52,7 +52,7 @@ class QgsComposerItemBaseWidget: public QWidget
/**Returns the atlas for the composition*/
QgsAtlasComposition *atlasComposition() const;

QgsComposerObject* mBaseItem;
QgsComposerObject* mComposerObject;
};

/**A class to enter generic properties for composer items (e.g. background, outline, frame).
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposerobject.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
qgscomposerbaseitem.h
qgscomposerobject.cpp
-------------------
begin : July 2014
copyright : (C) 2014 by Nyall Dawson,Radim Blazek
Expand Down
Loading

0 comments on commit 6f3cea1

Please sign in to comment.