QGIS API Documentation  2.99.0-Master (08c2e66)
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 : blazek@itc.it
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  public:
78 
80  enum PlotStyle
81  {
82  Preview = 0, // Use cache etc
83  Print, // Render well
84  Postscript // Fonts need different scaling!
85  };
86 
88  enum GridStyle
89  {
92  Crosses
93  };
94 
96  {
98  ZValueAbove
99  };
100 
102  {
104  Landscape
105  };
106 
110  explicit QgsComposition( QgsProject* project );
111 
114  {
115  AtlasOff, // Composition is not being controlled by an atlas
116  PreviewAtlas, // An atlas composition is being previewed in the app
117  ExportAtlas // The composition is being exported as an atlas
118  };
119 
120  ~QgsComposition();
121 
128  QgsProject* project() const;
129 
138  void setPaperSize( double width, double height,
139  bool keepRelativeItemPosition = true );
140 
146  double paperHeight() const;
147 
153  double paperWidth() const;
154 
168  void resizePageToContents( double marginTop = 0.0, double marginRight = 0.0,
169  double marginBottom = 0.0, double marginLeft = 0.0 );
170 
181  void setResizeToContentsMargins( double marginTop, double marginRight,
182  double marginBottom, double marginLeft );
183 
194  void resizeToContentsMargins( double& marginTop, double& marginRight,
195  double& marginBottom, double& marginLeft ) const;
196 
200  double spaceBetweenPages() const { return mSpaceBetweenPages; }
201 
206  void setNumPages( const int pages );
207 
212  int numPages() const;
213 
223  bool pageIsEmpty( const int page ) const;
224 
232  bool shouldExportPage( const int page ) const;
233 
235  void setPageStyleSymbol( QgsFillSymbol* symbol );
237  QgsFillSymbol* pageStyleSymbol() { return mPageStyleSymbol; }
238 
242  QPointF positionOnPage( QPointF position ) const;
243 
247  int pageNumberForPoint( QPointF position ) const;
248 
252  void setStatusMessage( const QString & message );
253 
257  void updateSettings();
258 
259  void setSnapToGridEnabled( const bool b );
260  bool snapToGridEnabled() const {return mSnapToGrid;}
261 
262  void setGridVisible( const bool b );
263  bool gridVisible() const {return mGridVisible;}
264 
266  void setSnapLinesVisible( const bool visible );
267  bool snapLinesVisible() const {return mGuidesVisible;}
268 
269  void setAlignmentSnap( const bool s ) { mAlignmentSnap = s; }
270  bool alignmentSnap() const { return mAlignmentSnap; }
271 
272  void setSmartGuidesEnabled( const bool b ) { mSmartGuides = b; }
273  bool smartGuidesEnabled() const {return mSmartGuides;}
274 
282  void setPagesVisible( bool visible );
283 
290  bool pagesVisible() const { return mPagesVisible; }
291 
293  void clearSnapLines();
294 
295  void setSnapGridResolution( const double r );
296  double snapGridResolution() const {return mSnapGridResolution;}
297 
298  void setSnapGridOffsetX( const double offset );
299  double snapGridOffsetX() const {return mSnapGridOffsetX;}
300 
301  void setSnapGridOffsetY( const double offset );
302  double snapGridOffsetY() const {return mSnapGridOffsetY;}
303 
304  void setGridPen( const QPen& p );
305  QPen gridPen() const {return mGridPen;}
306 
307  void setGridStyle( const GridStyle s );
308  GridStyle gridStyle() const {return mGridStyle;}
309 
316  void setSnapTolerance( const int snapTolerance ) { mSnapTolerance = snapTolerance; }
317 
324  int snapTolerance() const { return mSnapTolerance; }
325 
331  void setBoundingBoxesVisible( const bool boundsVisible );
332 
338  bool boundingBoxesVisible() const { return mBoundingBoxesVisible; }
339 
341  QUndoStack* undoStack() { return mUndoStack; }
342 
348  QgsComposerItem* composerItemAt( QPointF position, const bool ignoreLocked = false ) const;
349 
356  QgsComposerItem* composerItemAt( QPointF position, const QgsComposerItem* belowItem, const bool ignoreLocked = false ) const;
357 
359  int pageNumberAt( QPointF position ) const;
360 
362  int itemPageNumber( const QgsComposerItem* ) const;
363 
368  QList<QgsComposerItem*> selectedComposerItems( const bool includeLockedItems = true );
369 
373  QList<const QgsComposerMap*> composerMapItems() const;
374 
379  template<class T> void composerItems( QList<T*>& itemList );
380 
387  template<class T> void composerItemsOnPage( QList<T*>& itemList, const int pageNumber ) const;
388 
392  const QgsComposerMap* getComposerMapById( const int id ) const;
393 
399  const QgsComposerItem* getComposerItemById( const QString& id ) const;
400 
404  const QgsComposerItem* getComposerItemByUuid( const QString& uuid ) const;
405 
406  int printResolution() const {return mPrintResolution;}
407  void setPrintResolution( const int dpi );
408 
409  bool printAsRaster() const {return mPrintAsRaster;}
410  void setPrintAsRaster( const bool enabled ) { mPrintAsRaster = enabled; }
411 
417  bool generateWorldFile() const { return mGenerateWorldFile; }
418 
425  void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enabled; }
426 
433  QgsComposerMap* referenceMap() const;
434 
441  void setReferenceMap( QgsComposerMap* map );
442 
444  bool useAdvancedEffects() const {return mUseAdvancedEffects;}
446  void setUseAdvancedEffects( const bool effectsEnabled );
447 
448  QgsComposition::PlotStyle plotStyle() const { return mPlotStyle; }
449  void setPlotStyle( const QgsComposition::PlotStyle style ) { mPlotStyle = style; }
450 
452  bool writeXml( QDomElement& composerElem, QDomDocument& doc );
453 
455  bool readXml( const QDomElement& compositionElem, const QDomDocument& doc );
456 
465  bool loadFromTemplate( const QDomDocument& doc, QMap<QString, QString>* substitutionMap = nullptr,
466  bool addUndoCommands = false, const bool clearComposition = true );
467 
477  void addItemsFromXml( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = nullptr,
478  bool addUndoCommands = false, QPointF* pos = nullptr, bool pasteInPlace = false );
479 
481  void addItemToZList( QgsComposerItem* item );
483  void removeItemFromZList( QgsComposerItem* item );
484 
485  //functions to move selected items in hierarchy
486  void raiseSelectedItems();
487 
488  //returns true if successful
489  bool raiseItem( QgsComposerItem* item );
490  void lowerSelectedItems();
491  //returns true if successful
492  bool lowerItem( QgsComposerItem* item );
493  void moveSelectedItemsToTop();
494  //returns true if successful
495  bool moveItemToTop( QgsComposerItem* item );
496  void moveSelectedItemsToBottom();
497  //returns true if successful
498  bool moveItemToBottom( QgsComposerItem* item );
499 
500  //functions to find items by their position in the z list
501  void selectNextByZOrder( const ZValueDirection direction );
502  QgsComposerItem* getComposerItemBelow( QgsComposerItem* item ) const;
503  QgsComposerItem* getComposerItemAbove( QgsComposerItem* item ) const;
504 
505  //functions to align selected items
506  void alignSelectedItemsLeft();
507  void alignSelectedItemsHCenter();
508  void alignSelectedItemsRight();
509  void alignSelectedItemsTop();
510  void alignSelectedItemsVCenter();
511  void alignSelectedItemsBottom();
512 
513  //functions to lock and unlock items
515  void lockSelectedItems();
517  void unlockAllItems();
518 
524  QgsComposerItemGroup* groupItems( QList<QgsComposerItem*> items );
525 
533  QList<QgsComposerItem*> ungroupItems( QgsComposerItemGroup* group );
534 
538  void refreshZList();
539 
541  QPointF snapPointToGrid( QPointF scenePoint ) const;
542 
544  QList< QGraphicsLineItem* >* snapLines() {return &mSnapLines;}
545 
549  QgsComposerMouseHandles* selectionHandles() {return mSelectionHandles;}
550 
552  QGraphicsLineItem* addSnapLine();
554  void removeSnapLine( QGraphicsLineItem* line );
555 
559  QGraphicsLineItem* nearestSnapLine( const bool horizontal, const double x, const double y, const double tolerance, QList< QPair< QgsComposerItem*, QgsComposerItem::ItemPositionMode > >& snappedItems ) const;
560 
566  void beginCommand( QgsComposerItem* item, const QString& commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
567 
569  void endCommand();
571  void cancelCommand();
572 
573  void beginMultiFrameCommand( QgsComposerMultiFrame* multiFrame, const QString& text, const QgsComposerMultiFrameMergeCommand::Context c = QgsComposerMultiFrameMergeCommand::Unknown );
574  void endMultiFrameCommand();
576  void cancelMultiFrameCommand();
577 
579  void addMultiFrame( QgsComposerMultiFrame* multiFrame );
581  void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
582 
585  void addComposerArrow( QgsComposerArrow* arrow );
587  void addComposerLabel( QgsComposerLabel* label );
589  void addComposerMap( QgsComposerMap* map, const bool setDefaultPreviewStyle = true );
591  void addComposerScaleBar( QgsComposerScaleBar* scaleBar );
593  void addComposerLegend( QgsComposerLegend* legend );
595  void addComposerPicture( QgsComposerPicture* picture );
597  void addComposerShape( QgsComposerShape* shape );
599  void addComposerPolygon( QgsComposerPolygon* polygon );
601  void addComposerPolyline( QgsComposerPolyline* polyline );
603  void addComposerHtmlFrame( QgsComposerHtml* html, QgsComposerFrame* frame );
605  void addComposerTableFrame( QgsComposerAttributeTableV2* table, QgsComposerFrame* frame );
606 
608  void removeComposerItem( QgsComposerItem* item, const bool createCommand = true, const bool removeGroupItems = true );
609 
611  void pushAddRemoveCommand( QgsComposerItem* item, const QString& text, const QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
612 
616  void setPreventCursorChange( const bool preventChange ) { mPreventCursorChange = preventChange; }
617  bool preventCursorChange() const { return mPreventCursorChange; }
618 
619 #ifndef QT_NO_PRINTER
620  //printing
622  void beginPrint( QPrinter& printer, const bool evaluateDDPageSize = false );
624  void beginPrintAsPDF( QPrinter& printer, const QString& file );
625 
631  void doPrint( QPrinter& printer, QPainter& painter, bool startNewPage = false );
632 
636  bool print( QPrinter &printer, const bool evaluateDDPageSize = false );
637 
641  bool exportAsPDF( const QString& file );
642 #endif
643 
655  QImage printPageAsRaster( int page, QSize imageSize = QSize(), int dpi = 0 );
656 
670  QImage renderRectAsRaster( const QRectF& rect, QSize imageSize = QSize(), int dpi = 0 );
671 
678  void renderPage( QPainter* p, int page );
679 
688  void renderRect( QPainter* p, const QRectF& rect );
689 
699  void georeferenceOutput( const QString& file, QgsComposerMap* referenceMap = nullptr,
700  const QRectF& exportRegion = QRectF(), double dpi = -1 ) const;
701 
705  void computeWorldFileParameters( double& a, double& b, double& c, double& d, double& e, double& f ) const;
706 
717  void computeWorldFileParameters( const QRectF& exportRegion, double& a, double& b, double& c, double& d, double& e, double& f ) const;
718 
719  QgsAtlasComposition& atlasComposition() { return mAtlasComposition; }
720 
725  QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; }
726 
732  bool setAtlasMode( const QgsComposition::AtlasMode mode );
733 
738  QList< QgsPaperItem* > pages() { return mPages; }
739 
744  QgsComposerModel * itemsModel() { return mItemsModel; }
745 
754  void setCustomProperty( const QString &key, const QVariant &value );
755 
765  QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const;
766 
774  void removeCustomProperty( const QString &key );
775 
782  QStringList customProperties() const;
783 
789  QRectF pageItemBounds( int pageNumber, bool visibleOnly = false ) const;
790 
795  QRectF compositionBounds( bool ignorePages = false, double margin = 0.0 ) const;
796 
797  public slots:
799  void sendItemAddedSignal( QgsComposerItem* item );
800 
803  void updateBounds();
804 
810  void refreshItems();
811 
815  void setSelectedItem( QgsComposerItem* item );
816 
821  void setAllDeselected();
822 
831  void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext* context = nullptr );
832 
838 
843  QgsPropertyCollection& dataDefinedProperties() { return mDataDefinedProperties; }
844 
849  const QgsPropertyCollection& dataDefinedProperties() const { return mDataDefinedProperties; }
850 
856  void setDataDefinedProperties( const QgsPropertyCollection& collection ) { mDataDefinedProperties = collection; }
857 
858  protected:
859  void init();
860 
861 
862  private:
863 
865  QgsProject* mProject = nullptr;
866 
867  QgsComposition::PlotStyle mPlotStyle;
868  double mPageWidth;
869  double mPageHeight;
870  QList< QgsPaperItem* > mPages;
871  double mSpaceBetweenPages; //space in preview between pages
872 
874  QgsFillSymbol* mPageStyleSymbol = nullptr;
875  void createDefaultPageStyleSymbol();
876 
878  QSet<QgsComposerMultiFrame*> mMultiFrames;
879 
881  int mPrintResolution;
882 
884  bool mPrintAsRaster;
885 
887  bool mGenerateWorldFile;
888 
890  QString mWorldFileMapId;
891 
893  bool mUseAdvancedEffects;
894 
896  bool mSnapToGrid;
897  bool mGridVisible;
898  double mSnapGridResolution;
899  double mSnapGridOffsetX;
900  double mSnapGridOffsetY;
901  QPen mGridPen;
902  GridStyle mGridStyle;
903 
905  bool mAlignmentSnap;
906  bool mGuidesVisible;
907  bool mSmartGuides;
908  int mSnapTolerance;
909 
911  QList< QGraphicsLineItem* > mSnapLines;
912 
913  double mResizeToContentsMarginTop;
914  double mResizeToContentsMarginRight;
915  double mResizeToContentsMarginBottom;
916  double mResizeToContentsMarginLeft;
917 
918  bool mBoundingBoxesVisible;
919  bool mPagesVisible;
920  QgsComposerMouseHandles* mSelectionHandles = nullptr;
921 
922  QUndoStack* mUndoStack = nullptr;
923 
924  QgsComposerItemCommand* mActiveItemCommand = nullptr;
925  QgsComposerMultiFrameCommand* mActiveMultiFrameCommand = nullptr;
926 
928  QgsAtlasComposition mAtlasComposition;
929 
930  QgsComposition::AtlasMode mAtlasMode;
931 
932  bool mPreventCursorChange;
933 
934  QgsComposerModel * mItemsModel = nullptr;
935 
936  QgsPropertyCollection mDataDefinedProperties;
937 
938  QgsObjectCustomProperties mCustomProperties;
939 
940  QgsComposition(); //default constructor is forbidden
941 
943  void updateZValues( const bool addUndoCommands = true );
944 
947  int boundingRectOfSelectedItems( QRectF& bRect );
948 
950  void loadDefaults();
951 
953  void loadSettings();
954 
956  QPointF minPointFromXml( const QDomElement& elem ) const;
957 
958  void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c );
959 
960  void updatePaperItems();
961  void addPaperItem();
962  void removePaperItems();
963  void deleteAndRemoveMultiFrames();
964 
965  static QString encodeStringForXml( const QString& str );
966 
967  //tries to return the current QGraphicsView attached to the composition
968  QGraphicsView* graphicsView() const;
969 
973  void refreshPageSize( const QgsExpressionContext* context = nullptr );
974 
979  bool ddPageSizeActive() const;
980 
989  double* computeGeoTransform( const QgsComposerMap* referenceMap = nullptr, const QRectF& exportRegion = QRectF(), double dpi = -1 ) const;
990 
991 
992  private slots:
993  /*Prepares all data defined expressions*/
994  void prepareAllDataDefinedExpressions();
995 
996  signals:
997  void paperSizeChanged();
998  void nPagesChanged();
999 
1001  void printResolutionChanged();
1002 
1004  void selectedItemChanged( QgsComposerItem* selected );
1006  void composerArrowAdded( QgsComposerArrow* arrow );
1008  void composerPolygonAdded( QgsComposerPolygon* polygon );
1010  void composerPolylineAdded( QgsComposerPolyline* polyline );
1012  void composerHtmlFrameAdded( QgsComposerHtml* html, QgsComposerFrame* frame );
1014  void composerItemGroupAdded( QgsComposerItemGroup* group );
1016  void composerLabelAdded( QgsComposerLabel* label );
1018  void composerMapAdded( QgsComposerMap* map );
1020  void composerScaleBarAdded( QgsComposerScaleBar* scalebar );
1022  void composerLegendAdded( QgsComposerLegend* legend );
1024  void composerPictureAdded( QgsComposerPicture* picture );
1026  void composerShapeAdded( QgsComposerShape* shape );
1028  void composerTableFrameAdded( QgsComposerAttributeTableV2* table, QgsComposerFrame* frame );
1030  void itemRemoved( QgsComposerItem* );
1031 
1033  void refreshItemsTriggered();
1034 
1036  void statusMsgChanged( const QString& message );
1037 
1041  void variablesChanged();
1042 
1043  friend class QgsComposerModel; //for accessing updateZValues (should not be public)
1044  friend class TestQgsComposition;
1045 };
1046 
1047 template<class T> void QgsComposition::composerItems( QList<T*>& itemList )
1048 {
1049  itemList.clear();
1050  QList<QGraphicsItem *> graphicsItemList = items();
1051  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1052  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1053  {
1054  T* item = dynamic_cast<T*>( *itemIt );
1055  if ( item )
1056  {
1057  itemList.push_back( item );
1058  }
1059  }
1060 }
1061 
1062 template<class T> void QgsComposition::composerItemsOnPage( QList<T*>& itemList, const int pageNumber ) const
1063 {
1064  itemList.clear();
1065  QList<QGraphicsItem *> graphicsItemList = items();
1066  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1067  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1068  {
1069  T* item = dynamic_cast<T*>( *itemIt );
1070  if ( item && itemPageNumber( item ) == pageNumber )
1071  {
1072  itemList.push_back( item );
1073  }
1074  }
1075 }
1076 
1077 
1078 #endif
1079 
1080 
1081 
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.
QgsComposition::AtlasMode atlasMode() const
Returns the current atlas mode of the composition.
bool snapLinesVisible() const
bool boundingBoxesVisible() const
Returns whether selection bounding boxes should be shown in the composition.
Composer item for polylines.
void setPrintAsRaster(const bool enabled)
An item that draws an arrow between two points.
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)
QgsComposerMouseHandles * selectionHandles()
Returns pointer to selection handles.
bool smartGuidesEnabled() const
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 preventCursorChange() const
A container for grouping several QgsComposerItems.
double spaceBetweenPages() const
Returns the vertical space between pages in a composer view.
bool alignmentSnap() const
A table that displays attributes from a vector layer.
DataDefinedProperty
Data defined properties for different item types.
void composerItemsOnPage(QList< T * > &itemList, const int pageNumber) const
Return composer items of a specific type on a specified page.
A composer class that displays svg files or raster format (jpg, png, ...)
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...
int printResolution() const
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:74
void setAlignmentSnap(const bool s)
bool printAsRaster() const
Graphics scene for map printing.
bool snapToGridEnabled() const
Object representing map window.
Frame item for a composer multiframe item.
Abstract interface for generating an expression context.
GridStyle gridStyle() const
A model for items attached to a composition.
QList< QgsPaperItem * > pages()
Return pages in the correct order.
bool useAdvancedEffects() const
Returns true if a composition should use advanced effects such as blend modes.
A composer command class for adding / removing composer items.
double snapGridOffsetY() const
bool pagesVisible() const
Returns whether the page items are be visible in the composition.
double snapGridOffsetX() const
Undo command to undo/redo all composer item related changes.
int snapTolerance() const
Returns the snap tolerance to use when automatically snapping items during movement and resizing to g...
QgsFillSymbol * pageStyleSymbol()
Note: added in version 2.1.
A composer items that draws common shapes (ellipse, triangle, rectangle)
Composer item for polygons.
double snapGridResolution() const
AtlasMode
Composition atlas modes.
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.
bool gridVisible() const
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.
void composerItems(QList< T * > &itemList)
Return composer items of a specific type.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the composition&#39;s property collection, used for data defined overrides...
PlotStyle
Plot type.
bool generateWorldFile() const
Returns true if the composition will generate corresponding world files when pages are exported...
QgsComposition::PlotStyle plotStyle() const
Represents a vector layer which manages a vector based data sets.
A legend that can be placed onto a map composition.
QPen gridPen() const
All properties for item.
QList< QGraphicsLineItem * > * snapLines()
Returns pointer to snap lines collection.