QGIS API Documentation  2.99.0-Master (d55fa22)
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 "qgis_sip.h"
21 #include "qgis.h"
22 #include <memory>
23 
24 #include <QDomDocument>
25 #include <QGraphicsScene>
26 #include <QLinkedList>
27 #include <QList>
28 #include <QPair>
29 #include <QSet>
30 #include <QUndoStack>
31 #include <QPrinter>
32 #include <QPainter>
33 
35 #include "qgscomposeritemcommand.h"
37 #include "qgsatlascomposition.h"
38 #include "qgscomposerobject.h"
39 #include "qgscomposeritem.h" // required for nested name
41 
42 class QgisApp;
43 class QgsComposerFrame;
44 class QgsComposerMap;
45 class QGraphicsRectItem;
46 class QDomElement;
47 class QgsComposerArrow;
48 class QgsComposerPolygon;
51 class QgsComposerHtml;
52 class QgsComposerTableV2;
53 class QgsComposerItem;
55 class QgsComposerLabel;
56 class QgsComposerLegend;
57 class QgsComposerMap;
58 class QgsComposerPicture;
60 class QgsComposerShape;
64 class QgsVectorLayer;
65 class QgsComposer;
66 class QgsFillSymbol;
67 class QgsComposerModel;
68 class QgsPaperItem;
69 
76 class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionContextGenerator
77 {
78  Q_OBJECT
79  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
80 
81  public:
82 
84  enum PlotStyle
85  {
86  Preview = 0, // Use cache etc
87  Print, // Render well
88  Postscript // Fonts need different scaling!
89  };
90 
92  enum GridStyle
93  {
96  Crosses
97  };
98 
100  {
102  ZValueAbove
103  };
104 
106  {
108  Landscape
109  };
110 
114  explicit QgsComposition( QgsProject *project );
115 
118  {
119  AtlasOff, // Composition is not being controlled by an atlas
120  PreviewAtlas, // An atlas composition is being previewed in the app
121  ExportAtlas // The composition is being exported as an atlas
122  };
123 
124  ~QgsComposition();
125 
132  QgsProject *project() const;
133 
139  QString name() const { return mName; }
140 
146  void setName( const QString &name );
147 
156  void setPaperSize( double width, double height,
157  bool keepRelativeItemPosition = true );
158 
164  double paperHeight() const;
165 
171  double paperWidth() const;
172 
186  void resizePageToContents( double marginTop = 0.0, double marginRight = 0.0,
187  double marginBottom = 0.0, double marginLeft = 0.0 );
188 
199  void setResizeToContentsMargins( double marginTop, double marginRight,
200  double marginBottom, double marginLeft );
201 
212  void resizeToContentsMargins( double &marginTop SIP_OUT, double &marginRight SIP_OUT,
213  double &marginBottom SIP_OUT, double &marginLeft SIP_OUT ) const;
214 
218  double spaceBetweenPages() const { return mSpaceBetweenPages; }
219 
224  void setNumPages( const int pages );
225 
230  int numPages() const;
231 
241  bool pageIsEmpty( const int page ) const;
242 
250  bool shouldExportPage( const int page ) const;
251 
253  void setPageStyleSymbol( QgsFillSymbol *symbol );
255  QgsFillSymbol *pageStyleSymbol() { return mPageStyleSymbol; }
256 
260  QPointF positionOnPage( QPointF position ) const;
261 
265  int pageNumberForPoint( QPointF position ) const;
266 
270  void setStatusMessage( const QString &message );
271 
275  void updateSettings();
276 
277  void setSnapToGridEnabled( const bool b );
278  bool snapToGridEnabled() const {return mSnapToGrid;}
279 
280  void setGridVisible( const bool b );
281  bool gridVisible() const {return mGridVisible;}
282 
284  void setSnapLinesVisible( const bool visible );
285  bool snapLinesVisible() const {return mGuidesVisible;}
286 
287  void setAlignmentSnap( const bool s ) { mAlignmentSnap = s; }
288  bool alignmentSnap() const { return mAlignmentSnap; }
289 
290  void setSmartGuidesEnabled( const bool b ) { mSmartGuides = b; }
291  bool smartGuidesEnabled() const {return mSmartGuides;}
292 
300  void setPagesVisible( bool visible );
301 
308  bool pagesVisible() const { return mPagesVisible; }
309 
311  void clearSnapLines();
312 
313  void setSnapGridResolution( const double r );
314  double snapGridResolution() const {return mSnapGridResolution;}
315 
316  void setSnapGridOffsetX( const double offset );
317  double snapGridOffsetX() const {return mSnapGridOffsetX;}
318 
319  void setSnapGridOffsetY( const double offset );
320  double snapGridOffsetY() const {return mSnapGridOffsetY;}
321 
322  void setGridPen( const QPen &p );
323  QPen gridPen() const {return mGridPen;}
324 
325  void setGridStyle( const GridStyle s );
326  GridStyle gridStyle() const {return mGridStyle;}
327 
334  void setSnapTolerance( const int snapTolerance ) { mSnapTolerance = snapTolerance; }
335 
342  int snapTolerance() const { return mSnapTolerance; }
343 
349  void setBoundingBoxesVisible( const bool boundsVisible );
350 
356  bool boundingBoxesVisible() const { return mBoundingBoxesVisible; }
357 
359  QUndoStack *undoStack() { return mUndoStack; }
360 
366  QgsComposerItem *composerItemAt( QPointF position, const bool ignoreLocked = false ) const;
367 
374  QgsComposerItem *composerItemAt( QPointF position, const QgsComposerItem *belowItem, const bool ignoreLocked = false ) const;
375 
377  int pageNumberAt( QPointF position ) const;
378 
380  int itemPageNumber( const QgsComposerItem * ) const;
381 
386  QList<QgsComposerItem *> selectedComposerItems( const bool includeLockedItems = true );
387 
391  QList<const QgsComposerMap *> composerMapItems() const;
392 
397  template<class T> void composerItems( QList<T *> &itemList ) SIP_SKIP;
398 
405  template<class T> void composerItemsOnPage( QList<T *> &itemList, const int pageNumber ) const SIP_SKIP;
406 
410  const QgsComposerMap *getComposerMapById( const int id ) const;
411 
417  const QgsComposerItem *getComposerItemById( const QString &id ) const;
418 
422  const QgsComposerItem *getComposerItemByUuid( const QString &uuid ) const;
423 
424  int printResolution() const {return mPrintResolution;}
425  void setPrintResolution( const int dpi );
426 
427  bool printAsRaster() const {return mPrintAsRaster;}
428  void setPrintAsRaster( const bool enabled ) { mPrintAsRaster = enabled; }
429 
435  bool generateWorldFile() const { return mGenerateWorldFile; }
436 
443  void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enabled; }
444 
451  QgsComposerMap *referenceMap() const;
452 
459  void setReferenceMap( QgsComposerMap *map );
460 
462  bool useAdvancedEffects() const {return mUseAdvancedEffects;}
464  void setUseAdvancedEffects( const bool effectsEnabled );
465 
466  QgsComposition::PlotStyle plotStyle() const { return mPlotStyle; }
467  void setPlotStyle( const QgsComposition::PlotStyle style ) { mPlotStyle = style; }
468 
470  bool writeXml( QDomElement &composerElem, QDomDocument &doc );
471 
473  bool readXml( const QDomElement &compositionElem, const QDomDocument &doc );
474 
483  bool loadFromTemplate( const QDomDocument &doc, QMap<QString, QString> *substitutionMap = nullptr,
484  bool addUndoCommands = false, const bool clearComposition = true );
485 
494  void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc,
495  bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false ) SIP_SKIP;
496 
498  void addItemToZList( QgsComposerItem *item );
500  void removeItemFromZList( QgsComposerItem *item );
501 
502  //functions to move selected items in hierarchy
503  void raiseSelectedItems();
504 
505  //returns true if successful
506  bool raiseItem( QgsComposerItem *item );
507  void lowerSelectedItems();
508  //returns true if successful
509  bool lowerItem( QgsComposerItem *item );
510  void moveSelectedItemsToTop();
511  //returns true if successful
512  bool moveItemToTop( QgsComposerItem *item );
513  void moveSelectedItemsToBottom();
514  //returns true if successful
515  bool moveItemToBottom( QgsComposerItem *item );
516 
517  //functions to find items by their position in the z list
518  void selectNextByZOrder( const ZValueDirection direction );
519  QgsComposerItem *getComposerItemBelow( QgsComposerItem *item ) const;
520  QgsComposerItem *getComposerItemAbove( QgsComposerItem *item ) const;
521 
522  //functions to align selected items
523  void alignSelectedItemsLeft();
524  void alignSelectedItemsHCenter();
525  void alignSelectedItemsRight();
526  void alignSelectedItemsTop();
527  void alignSelectedItemsVCenter();
528  void alignSelectedItemsBottom();
529 
530  //functions to lock and unlock items
532  void lockSelectedItems();
534  void unlockAllItems();
535 
541  QgsComposerItemGroup *groupItems( QList<QgsComposerItem *> items );
542 
550  QList<QgsComposerItem *> ungroupItems( QgsComposerItemGroup *group );
551 
555  void refreshZList();
556 
558  QPointF snapPointToGrid( QPointF scenePoint ) const;
559 
561  QList< QGraphicsLineItem * > *snapLines() {return &mSnapLines;}
562 
566  QgsComposerMouseHandles *selectionHandles() {return mSelectionHandles;} SIP_SKIP
567 
569  QGraphicsLineItem *addSnapLine();
571  void removeSnapLine( QGraphicsLineItem *line );
572 
576  QGraphicsLineItem *nearestSnapLine( const bool horizontal, const double x, const double y, const double tolerance, QList< QPair< QgsComposerItem *, QgsComposerItem::ItemPositionMode > > &snappedItems ) const SIP_SKIP;
577 
583  void beginCommand( QgsComposerItem *item, const QString &commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
584 
586  void endCommand();
588  void cancelCommand();
589 
590  void beginMultiFrameCommand( QgsComposerMultiFrame *multiFrame, const QString &text, const QgsComposerMultiFrameMergeCommand::Context c = QgsComposerMultiFrameMergeCommand::Unknown );
591  void endMultiFrameCommand();
593  void cancelMultiFrameCommand();
594 
596  void addMultiFrame( QgsComposerMultiFrame *multiFrame );
598  void removeMultiFrame( QgsComposerMultiFrame *multiFrame );
599 
602  void addComposerArrow( QgsComposerArrow *arrow ) SIP_SKIP;
604  void addComposerLabel( QgsComposerLabel *label );
606  void addComposerMap( QgsComposerMap *map );
608  void addComposerScaleBar( QgsComposerScaleBar *scaleBar );
610  void addComposerLegend( QgsComposerLegend *legend );
612  void addComposerPicture( QgsComposerPicture *picture );
614  void addComposerShape( QgsComposerShape *shape );
616  void addComposerPolygon( QgsComposerPolygon *polygon );
618  void addComposerPolyline( QgsComposerPolyline *polyline );
620  void addComposerHtmlFrame( QgsComposerHtml *html, QgsComposerFrame *frame );
622  void addComposerTableFrame( QgsComposerAttributeTableV2 *table, QgsComposerFrame *frame );
623 
625  void removeComposerItem( QgsComposerItem *item, const bool createCommand = true, const bool removeGroupItems = true );
626 
628  void pushAddRemoveCommand( QgsComposerItem *item, const QString &text, const QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
629 
633  void setPreventCursorChange( const bool preventChange ) { mPreventCursorChange = preventChange; }
634  bool preventCursorChange() const { return mPreventCursorChange; }
635 
636 #ifndef QT_NO_PRINTER
637  //printing
639  void beginPrint( QPrinter &printer, const bool evaluateDDPageSize = false );
641  void beginPrintAsPDF( QPrinter &printer, const QString &file );
642 
648  void doPrint( QPrinter &printer, QPainter &painter, bool startNewPage = false );
649 
653  bool print( QPrinter &printer, const bool evaluateDDPageSize = false );
654 
658  bool exportAsPDF( const QString &file );
659 #endif
660 
672  QImage printPageAsRaster( int page, QSize imageSize = QSize(), int dpi = 0 );
673 
687  QImage renderRectAsRaster( const QRectF &rect, QSize imageSize = QSize(), int dpi = 0 );
688 
695  void renderPage( QPainter *p, int page );
696 
705  void renderRect( QPainter *p, const QRectF &rect );
706 
716  void georeferenceOutput( const QString &file, QgsComposerMap *referenceMap = nullptr,
717  const QRectF &exportRegion = QRectF(), double dpi = -1 ) const;
718 
722  void computeWorldFileParameters( double &a, double &b, double &c, double &d, double &e, double &f ) const;
723 
734  void computeWorldFileParameters( const QRectF &exportRegion, double &a, double &b, double &c, double &d, double &e, double &f ) const;
735 
736  QgsAtlasComposition &atlasComposition() { return mAtlasComposition; }
737 
742  QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; }
743 
749  bool setAtlasMode( const QgsComposition::AtlasMode mode );
750 
755  QList< QgsPaperItem * > pages() { return mPages; }
756 
761  QgsComposerModel *itemsModel() { return mItemsModel; }
762 
771  void setCustomProperty( const QString &key, const QVariant &value );
772 
782  QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const;
783 
791  void removeCustomProperty( const QString &key );
792 
799  QStringList customProperties() const;
800 
806  QRectF pageItemBounds( int pageNumber, bool visibleOnly = false ) const;
807 
812  QRectF compositionBounds( bool ignorePages = false, double margin = 0.0 ) const;
813 
814  public slots:
816  void sendItemAddedSignal( QgsComposerItem *item );
817 
820  void updateBounds();
821 
827  void refreshItems();
828 
832  void setSelectedItem( QgsComposerItem *item );
833 
838  void setAllDeselected();
839 
848  void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = nullptr );
849 
855 
860  QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
861 
866  const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; }
867 
873  void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
874 
875  protected:
876  void init();
877 
878 
879  private:
880 
882  QgsProject *mProject = nullptr;
883 
884  QString mName;
885 
886  QgsComposition::PlotStyle mPlotStyle;
887  double mPageWidth;
888  double mPageHeight;
889  QList< QgsPaperItem * > mPages;
890  double mSpaceBetweenPages; //space in preview between pages
891 
893  QgsFillSymbol *mPageStyleSymbol = nullptr;
894  void createDefaultPageStyleSymbol();
895 
897  QSet<QgsComposerMultiFrame *> mMultiFrames;
898 
900  int mPrintResolution;
901 
903  bool mPrintAsRaster;
904 
906  bool mGenerateWorldFile;
907 
909  QString mWorldFileMapId;
910 
912  bool mUseAdvancedEffects;
913 
915  bool mSnapToGrid;
916  bool mGridVisible;
917  double mSnapGridResolution;
918  double mSnapGridOffsetX;
919  double mSnapGridOffsetY;
920  QPen mGridPen;
921  GridStyle mGridStyle;
922 
924  bool mAlignmentSnap;
925  bool mGuidesVisible;
926  bool mSmartGuides;
927  int mSnapTolerance;
928 
930  QList< QGraphicsLineItem * > mSnapLines;
931 
932  double mResizeToContentsMarginTop;
933  double mResizeToContentsMarginRight;
934  double mResizeToContentsMarginBottom;
935  double mResizeToContentsMarginLeft;
936 
937  bool mBoundingBoxesVisible;
938  bool mPagesVisible;
939  QgsComposerMouseHandles *mSelectionHandles = nullptr;
940 
941  QUndoStack *mUndoStack = nullptr;
942 
943  QgsComposerItemCommand *mActiveItemCommand = nullptr;
944  QgsComposerMultiFrameCommand *mActiveMultiFrameCommand = nullptr;
945 
947  QgsAtlasComposition mAtlasComposition;
948 
949  QgsComposition::AtlasMode mAtlasMode;
950 
951  bool mPreventCursorChange;
952 
953  QgsComposerModel *mItemsModel = nullptr;
954 
955  QgsPropertyCollection mDataDefinedProperties;
956 
957  QgsObjectCustomProperties mCustomProperties;
958 
959  QgsComposition(); //default constructor is forbidden
960 
962  void updateZValues( const bool addUndoCommands = true );
963 
966  int boundingRectOfSelectedItems( QRectF &bRect );
967 
969  void loadDefaults();
970 
972  void loadSettings();
973 
975  QPointF minPointFromXml( const QDomElement &elem ) const;
976 
977  void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand *c );
978 
979  void updatePaperItems();
980  void addPaperItem();
981  void removePaperItems();
982  void deleteAndRemoveMultiFrames();
983 
984  static QString encodeStringForXml( const QString &str );
985 
986  //tries to return the current QGraphicsView attached to the composition
987  QGraphicsView *graphicsView() const;
988 
992  void refreshPageSize( const QgsExpressionContext *context = nullptr );
993 
998  bool ddPageSizeActive() const;
999 
1008  double *computeGeoTransform( const QgsComposerMap *referenceMap = nullptr, const QRectF &exportRegion = QRectF(), double dpi = -1 ) const;
1009 
1010 
1011  private slots:
1012  /*Prepares all data defined expressions*/
1013  void prepareAllDataDefinedExpressions();
1014 
1015  signals:
1016 
1022  void nameChanged( const QString &name );
1023 
1024  void paperSizeChanged();
1025  void nPagesChanged();
1026 
1028  void printResolutionChanged();
1029 
1031  void selectedItemChanged( QgsComposerItem *selected );
1032 
1037  void itemAdded( QgsComposerItem *item );
1038 
1040  void composerItemGroupAdded( QgsComposerItemGroup *group );
1041 
1043  void itemRemoved( QgsComposerItem * );
1044 
1046  void refreshItemsTriggered();
1047 
1049  void statusMsgChanged( const QString &message );
1050 
1054  void variablesChanged();
1055 
1056  friend class QgsComposerModel; //for accessing updateZValues (should not be public)
1057  friend class TestQgsComposition;
1058 };
1059 
1060 template<class T> void QgsComposition::composerItems( QList<T *> &itemList )
1061 {
1062  itemList.clear();
1063  QList<QGraphicsItem *> graphicsItemList = items();
1064  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1065  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1066  {
1067  T *item = dynamic_cast<T *>( *itemIt );
1068  if ( item )
1069  {
1070  itemList.push_back( item );
1071  }
1072  }
1073 }
1074 
1075 template<class T> void QgsComposition::composerItemsOnPage( QList<T *> &itemList, const int pageNumber ) const
1076 {
1077  itemList.clear();
1078  QList<QGraphicsItem *> graphicsItemList = items();
1079  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1080  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1081  {
1082  T *item = dynamic_cast<T *>( *itemIt );
1083  if ( item && itemPageNumber( item ) == pageNumber )
1084  {
1085  itemList.push_back( item );
1086  }
1087  }
1088 }
1089 
1090 
1091 #endif
1092 
1093 
1094 
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:43
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...
#define SIP_SKIP
Definition: qgis_sip.h:87
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:78
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.
#define SIP_OUT
Definition: qgis_sip.h:39
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.