QGIS API Documentation  2.99.0-Master (c4aa4d0)
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 
25 #define SIP_NO_FILE
26 
27 #include <QDomDocument>
28 #include <QGraphicsScene>
29 #include <QLinkedList>
30 #include <QList>
31 #include <QPair>
32 #include <QSet>
33 #include <QUndoStack>
34 #include <QPrinter>
35 #include <QPainter>
36 
38 #include "qgscomposeritemcommand.h"
40 #include "qgsatlascomposition.h"
41 #include "qgscomposerobject.h"
42 #include "qgscomposeritem.h" // required for nested name
44 
45 class QgisApp;
46 class QgsComposerFrame;
47 class QgsComposerMap;
48 class QGraphicsRectItem;
49 class QDomElement;
50 class QgsComposerArrow;
51 class QgsComposerPolygon;
54 class QgsComposerHtml;
55 class QgsComposerTableV2;
56 class QgsComposerItem;
58 class QgsComposerLabel;
59 class QgsComposerLegend;
60 class QgsComposerMap;
61 class QgsComposerPicture;
63 class QgsComposerShape;
67 class QgsVectorLayer;
68 class QgsComposer;
69 class QgsFillSymbol;
70 class QgsComposerModel;
71 class QgsPaperItem;
72 
82 class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionContextGenerator
83 {
84  Q_OBJECT
85  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
86 
87  public:
88 
90  enum PlotStyle
91  {
92  Preview = 0, // Use cache etc
93  Print, // Render well
94  Postscript // Fonts need different scaling!
95  };
96 
98  enum GridStyle
99  {
102  Crosses
103  };
104 
106  {
108  ZValueAbove
109  };
110 
112  {
114  Landscape
115  };
116 
120  explicit QgsComposition( QgsProject *project );
121 
124  {
125  AtlasOff, // Composition is not being controlled by an atlas
126  PreviewAtlas, // An atlas composition is being previewed in the app
127  ExportAtlas // The composition is being exported as an atlas
128  };
129 
130  ~QgsComposition() override;
131 
138  QgsProject *project() const;
139 
145  QString name() const { return mName; }
146 
152  void setName( const QString &name );
153 
163  void setPaperSize( double width, double height,
164  bool keepRelativeItemPosition = true );
165 
172  double paperHeight() const;
173 
180  double paperWidth() const;
181 
196  void resizePageToContents( double marginTop = 0.0, double marginRight = 0.0,
197  double marginBottom = 0.0, double marginLeft = 0.0 );
198 
210  void setResizeToContentsMargins( double marginTop, double marginRight,
211  double marginBottom, double marginLeft );
212 
224  void resizeToContentsMargins( double &marginTop SIP_OUT, double &marginRight SIP_OUT,
225  double &marginBottom SIP_OUT, double &marginLeft SIP_OUT ) const;
226 
231  double spaceBetweenPages() const { return mSpaceBetweenPages; }
232 
238  void setNumPages( const int pages );
239 
245  int numPages() const;
246 
257  bool pageIsEmpty( const int page ) const;
258 
267  bool shouldExportPage( const int page ) const;
268 
270  void setPageStyleSymbol( QgsFillSymbol *symbol );
272  QgsFillSymbol *pageStyleSymbol() { return mPageStyleSymbol; }
273 
278  QPointF positionOnPage( QPointF position ) const;
279 
284  int pageNumberForPoint( QPointF position ) const;
285 
290  void setStatusMessage( const QString &message );
291 
296  void updateSettings();
297 
298  void setSnapToGridEnabled( const bool b );
299  bool snapToGridEnabled() const {return mSnapToGrid;}
300 
301  void setGridVisible( const bool b );
302  bool gridVisible() const {return mGridVisible;}
303 
305  void setSnapLinesVisible( const bool visible );
306  bool snapLinesVisible() const {return mGuidesVisible;}
307 
308  void setAlignmentSnap( const bool s ) { mAlignmentSnap = s; }
309  bool alignmentSnap() const { return mAlignmentSnap; }
310 
311  void setSmartGuidesEnabled( const bool b ) { mSmartGuides = b; }
312  bool smartGuidesEnabled() const {return mSmartGuides;}
313 
322  void setPagesVisible( bool visible );
323 
331  bool pagesVisible() const { return mPagesVisible; }
332 
334  void clearSnapLines();
335 
336  void setSnapGridResolution( const double r );
337  double snapGridResolution() const {return mSnapGridResolution;}
338 
339  void setSnapGridOffsetX( const double offset );
340  double snapGridOffsetX() const {return mSnapGridOffsetX;}
341 
342  void setSnapGridOffsetY( const double offset );
343  double snapGridOffsetY() const {return mSnapGridOffsetY;}
344 
345  void setGridPen( const QPen &p );
346  QPen gridPen() const {return mGridPen;}
347 
348  void setGridStyle( const GridStyle s );
349  GridStyle gridStyle() const {return mGridStyle;}
350 
358  void setSnapTolerance( const int snapTolerance ) { mSnapTolerance = snapTolerance; }
359 
367  int snapTolerance() const { return mSnapTolerance; }
368 
375  void setBoundingBoxesVisible( const bool boundsVisible );
376 
383  bool boundingBoxesVisible() const { return mBoundingBoxesVisible; }
384 
386  QUndoStack *undoStack() { return mUndoStack; }
387 
394  QgsComposerItem *composerItemAt( QPointF position, const bool ignoreLocked = false ) const;
395 
403  QgsComposerItem *composerItemAt( QPointF position, const QgsComposerItem *belowItem, const bool ignoreLocked = false ) const;
404 
406  int pageNumberAt( QPointF position ) const;
407 
409  int itemPageNumber( const QgsComposerItem * ) const;
410 
416  QList<QgsComposerItem *> selectedComposerItems( const bool includeLockedItems = true );
417 
422  QList<const QgsComposerMap *> composerMapItems() const;
423 
429  template<class T> void composerItems( QList<T *> &itemList ) SIP_SKIP;
430 
438  template<class T> void composerItemsOnPage( QList<T *> &itemList, const int pageNumber ) const SIP_SKIP;
439 
444  const QgsComposerMap *getComposerMapById( const int id ) const;
445 
452  const QgsComposerItem *getComposerItemById( const QString &id ) const;
453 
458  const QgsComposerItem *getComposerItemByUuid( const QString &uuid ) const;
459 
460  int printResolution() const {return mPrintResolution;}
461  void setPrintResolution( const int dpi );
462 
463  bool printAsRaster() const {return mPrintAsRaster;}
464  void setPrintAsRaster( const bool enabled ) { mPrintAsRaster = enabled; }
465 
472  bool generateWorldFile() const { return mGenerateWorldFile; }
473 
481  void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enabled; }
482 
490  QgsComposerMap *referenceMap() const;
491 
499  void setReferenceMap( QgsComposerMap *map );
500 
502  bool useAdvancedEffects() const {return mUseAdvancedEffects;}
504  void setUseAdvancedEffects( const bool effectsEnabled );
505 
506  QgsComposition::PlotStyle plotStyle() const { return mPlotStyle; }
507  void setPlotStyle( const QgsComposition::PlotStyle style ) { mPlotStyle = style; }
508 
510  bool writeXml( QDomElement &composerElem, QDomDocument &doc );
511 
513  bool readXml( const QDomElement &compositionElem, const QDomDocument &doc );
514 
524  bool loadFromTemplate( const QDomDocument &doc, QMap<QString, QString> *substitutionMap = nullptr,
525  bool addUndoCommands = false, const bool clearComposition = true );
526 
535  void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc,
536  bool addUndoCommands = false, QPointF *pos = nullptr, bool pasteInPlace = false );
537 
539  void addItemToZList( QgsComposerItem *item );
541  void removeItemFromZList( QgsComposerItem *item );
542 
543  //functions to move selected items in hierarchy
544  void raiseSelectedItems();
545 
546  //returns true if successful
547  bool raiseItem( QgsComposerItem *item );
548  void lowerSelectedItems();
549  //returns true if successful
550  bool lowerItem( QgsComposerItem *item );
551  void moveSelectedItemsToTop();
552  //returns true if successful
553  bool moveItemToTop( QgsComposerItem *item );
554  void moveSelectedItemsToBottom();
555  //returns true if successful
556  bool moveItemToBottom( QgsComposerItem *item );
557 
558  //functions to find items by their position in the z list
559  void selectNextByZOrder( const ZValueDirection direction );
560  QgsComposerItem *getComposerItemBelow( QgsComposerItem *item ) const;
561  QgsComposerItem *getComposerItemAbove( QgsComposerItem *item ) const;
562 
563  //functions to align selected items
564  void alignSelectedItemsLeft();
565  void alignSelectedItemsHCenter();
566  void alignSelectedItemsRight();
567  void alignSelectedItemsTop();
568  void alignSelectedItemsVCenter();
569  void alignSelectedItemsBottom();
570 
571  //functions to lock and unlock items
573  void lockSelectedItems();
575  void unlockAllItems();
576 
583  QgsComposerItemGroup *groupItems( QList<QgsComposerItem *> items );
584 
593  QList<QgsComposerItem *> ungroupItems( QgsComposerItemGroup *group );
594 
599  void refreshZList();
600 
602  QPointF snapPointToGrid( QPointF scenePoint ) const;
603 
605  QList< QGraphicsLineItem * > *snapLines() {return &mSnapLines;}
606 
611  QgsComposerMouseHandles *selectionHandles() {return mSelectionHandles;} SIP_SKIP
612 
614  QGraphicsLineItem *addSnapLine();
616  void removeSnapLine( QGraphicsLineItem *line );
617 
622  QGraphicsLineItem *nearestSnapLine( const bool horizontal, const double x, const double y, const double tolerance, QList< QPair< QgsComposerItem *, QgsComposerItem::ItemPositionMode > > &snappedItems ) const SIP_SKIP;
623 
630  void beginCommand( QgsComposerItem *item, const QString &commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
631 
633  void endCommand();
635  void cancelCommand();
636 
637  void beginMultiFrameCommand( QgsComposerMultiFrame *multiFrame, const QString &text, const QgsComposerMultiFrameMergeCommand::Context c = QgsComposerMultiFrameMergeCommand::Unknown );
638  void endMultiFrameCommand();
640  void cancelMultiFrameCommand();
641 
643  void addMultiFrame( QgsComposerMultiFrame *multiFrame );
645  void removeMultiFrame( QgsComposerMultiFrame *multiFrame );
646 
648  void addComposerArrow( QgsComposerArrow *arrow );
650  void addComposerLabel( QgsComposerLabel *label );
652  void addComposerMap( QgsComposerMap *map );
654  void addComposerScaleBar( QgsComposerScaleBar *scaleBar );
656  void addComposerLegend( QgsComposerLegend *legend );
658  void addComposerPicture( QgsComposerPicture *picture );
660  void addComposerShape( QgsComposerShape *shape );
662  void addComposerPolygon( QgsComposerPolygon *polygon );
664  void addComposerPolyline( QgsComposerPolyline *polyline );
666  void addComposerHtmlFrame( QgsComposerHtml *html SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );
668  void addComposerTableFrame( QgsComposerAttributeTableV2 *table SIP_TRANSFER, QgsComposerFrame *frame SIP_TRANSFER );
669 
671  void removeComposerItem( QgsComposerItem *item, const bool createCommand = true, const bool removeGroupItems = true );
672 
674  void pushAddRemoveCommand( QgsComposerItem *item, const QString &text, const QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
675 
680  void setPreventCursorChange( const bool preventChange ) { mPreventCursorChange = preventChange; }
681  bool preventCursorChange() const { return mPreventCursorChange; }
682 
683 #ifndef QT_NO_PRINTER
684  //printing
686  void beginPrint( QPrinter &printer, const bool evaluateDDPageSize = false );
688  void beginPrintAsPDF( QPrinter &printer, const QString &file );
689 
696  void doPrint( QPrinter &printer, QPainter &painter, bool startNewPage = false );
697 
702  bool print( QPrinter &printer, const bool evaluateDDPageSize = false );
703 
708  bool exportAsPDF( const QString &file );
709 #endif
710 
723  QImage printPageAsRaster( int page, QSize imageSize = QSize(), int dpi = 0 );
724 
739  QImage renderRectAsRaster( const QRectF &rect, QSize imageSize = QSize(), int dpi = 0 );
740 
748  void renderPage( QPainter *p, int page );
749 
759  void renderRect( QPainter *p, const QRectF &rect );
760 
771  void georeferenceOutput( const QString &file, QgsComposerMap *referenceMap = nullptr,
772  const QRectF &exportRegion = QRectF(), double dpi = -1 ) const;
773 
778  void computeWorldFileParameters( double &a, double &b, double &c, double &d, double &e, double &f ) const;
779 
791  void computeWorldFileParameters( const QRectF &exportRegion, double &a, double &b, double &c, double &d, double &e, double &f ) const;
792 
793  QgsAtlasComposition &atlasComposition() { return mAtlasComposition; }
794 
800  QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; }
801 
808  bool setAtlasMode( const QgsComposition::AtlasMode mode );
809 
815  QList< QgsPaperItem * > pages() { return mPages; }
816 
822  QgsComposerModel *itemsModel() { return mItemsModel; }
823 
833  void setCustomProperty( const QString &key, const QVariant &value );
834 
845  QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const;
846 
855  void removeCustomProperty( const QString &key );
856 
864  QStringList customProperties() const;
865 
872  QRectF pageItemBounds( int pageNumber, bool visibleOnly = false ) const;
873 
879  QRectF compositionBounds( bool ignorePages = false, double margin = 0.0 ) const;
880 
887 
893  QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
894 
900  const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; } SIP_SKIP
901 
902  public slots:
904  void sendItemAddedSignal( QgsComposerItem *item );
905 
909  void updateBounds();
910 
917  void refreshItems();
918 
923  void setSelectedItem( QgsComposerItem *item );
924 
930  void setAllDeselected();
931 
941  void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = nullptr );
942 
949  void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
950 
951  protected:
952  void init();
953 
954 
955  private:
956 
958  QgsProject *mProject = nullptr;
959 
960  QString mName;
961 
962  QgsComposition::PlotStyle mPlotStyle;
963  double mPageWidth;
964  double mPageHeight;
965  QList< QgsPaperItem * > mPages;
966  double mSpaceBetweenPages; //space in preview between pages
967 
969  QgsFillSymbol *mPageStyleSymbol = nullptr;
970  void createDefaultPageStyleSymbol();
971 
973  QSet<QgsComposerMultiFrame *> mMultiFrames;
974 
976  int mPrintResolution;
977 
979  bool mPrintAsRaster;
980 
982  bool mGenerateWorldFile;
983 
985  QString mWorldFileMapId;
986 
988  bool mUseAdvancedEffects;
989 
991  bool mSnapToGrid;
992  bool mGridVisible;
993  double mSnapGridResolution;
994  double mSnapGridOffsetX;
995  double mSnapGridOffsetY;
996  QPen mGridPen;
997  GridStyle mGridStyle;
998 
1000  bool mAlignmentSnap;
1001  bool mGuidesVisible;
1002  bool mSmartGuides;
1003  int mSnapTolerance;
1004 
1006  QList< QGraphicsLineItem * > mSnapLines;
1007 
1008  double mResizeToContentsMarginTop;
1009  double mResizeToContentsMarginRight;
1010  double mResizeToContentsMarginBottom;
1011  double mResizeToContentsMarginLeft;
1012 
1013  bool mBoundingBoxesVisible;
1014  bool mPagesVisible;
1015  QgsComposerMouseHandles *mSelectionHandles = nullptr;
1016 
1017  QUndoStack *mUndoStack = nullptr;
1018 
1019  QgsComposerItemCommand *mActiveItemCommand = nullptr;
1020  QgsComposerMultiFrameCommand *mActiveMultiFrameCommand = nullptr;
1021 
1023  QgsAtlasComposition mAtlasComposition;
1024 
1025  QgsComposition::AtlasMode mAtlasMode;
1026 
1027  bool mPreventCursorChange;
1028 
1029  QgsComposerModel *mItemsModel = nullptr;
1030 
1031  QgsPropertyCollection mDataDefinedProperties;
1032 
1033  QgsObjectCustomProperties mCustomProperties;
1034 
1035  QgsComposition(); //default constructor is forbidden
1036 
1038  void updateZValues( const bool addUndoCommands = true );
1039 
1043  int boundingRectOfSelectedItems( QRectF &bRect );
1044 
1046  void loadDefaults();
1047 
1049  void loadSettings();
1050 
1052  QPointF minPointFromXml( const QDomElement &elem ) const;
1053 
1054  void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand *c );
1055 
1056  void updatePaperItems();
1057  void addPaperItem();
1058  void removePaperItems();
1059  void deleteAndRemoveMultiFrames();
1060 
1061  static QString encodeStringForXml( const QString &str );
1062 
1063  //tries to return the current QGraphicsView attached to the composition
1064  QGraphicsView *graphicsView() const;
1065 
1070  void refreshPageSize( const QgsExpressionContext *context = nullptr );
1071 
1077  bool ddPageSizeActive() const;
1078 
1088  double *computeGeoTransform( const QgsComposerMap *referenceMap = nullptr, const QRectF &exportRegion = QRectF(), double dpi = -1 ) const;
1089 
1090 
1091  private slots:
1092  /*Prepares all data defined expressions*/
1093  void prepareAllDataDefinedExpressions();
1094 
1095  signals:
1096 
1102  void nameChanged( const QString &name );
1103 
1104  void paperSizeChanged();
1105  void nPagesChanged();
1106 
1108  void printResolutionChanged();
1109 
1111  void selectedItemChanged( QgsComposerItem *selected );
1112 
1117  void itemAdded( QgsComposerItem *item );
1118 
1120  void composerItemGroupAdded( QgsComposerItemGroup *group );
1121 
1123  void itemRemoved( QgsComposerItem * );
1124 
1126  void refreshItemsTriggered();
1127 
1129  void statusMsgChanged( const QString &message );
1130 
1135  void variablesChanged();
1136 
1137  friend class QgsComposerModel; //for accessing updateZValues (should not be public)
1138  friend class TestQgsComposition;
1139 };
1140 
1141 template<class T> void QgsComposition::composerItems( QList<T *> &itemList ) SIP_SKIP
1142 {
1143  itemList.clear();
1144  QList<QGraphicsItem *> graphicsItemList = items();
1145  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1146  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1147  {
1148  T *item = dynamic_cast<T *>( *itemIt );
1149  if ( item )
1150  {
1151  itemList.push_back( item );
1152  }
1153  }
1154 }
1155 
1156 template<class T> void QgsComposition::composerItemsOnPage( QList<T *> &itemList, const int pageNumber ) const SIP_SKIP
1157 {
1158  itemList.clear();
1159  QList<QGraphicsItem *> graphicsItemList = items();
1160  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
1161  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
1162  {
1163  T *item = dynamic_cast<T *>( *itemIt );
1164  if ( item && itemPageNumber( item ) == pageNumber )
1165  {
1166  itemList.push_back( item );
1167  }
1168  }
1169 }
1170 
1171 
1172 #endif
1173 
1174 
1175 
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:51
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:82
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.