QGIS API Documentation  2.99.0-Master (314842d)
qgscomposition.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscomposition.h
3  -------------------
4  begin : January 2005
5  copyright : (C) 2005 by Radim Blazek
6  email : [email protected]
7  ***************************************************************************/
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 #ifndef QGSCOMPOSITION_H
17 #define QGSCOMPOSITION_H
18 
19 #include "qgis_core.h"
20 #include <memory>
21 
22 #include <QDomDocument>
23 #include <QGraphicsScene>
24 #include <QLinkedList>
25 #include <QList>
26 #include <QPair>
27 #include <QSet>
28 #include <QUndoStack>
29 #include <QPrinter>
30 #include <QPainter>
31 
33 #include "qgscomposeritemcommand.h"
35 #include "qgsatlascomposition.h"
36 #include "qgscomposerobject.h"
37 #include "qgscomposeritem.h" // required for nested name
39 
40 class QgisApp;
41 class QgsComposerFrame;
42 class QgsComposerMap;
43 class QGraphicsRectItem;
44 class QDomElement;
45 class QgsComposerArrow;
46 class QgsComposerPolygon;
49 class QgsComposerHtml;
50 class QgsComposerTableV2;
51 class QgsComposerItem;
53 class QgsComposerLabel;
54 class QgsComposerLegend;
55 class QgsComposerMap;
56 class QgsComposerPicture;
58 class QgsComposerShape;
62 class QgsVectorLayer;
63 class QgsComposer;
64 class QgsFillSymbol;
65 class QgsComposerModel;
66 class QgsPaperItem;
67 
74 class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionContextGenerator
75 {
76  Q_OBJECT
77  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
78 
79  public:
80 
82  enum PlotStyle
83  {
84  Preview = 0, // Use cache etc
85  Print, // Render well
86  Postscript // Fonts need different scaling!
87  };
88 
90  enum GridStyle
91  {
94  Crosses
95  };
96 
98  {
100  ZValueAbove
101  };
102 
104  {
106  Landscape
107  };
108 
112  explicit QgsComposition( QgsProject *project );
113 
116  {
117  AtlasOff, // Composition is not being controlled by an atlas
118  PreviewAtlas, // An atlas composition is being previewed in the app
119  ExportAtlas // The composition is being exported as an atlas
120  };
121 
122  ~QgsComposition();
123 
130  QgsProject *project() const;
131 
137  QString name() const { return mName; }
138 
144  void setName( const QString &name );
145 
154  void setPaperSize( double width, double height,
155  bool keepRelativeItemPosition = true );
156 
162  double paperHeight() const;
163 
169  double paperWidth() const;
170 
184  void resizePageToContents( double marginTop = 0.0, double marginRight = 0.0,
185  double marginBottom = 0.0, double marginLeft = 0.0 );
186 
197  void setResizeToContentsMargins( double marginTop, double marginRight,
198  double marginBottom, double marginLeft );
199 
210  void resizeToContentsMargins( double &marginTop, double &marginRight,
211  double &marginBottom, double &marginLeft ) const;
212 
216  double spaceBetweenPages() const { return mSpaceBetweenPages; }
217 
222  void setNumPages( const int pages );
223 
228  int numPages() const;
229 
239  bool pageIsEmpty( const int page ) const;
240 
248  bool shouldExportPage( const int page ) const;
249 
251  void setPageStyleSymbol( QgsFillSymbol *symbol );
253  QgsFillSymbol *pageStyleSymbol() { return mPageStyleSymbol; }
254 
258  QPointF positionOnPage( QPointF position ) const;
259 
263  int pageNumberForPoint( QPointF position ) const;
264 
268  void setStatusMessage( const QString &message );
269 
273  void updateSettings();
274 
275  void setSnapToGridEnabled( const bool b );
276  bool snapToGridEnabled() const {return mSnapToGrid;}
277 
278  void setGridVisible( const bool b );
279  bool gridVisible() const {return mGridVisible;}
280 
282  void setSnapLinesVisible( const bool visible );
283  bool snapLinesVisible() const {return mGuidesVisible;}
284 
285  void setAlignmentSnap( const bool s ) { mAlignmentSnap = s; }
286  bool alignmentSnap() const { return mAlignmentSnap; }
287 
288  void setSmartGuidesEnabled( const bool b ) { mSmartGuides = b; }
289  bool smartGuidesEnabled() const {return mSmartGuides;}
290 
298  void setPagesVisible( bool visible );
299 
306  bool pagesVisible() const { return mPagesVisible; }
307 
309  void clearSnapLines();
310 
311  void setSnapGridResolution( const double r );
312  double snapGridResolution() const {return mSnapGridResolution;}
313 
314  void setSnapGridOffsetX( const double offset );
315  double snapGridOffsetX() const {return mSnapGridOffsetX;}
316 
317  void setSnapGridOffsetY( const double offset );
318  double snapGridOffsetY() const {return mSnapGridOffsetY;}
319 
320  void setGridPen( const QPen &p );
321  QPen gridPen() const {return mGridPen;}
322 
323  void setGridStyle( const GridStyle s );
324  GridStyle gridStyle() const {return mGridStyle;}
325 
332  void setSnapTolerance( const int snapTolerance ) { mSnapTolerance = snapTolerance; }
333 
340  int snapTolerance() const { return mSnapTolerance; }
341 
347  void setBoundingBoxesVisible( const bool boundsVisible );
348 
354  bool boundingBoxesVisible() const { return mBoundingBoxesVisible; }
355 
357  QUndoStack *undoStack() { return mUndoStack; }
358 
364  QgsComposerItem *composerItemAt( QPointF position, const bool ignoreLocked = false ) const;
365 
372  QgsComposerItem *composerItemAt( QPointF position, const QgsComposerItem *belowItem, const bool ignoreLocked = false ) const;
373 
375  int pageNumberAt( QPointF position ) const;
376 
378  int itemPageNumber( const QgsComposerItem * ) const;
379 
384  QList<QgsComposerItem *> selectedComposerItems( const bool includeLockedItems = true );
385 
389  QList<const QgsComposerMap *> composerMapItems() const;
390 
395  template<class T> void composerItems( QList<T *> &itemList );
396 
403  template<class T> void composerItemsOnPage( QList<T *> &itemList, const int pageNumber ) const;
404 
408  const QgsComposerMap *getComposerMapById( const int id ) const;
409 
415  const QgsComposerItem *getComposerItemById( const QString &id ) const;
416 
420  const QgsComposerItem *getComposerItemByUuid( const QString &uuid ) const;
421 
422  int printResolution() const {return mPrintResolution;}
423  void setPrintResolution( const int dpi );
424 
425  bool printAsRaster() const {return mPrintAsRaster;}
426  void setPrintAsRaster( const bool enabled ) { mPrintAsRaster = enabled; }
427 
433  bool generateWorldFile() const { return mGenerateWorldFile; }
434 
441  void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enabled; }
442 
449  QgsComposerMap *referenceMap() const;
450 
457  void setReferenceMap( QgsComposerMap *map );
458 
460  bool useAdvancedEffects() const {return mUseAdvancedEffects;}
462  void setUseAdvancedEffects( const bool effectsEnabled );
463 
464  QgsComposition::PlotStyle plotStyle() const { return mPlotStyle; }
465  void setPlotStyle( const QgsComposition::PlotStyle style ) { mPlotStyle = style; }
466 
468  bool writeXml( QDomElement &composerElem, QDomDocument &doc );
469 
471  bool readXml( const QDomElement &compositionElem, const QDomDocument &doc );
472 
481  bool loadFromTemplate( const QDomDocument &doc, QMap<QString, QString> *substitutionMap = nullptr,
482  bool addUndoCommands = false, const bool clearComposition = true );
483 
492  void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc,
493  bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false );
494 
496  void addItemToZList( QgsComposerItem *item );
498  void removeItemFromZList( QgsComposerItem *item );
499 
500  //functions to move selected items in hierarchy
501  void raiseSelectedItems();
502 
503  //returns true if successful
504  bool raiseItem( QgsComposerItem *item );
505  void lowerSelectedItems();
506  //returns true if successful
507  bool lowerItem( QgsComposerItem *item );
508  void moveSelectedItemsToTop();
509  //returns true if successful
510  bool moveItemToTop( QgsComposerItem *item );
511  void moveSelectedItemsToBottom();
512  //returns true if successful
513  bool moveItemToBottom( QgsComposerItem *item );
514 
515  //functions to find items by their position in the z list
516  void selectNextByZOrder( const ZValueDirection direction );
517  QgsComposerItem *getComposerItemBelow( QgsComposerItem *item ) const;
518  QgsComposerItem *getComposerItemAbove( QgsComposerItem *item ) const;
519 
520  //functions to align selected items
521  void alignSelectedItemsLeft();
522  void alignSelectedItemsHCenter();
523  void alignSelectedItemsRight();
524  void alignSelectedItemsTop();
525  void alignSelectedItemsVCenter();
526  void alignSelectedItemsBottom();
527 
528  //functions to lock and unlock items
530  void lockSelectedItems();
532  void unlockAllItems();
533 
539  QgsComposerItemGroup *groupItems( QList<QgsComposerItem *> items );
540 
548  QList<QgsComposerItem *> ungroupItems( QgsComposerItemGroup *group );
549 
553  void refreshZList();
554 
556  QPointF snapPointToGrid( QPointF scenePoint ) const;
557 
559  QList< QGraphicsLineItem * > *snapLines() {return &mSnapLines;}
560 
564  QgsComposerMouseHandles *selectionHandles() {return mSelectionHandles;}
565 
567  QGraphicsLineItem *addSnapLine();
569  void removeSnapLine( QGraphicsLineItem *line );
570 
574  QGraphicsLineItem *nearestSnapLine( const bool horizontal, const double x, const double y, const double tolerance, QList< QPair< QgsComposerItem *, QgsComposerItem::ItemPositionMode > > &snappedItems ) const;
575 
581  void beginCommand( QgsComposerItem *item, const QString &commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
582 
584  void endCommand();
586  void cancelCommand();
587 
588  void beginMultiFrameCommand( QgsComposerMultiFrame *multiFrame, const QString &text, const QgsComposerMultiFrameMergeCommand::Context c = QgsComposerMultiFrameMergeCommand::Unknown );
589  void endMultiFrameCommand();
591  void cancelMultiFrameCommand();
592 
594  void addMultiFrame( QgsComposerMultiFrame *multiFrame );
596  void removeMultiFrame( QgsComposerMultiFrame *multiFrame );
597 
600  void addComposerArrow( QgsComposerArrow *arrow );
602  void addComposerLabel( QgsComposerLabel *label );
604  void addComposerMap( QgsComposerMap *map );
606  void addComposerScaleBar( QgsComposerScaleBar *scaleBar );
608  void addComposerLegend( QgsComposerLegend *legend );
610  void addComposerPicture( QgsComposerPicture *picture );
612  void addComposerShape( QgsComposerShape *shape );
614  void addComposerPolygon( QgsComposerPolygon *polygon );
616  void addComposerPolyline( QgsComposerPolyline *polyline );
618  void addComposerHtmlFrame( QgsComposerHtml *html, QgsComposerFrame *frame );
620  void addComposerTableFrame( QgsComposerAttributeTableV2 *table, QgsComposerFrame *frame );
621 
623  void removeComposerItem( QgsComposerItem *item, const bool createCommand = true, const bool removeGroupItems = true );
624 
626  void pushAddRemoveCommand( QgsComposerItem *item, const QString &text, const QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
627 
631  void setPreventCursorChange( const bool preventChange ) { mPreventCursorChange = preventChange; }
632  bool preventCursorChange() const { return mPreventCursorChange; }
633 
634 #ifndef QT_NO_PRINTER
635  //printing
637  void beginPrint( QPrinter &printer, const bool evaluateDDPageSize = false );
639  void beginPrintAsPDF( QPrinter &printer, const QString &file );
640 
646  void doPrint( QPrinter &printer, QPainter &painter, bool startNewPage = false );
647 
651  bool print( QPrinter &printer, const bool evaluateDDPageSize = false );
652 
656  bool exportAsPDF( const QString &file );
657 #endif
658 
670  QImage printPageAsRaster( int page, QSize imageSize = QSize(), int dpi = 0 );
671 
685  QImage renderRectAsRaster( const QRectF &rect, QSize imageSize = QSize(), int dpi = 0 );
686 
693  void renderPage( QPainter *p, int page );
694 
703  void renderRect( QPainter *p, const QRectF &rect );
704 
714  void georeferenceOutput( const QString &file, QgsComposerMap *referenceMap = nullptr,
715  const QRectF &exportRegion = QRectF(), double dpi = -1 ) const;
716 
720  void computeWorldFileParameters( double &a, double &b, double &c, double &d, double &e, double &f ) const;
721 
732  void computeWorldFileParameters( const QRectF &exportRegion, double &a, double &b, double &c, double &d, double &e, double &f ) const;
733 
734  QgsAtlasComposition &atlasComposition() { return mAtlasComposition; }
735 
740  QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; }
741 
747  bool setAtlasMode( const QgsComposition::AtlasMode mode );
748 
753  QList< QgsPaperItem * > pages() { return mPages; }
754 
759  QgsComposerModel *itemsModel() { return mItemsModel; }
760 
769  void setCustomProperty( const QString &key, const QVariant &value );
770 
780  QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const;
781 
789  void removeCustomProperty( const QString &key );
790 
797  QStringList customProperties() const;
798 
804  QRectF pageItemBounds( int pageNumber, bool visibleOnly = false ) const;
805 
810  QRectF compositionBounds( bool ignorePages = false, double margin = 0.0 ) const;
811 
812  public slots:
814  void sendItemAddedSignal( QgsComposerItem *item );
815 
818  void updateBounds();
819 
825  void refreshItems();
826 
830  void setSelectedItem( QgsComposerItem *item );
831 
836  void setAllDeselected();
837 
846  void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = nullptr );
847 
853 
858  QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
859 
864  const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; }
865 
871  void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
872 
873  protected:
874  void init();
875 
876 
877  private:
878 
880  QgsProject *mProject = nullptr;
881 
882  QString mName;
883 
884  QgsComposition::PlotStyle mPlotStyle;
885  double mPageWidth;
886  double mPageHeight;
887  QList< QgsPaperItem * > mPages;
888  double mSpaceBetweenPages; //space in preview between pages
889 
891  QgsFillSymbol *mPageStyleSymbol = nullptr;
892  void createDefaultPageStyleSymbol();
893 
895  QSet<QgsComposerMultiFrame *> mMultiFrames;
896 
898  int mPrintResolution;
899 
901  bool mPrintAsRaster;
902 
904  bool mGenerateWorldFile;
905 
907  QString mWorldFileMapId;
908 
910  bool mUseAdvancedEffects;
911 
913  bool mSnapToGrid;
914  bool mGridVisible;
915  double mSnapGridResolution;
916  double mSnapGridOffsetX;
917  double mSnapGridOffsetY;
918  QPen mGridPen;
919  GridStyle mGridStyle;
920 
922  bool mAlignmentSnap;
923  bool mGuidesVisible;
924  bool mSmartGuides;
925  int mSnapTolerance;
926 
928  QList< QGraphicsLineItem * > mSnapLines;
929 
930  double mResizeToContentsMarginTop;
931  double mResizeToContentsMarginRight;
932  double mResizeToContentsMarginBottom;
933  double mResizeToContentsMarginLeft;
934 
935  bool mBoundingBoxesVisible;
936  bool mPagesVisible;
937  QgsComposerMouseHandles *mSelectionHandles = nullptr;
938 
939  QUndoStack *mUndoStack = nullptr;
940 
941  QgsComposerItemCommand *mActiveItemCommand = nullptr;
942  QgsComposerMultiFrameCommand *mActiveMultiFrameCommand = nullptr;
943 
945  QgsAtlasComposition mAtlasComposition;
946 
947  QgsComposition::AtlasMode mAtlasMode;
948 
949  bool mPreventCursorChange;
950 
951  QgsComposerModel *mItemsModel = nullptr;
952 
953  QgsPropertyCollection mDataDefinedProperties;
954 
955  QgsObjectCustomProperties mCustomProperties;
956 
957  QgsComposition(); //default constructor is forbidden
958 
960  void updateZValues( const bool addUndoCommands = true );
961 
964  int boundingRectOfSelectedItems( QRectF &bRect );
965 
967  void loadDefaults();
968 
970  void loadSettings();
971 
973  QPointF minPointFromXml( const QDomElement &elem ) const;
974 
975  void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand *c );
976 
977  void updatePaperItems();
978  void addPaperItem();
979  void removePaperItems();
980  void deleteAndRemoveMultiFrames();
981 
982  static QString encodeStringForXml( const QString &str );
983 
984  //tries to return the current QGraphicsView attached to the composition
985  QGraphicsView *graphicsView() const;
986 
990  void refreshPageSize( const QgsExpressionContext *context = nullptr );
991 
996  bool ddPageSizeActive() const;
997 
1006  double *computeGeoTransform( const QgsComposerMap *referenceMap = nullptr, const QRectF &exportRegion = QRectF(), double dpi = -1 ) const;
1007 
1008 
1009  private slots:
1010  /*Prepares all data defined expressions*/
1011  void prepareAllDataDefinedExpressions();
1012 
1013  signals:
1014 
1020  void nameChanged( const QString &name );
1021 
1022  void paperSizeChanged();
1023  void nPagesChanged();
1024 
1026  void printResolutionChanged();
1027 
1029  void selectedItemChanged( QgsComposerItem *selected );
1030 
1035  void itemAdded( QgsComposerItem *item );
1036 
1038  void composerItemGroupAdded( QgsComposerItemGroup *group );
1039 
1041  void itemRemoved( QgsComposerItem * );
1042 
1044  void refreshItemsTriggered();
1045 
1047  void statusMsgChanged( const QString &message );
1048 
1052  void variablesChanged();
1053 
1054  friend class QgsComposerModel; //for accessing updateZValues (should not be public)
1055  friend class TestQgsComposition;
1056 };
1057 
1058 template<class T> void QgsComposition::composerItems( QList<T *> &itemList )
1059 {
1060  itemList.clear();
1061  QList<QGraphicsItem *> graphicsItemList = items();
1062  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1063  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1064  {
1065  T *item = dynamic_cast<T *>( *itemIt );
1066  if ( item )
1067  {
1068  itemList.push_back( item );
1069  }
1070  }
1071 }
1072 
1073 template<class T> void QgsComposition::composerItemsOnPage( QList<T *> &itemList, const int pageNumber ) const
1074 {
1075  itemList.clear();
1076  QList<QGraphicsItem *> graphicsItemList = items();
1077  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1078  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1079  {
1080  T *item = dynamic_cast<T *>( *itemIt );
1081  if ( item && itemPageNumber( item ) == pageNumber )
1082  {
1083  itemList.push_back( item );
1084  }
1085  }
1086 }
1087 
1088 
1089 #endif
1090 
1091 
1092 
void setSnapTolerance(const int snapTolerance)
Sets the snap tolerance to use when automatically snapping items during movement and resizing to guid...
Item representing the paper.
Definition: qgspaperitem.h:42
A scale bar item that can be added to a map composition.
QUndoStack * undoStack()
Returns pointer to undo/redo command storage.
QPen gridPen() const
Composer item for polylines.
void setPrintAsRaster(const bool enabled)
double snapGridOffsetY() const
void composerItems(QList< T *> &itemList)
Return composer items of a specific type.
An item that draws an arrow between two points.
double snapGridOffsetX() const
bool snapToGridEnabled() const
QString name() const
Returns the composition&#39;s name.
void setGenerateWorldFile(bool enabled)
Sets whether the composition will generate corresponding world files when pages are exported...
QgsComposerModel * itemsModel()
Returns the items model attached to the composition.
GridStyle
Style to draw the snapping grid.
void setPlotStyle(const QgsComposition::PlotStyle style)
bool alignmentSnap() const
int printResolution() const
QgsComposerMouseHandles * selectionHandles()
Returns pointer to selection handles.
A item that forms part of a map composition.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the composition&#39;s property collection, used for data defined overrides...
bool gridVisible() const
A container for grouping several QgsComposerItems.
bool snapLinesVisible() const
bool preventCursorChange() const
QgsComposition::AtlasMode atlasMode() const
Returns the current atlas mode of the composition.
A table that displays attributes from a vector layer.
DataDefinedProperty
Data defined properties for different item types.
A composer class that displays svg files or raster format (jpg, png, ...)
QgsComposition::PlotStyle plotStyle() const
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
void setPreventCursorChange(const bool preventChange)
If true, prevents any mouse cursor changes by the composition or by any composer items Used by QgsCom...
QList< QgsPaperItem *> pages()
Return pages in the correct order.
bool boundingBoxesVisible() const
Returns whether selection bounding boxes should be shown in the composition.
bool useAdvancedEffects() const
Returns true if a composition should use advanced effects such as blend modes.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for composer items with the ability to distribute the content to several frames (...
A class to display a table in the print composer, and allow the table to span over multiple frames...
Reads and writes project states.
Definition: qgsproject.h:76
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the composition&#39;s property collection, used for data defined overrides...
void setAlignmentSnap(const bool s)
Graphics scene for map printing.
bool generateWorldFile() const
Returns true if the composition will generate corresponding world files when pages are exported...
Object representing map window.
Frame item for a composer multiframe item.
Abstract interface for generating an expression context.
bool smartGuidesEnabled() const
void composerItemsOnPage(QList< T *> &itemList, const int pageNumber) const
Return composer items of a specific type on a specified page.
A model for items attached to a composition.
A composer command class for adding / removing composer items.
Undo command to undo/redo all composer item related changes.
QgsFillSymbol * pageStyleSymbol()
Note: added in version 2.1.
A composer items that draws common shapes (ellipse, triangle, rectangle)
Composer item for polygons.
int snapTolerance() const
Returns the snap tolerance to use when automatically snapping items during movement and resizing to g...
AtlasMode
Composition atlas modes.
GridStyle gridStyle() const
bool printAsRaster() const
QList< QGraphicsLineItem *> * snapLines()
Returns pointer to snap lines collection.
double snapGridResolution() const
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML i...
void setSmartGuidesEnabled(const bool b)
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
A label that can be placed onto a map composition.
Class used to render an Atlas, iterating over geometry features.
QgsAtlasComposition & atlasComposition()
Handles drawing of selection outlines and mouse handles.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the composition&#39;s property collection, used for data defined overrides.
bool pagesVisible() const
Returns whether the page items are be visible in the composition.
PlotStyle
Plot type.
Represents a vector layer which manages a vector based data sets.
A legend that can be placed onto a map composition.
double spaceBetweenPages() const
Returns the vertical space between pages in a composer view.
All properties for item.