QGIS API Documentation  2.99.0-Master (7d4f81d)
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 
493  void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc,
494  bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false );
495 
497  void addItemToZList( QgsComposerItem *item );
499  void removeItemFromZList( QgsComposerItem *item );
500 
501  //functions to move selected items in hierarchy
502  void raiseSelectedItems();
503 
504  //returns true if successful
505  bool raiseItem( QgsComposerItem *item );
506  void lowerSelectedItems();
507  //returns true if successful
508  bool lowerItem( QgsComposerItem *item );
509  void moveSelectedItemsToTop();
510  //returns true if successful
511  bool moveItemToTop( QgsComposerItem *item );
512  void moveSelectedItemsToBottom();
513  //returns true if successful
514  bool moveItemToBottom( QgsComposerItem *item );
515 
516  //functions to find items by their position in the z list
517  void selectNextByZOrder( const ZValueDirection direction );
518  QgsComposerItem *getComposerItemBelow( QgsComposerItem *item ) const;
519  QgsComposerItem *getComposerItemAbove( QgsComposerItem *item ) const;
520 
521  //functions to align selected items
522  void alignSelectedItemsLeft();
523  void alignSelectedItemsHCenter();
524  void alignSelectedItemsRight();
525  void alignSelectedItemsTop();
526  void alignSelectedItemsVCenter();
527  void alignSelectedItemsBottom();
528 
529  //functions to lock and unlock items
531  void lockSelectedItems();
533  void unlockAllItems();
534 
540  QgsComposerItemGroup *groupItems( QList<QgsComposerItem *> items );
541 
549  QList<QgsComposerItem *> ungroupItems( QgsComposerItemGroup *group );
550 
554  void refreshZList();
555 
557  QPointF snapPointToGrid( QPointF scenePoint ) const;
558 
560  QList< QGraphicsLineItem * > *snapLines() {return &mSnapLines;}
561 
565  QgsComposerMouseHandles *selectionHandles() {return mSelectionHandles;} SIP_SKIP
566 
568  QGraphicsLineItem *addSnapLine();
570  void removeSnapLine( QGraphicsLineItem *line );
571 
575  QGraphicsLineItem *nearestSnapLine( const bool horizontal, const double x, const double y, const double tolerance, QList< QPair< QgsComposerItem *, QgsComposerItem::ItemPositionMode > > &snappedItems ) const SIP_SKIP;
576 
582  void beginCommand( QgsComposerItem *item, const QString &commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
583 
585  void endCommand();
587  void cancelCommand();
588 
589  void beginMultiFrameCommand( QgsComposerMultiFrame *multiFrame, const QString &text, const QgsComposerMultiFrameMergeCommand::Context c = QgsComposerMultiFrameMergeCommand::Unknown );
590  void endMultiFrameCommand();
592  void cancelMultiFrameCommand();
593 
595  void addMultiFrame( QgsComposerMultiFrame *multiFrame );
597  void removeMultiFrame( QgsComposerMultiFrame *multiFrame );
598 
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 SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );
620  void addComposerTableFrame( QgsComposerAttributeTableV2 *table SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );
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; } SIP_SKIP
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 ) SIP_SKIP
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 SIP_SKIP
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:44
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:119
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 (...
#define SIP_TRANSFER
Definition: qgis_sip.h:36
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:79
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:51
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.