Skip to content

Commit

Permalink
Clean up the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed Sep 24, 2012
1 parent 4c82ade commit 6a1c280
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/app/composer/qgscomposermapwidget.cpp
Expand Up @@ -977,7 +977,6 @@ void QgsComposerMapWidget::on_mIsAtlasCheckBox_stateChanged( int state )
composition->setAtlasMap( 0 );
}
}
// TODO: warn
}

void QgsComposerMapWidget::on_mAtlasCoverageLayerComboBox_currentIndexChanged( int index )
Expand Down
3 changes: 1 addition & 2 deletions src/core/composer/qgscomposeritem.h
Expand Up @@ -53,8 +53,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
ComposerTable,
ComposerAttributeTable,
ComposerTextTable,
ComposerFrame,
ComposerAtlasMap
ComposerFrame
};

/**Describes the action (move or resize in different directon) to be done during mouse move*/
Expand Down
6 changes: 3 additions & 3 deletions src/core/composer/qgscomposition.cpp
Expand Up @@ -46,6 +46,9 @@
#include <QSettings>
#include <QDir>

/**
* Private members of the QgsAtlasRendering class
*/
struct QgsAtlasRendering::QgsAtlasRenderingImpl
{
QgsComposition* composition;
Expand Down Expand Up @@ -139,7 +142,6 @@ void QgsAtlasRendering::prepareForFeature( size_t featureI )
throw std::runtime_error( "Filename eval error: " + impl->filenameExpr->evalErrorString().toStdString() );
}

// FIXME resolve labels
impl->currentFilename = filenameRes.toString();
}

Expand Down Expand Up @@ -179,8 +181,6 @@ void QgsAtlasRendering::prepareForFeature( size_t featureI )
// auto scale

double geom_ratio = geom_rect.width() / geom_rect.height();
// QRectF map_rect = mAtlasMap->boundingRect();
// double map_ratio = map_rect.width() / map_rect.height();
double map_ratio = impl->origExtent.width() / impl->origExtent.height();

// geometry height is too big
Expand Down
6 changes: 6 additions & 0 deletions src/core/composer/qgscomposition.h
Expand Up @@ -49,6 +49,11 @@ class QgsComposerAttributeTable;
class QgsComposerMultiFrame;
class QgsComposerMultiFrameCommand;

/** \ingroup MapComposer
* Class used to render an Atlas, iterating over geometry features.
* prepareForFeature() modifies the atlas map's extent to zoom on the given feature.
* This class is used for printing, exporting to PDF and images.
* */
class QgsAtlasRendering
{
public:
Expand All @@ -62,6 +67,7 @@ class QgsAtlasRendering
QString currentFilename() const;

private:
// Use the PImpl idiom for private members.
struct QgsAtlasRenderingImpl;
std::auto_ptr<QgsAtlasRenderingImpl> impl;
};
Expand Down

0 comments on commit 6a1c280

Please sign in to comment.