Skip to content

Commit a654e27

Browse files
committed
Resolved merge conflicts when reverting 686f632
1 parent af0782d commit a654e27

3 files changed

Lines changed: 85 additions & 142 deletions

File tree

‎python/core/composer/qgscomposition.sip‎

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,14 @@
1-
/** \ingroup MapComposer
2-
* Class used to render an Atlas, iterating over geometry features.
3-
* prepareForFeature() modifies the atlas map's extent to zoom on the given feature.
4-
* This class is used for printing, exporting to PDF and images.
5-
* */
6-
class QgsAtlasRendering
7-
{
8-
public:
9-
QgsAtlasRendering( QgsComposition* composition );
10-
~QgsAtlasRendering();
11-
12-
/** Begins the rendering. Sets an optional output filename pattern */
13-
void begin( const QString& filenamePattern = "" );
14-
/** Ends the rendering. Restores original extent*/
15-
void end();
16-
17-
/** Returns the number of features in the coverage layer */
18-
size_t numFeatures() const;
19-
20-
/** Prepare the atlas map for the given feature. Sets the extent and context variables */
21-
void prepareForFeature( size_t i );
22-
23-
/** Returns the current filename. Must be called after prepareForFeature( i ) */
24-
const QString& currentFilename() const;
25-
};
26-
271
/** \ingroup MapComposer
282
* Graphics scene for map printing. The class manages the paper item which always
293
* is the item in the back (z-value 0). It maintains the z-Values of the items and stores
304
* them in a list in ascending z-Order. This list can be changed to lower/raise items one position
315
* or to bring them to front/back.
326
* */
33-
class QgsComposition : QGraphicsScene
7+
class QgsComposition: QGraphicsScene
348
{
359
%TypeHeaderCode
3610
#include <qgscomposition.h>
3711
%End
38-
3912
public:
4013

4114
/** \brief Plot type */
@@ -94,27 +67,20 @@ class QgsComposition : QGraphicsScene
9467
/**Returns pointer to undo/redo command storage*/
9568
QUndoStack* undoStack();
9669

97-
/**Returns the topmost composer item. Ignores mPaperItem*/
70+
/**Returns the topmose composer item. Ignores mPaperItem*/
9871
QgsComposerItem* composerItemAt( const QPointF & position );
9972

100-
/** Returns the page number (0-bsaed) given a coordinate */
101-
int pageNumberAt( const QPointF& position ) const;
102-
103-
/** Returns on which page number (0-based) is displayed an item */
104-
int itemPageNumber( const QgsComposerItem* ) const;
105-
10673
QList<QgsComposerItem*> selectedComposerItems();
10774

10875
/**Returns pointers to all composer maps in the scene*/
109-
%If (QLISTCONSTPTR_CONVERSION)
110-
QList<const QgsComposerMap*> composerMapItems() const;
111-
%End
76+
//todo: needs a new mapping for QList<const T*> ?
77+
// QList<const QgsComposerMap*> composerMapItems() const;
11278

11379
/**Return composer items of a specific type*/
11480
// template<class T> void composerItems( QList<T*>& itemList );
11581

11682
/**Returns the composer map with specified id
117-
@return QgsComposerMap or 0 pointer if the composer map item does not exist*/
83+
@return id or 0 pointer if the composer map item does not exist*/
11884
const QgsComposerMap* getComposerMapById( int id ) const;
11985

12086
/*Returns the composer html with specified id (a string as named in the
@@ -145,10 +111,7 @@ class QgsComposition : QGraphicsScene
145111
/**Returns pointer to map renderer of qgis map canvas*/
146112
QgsMapRenderer* mapRenderer();
147113

148-
QgsComposerMap* atlasMap();
149-
void setAtlasMap( QgsComposerMap* map );
150-
151-
QgsComposition::PlotStyle plotStyle() const;
114+
QgsComposition::PlotStyle plotStyle();
152115
void setPlotStyle( QgsComposition::PlotStyle style );
153116

154117
/**Returns the pixel font size for a font that has point size set.
@@ -177,13 +140,8 @@ class QgsComposition : QGraphicsScene
177140
@param doc xml document
178141
@param mapsToRestore for reading from project file: set preview move 'rectangle' to all maps and save the preview states to show composer maps on demand
179142
@param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
180-
@param pos item position. Optional, take position from xml if 0
181-
@note not available in python bindings
182-
*/
183-
/*
184-
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0,
185-
bool addUndoCommands = false, QPointF* pos = 0 );
186-
*/
143+
@param pos item position. Optional, take position from xml if 0*/
144+
//void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore, bool addUndoCommands = false, QPointF* pos = 0 );
187145

188146
/**Adds item to z list. Usually called from constructor of QgsComposerItem*/
189147
void addItemToZList( QgsComposerItem* item );
@@ -234,7 +192,7 @@ class QgsComposition : QGraphicsScene
234192
/**Removes multi frame (but does not delete it)*/
235193
void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
236194
/**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)*/
237-
void addComposerArrow( QgsComposerArrow* arrow );
195+
//void addComposerArrow( QgsComposerArrow* arrow );
238196
/**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/
239197
void addComposerLabel( QgsComposerLabel* label );
240198
/**Adds map to the graphics scene and advices composer to create a widget for it (through signal)*/
@@ -261,19 +219,10 @@ class QgsComposition : QGraphicsScene
261219

262220
//printing
263221

264-
/** Prepare the printer for printing */
265-
void beginPrint( QPrinter& printer );
266-
/** Prepare the printer for printing in a PDF */
267-
void beginPrintAsPDF( QPrinter& printer, const QString& file );
268-
/** Print on a preconfigured printer */
269-
void doPrint( QPrinter& printer, QPainter& painter );
222+
void exportAsPDF( const QString& file );
270223

271-
/** Convenience function that prepares the printer and prints */
272224
void print( QPrinter &printer );
273225

274-
/** Convenience function that prepares the printer for printing in PDF and prints */
275-
void exportAsPDF( const QString& file );
276-
277226
//! print composer page to image
278227
//! If the image does not fit into memory, a null image is returned
279228
QImage printPageAsRaster( int page );

0 commit comments

Comments
 (0)