QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 <memory>
20 
21 #include <QDomDocument>
22 #include <QGraphicsScene>
23 #include <QLinkedList>
24 #include <QList>
25 #include <QPair>
26 #include <QSet>
27 #include <QUndoStack>
28 #include <QPrinter>
29 #include <QPainter>
30 
32 #include "qgscomposeritemcommand.h"
34 #include "qgsatlascomposition.h"
35 #include "qgspaperitem.h"
36 #include "qgscomposerobject.h"
37 #include "qgscomposeritem.h"
38 
39 class QgisApp;
40 class QgsComposerFrame;
41 class QgsComposerMap;
42 class QGraphicsRectItem;
43 class QgsMapRenderer;
44 class QDomElement;
45 class QgsComposerArrow;
47 class QgsComposerHtml;
48 class QgsComposerTableV2;
49 class QgsComposerItem;
50 class QgsComposerLabel;
51 class QgsComposerLegend;
52 class QgsComposerMap;
53 class QgsComposerPicture;
55 class QgsComposerShape;
60 class QgsVectorLayer;
61 class QgsComposer;
62 class QgsFillSymbolV2;
63 class QgsDataDefined;
64 class QgsComposerModel;
65 
72 class CORE_EXPORT QgsComposition : public QGraphicsScene
73 {
74  Q_OBJECT
75  public:
76 
78  enum PlotStyle
79  {
80  Preview = 0, // Use cache etc
81  Print, // Render well
82  Postscript // Fonts need different scaling!
83  };
84 
86  enum GridStyle
87  {
90  Crosses
91  };
92 
94  {
96  ZValueAbove
97  };
98 
100  {
102  Landscape
103  };
104 
106  Q_DECL_DEPRECATED QgsComposition( QgsMapRenderer* mapRenderer );
107  explicit QgsComposition( const QgsMapSettings& mapSettings );
108 
111  {
112  AtlasOff, // Composition is not being controlled by an atlas
113  PreviewAtlas, // An atlas composition is being previewed in the app
114  ExportAtlas // The composition is being exported as an atlas
115  };
116 
117  ~QgsComposition();
118 
122  void setPaperSize( const double width, const double height );
123 
125  double paperHeight() const;
126 
128  double paperWidth() const;
129 
130  double spaceBetweenPages() const { return mSpaceBetweenPages; }
131 
133  void setNumPages( const int pages );
135  int numPages() const;
136 
138  void setPageStyleSymbol( QgsFillSymbolV2* symbol );
140  QgsFillSymbolV2* pageStyleSymbol() { return mPageStyleSymbol; }
141 
145  QPointF positionOnPage( const QPointF & position ) const;
146 
150  int pageNumberForPoint( const QPointF & position ) const;
151 
155  void setStatusMessage( const QString & message );
156 
160  void updateSettings();
161 
162  void setSnapToGridEnabled( const bool b );
163  bool snapToGridEnabled() const {return mSnapToGrid;}
164 
165  void setGridVisible( const bool b );
166  bool gridVisible() const {return mGridVisible;}
167 
169  void setSnapLinesVisible( const bool visible );
170  bool snapLinesVisible() const {return mGuidesVisible;}
171 
172  void setAlignmentSnap( const bool s ) { mAlignmentSnap = s; }
173  bool alignmentSnap() const { return mAlignmentSnap; }
174 
175  void setSmartGuidesEnabled( const bool b ) { mSmartGuides = b; }
176  bool smartGuidesEnabled() const {return mSmartGuides;}
177 
179  void clearSnapLines();
180 
181  void setSnapGridResolution( const double r );
182  double snapGridResolution() const {return mSnapGridResolution;}
183 
184  void setSnapGridOffsetX( const double offset );
185  double snapGridOffsetX() const {return mSnapGridOffsetX;}
186 
187  void setSnapGridOffsetY( const double offset );
188  double snapGridOffsetY() const {return mSnapGridOffsetY;}
189 
190  void setGridPen( const QPen& p );
191  const QPen& gridPen() const {return mGridPen;}
192 
193  void setGridStyle( const GridStyle s );
194  GridStyle gridStyle() const {return mGridStyle;}
195 
202  Q_DECL_DEPRECATED void setSnapGridTolerance( double tolerance ) { mSnapTolerance = tolerance; }
203 
210  Q_DECL_DEPRECATED double snapGridTolerance() const {return mSnapTolerance;}
211 
218  Q_DECL_DEPRECATED void setAlignmentSnapTolerance( double t ) { mSnapTolerance = t; }
219 
226  Q_DECL_DEPRECATED double alignmentSnapTolerance() const { return mSnapTolerance; }
227 
234  void setSnapTolerance( const int snapTolerance ) { mSnapTolerance = snapTolerance; }
235 
242  int snapTolerance() const { return mSnapTolerance; }
243 
245  QUndoStack* undoStack() { return mUndoStack; }
246 
252  QgsComposerItem* composerItemAt( const QPointF & position, const bool ignoreLocked = false ) const;
253 
260  QgsComposerItem* composerItemAt( const QPointF & position, const QgsComposerItem* belowItem, const bool ignoreLocked = false ) const;
261 
263  int pageNumberAt( const QPointF& position ) const;
264 
266  int itemPageNumber( const QgsComposerItem* ) const;
267 
272  QList<QgsComposerItem*> selectedComposerItems( const bool includeLockedItems = true );
273 
277  QList<const QgsComposerMap*> composerMapItems() const;
278 
282  template<class T> void composerItems( QList<T*>& itemList );
283 
286  const QgsComposerMap* getComposerMapById( const int id ) const;
287 
294  Q_DECL_DEPRECATED const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) const;
295 
303  const QgsComposerItem* getComposerItemById( const QString theId ) const;
304 
309  const QgsComposerItem* getComposerItemByUuid( const QString theUuid ) const;
310 
311  int printResolution() const {return mPrintResolution;}
312  void setPrintResolution( const int dpi );
313 
314  bool printAsRaster() const {return mPrintAsRaster;}
315  void setPrintAsRaster( const bool enabled ) { mPrintAsRaster = enabled; }
316 
317  bool generateWorldFile() const { return mGenerateWorldFile; }
318  void setGenerateWorldFile( const bool enabled ) { mGenerateWorldFile = enabled; }
319 
320  QgsComposerMap* worldFileMap() const { return mWorldFileMap; }
321  void setWorldFileMap( QgsComposerMap* map ) { mWorldFileMap = map; }
322 
325  bool useAdvancedEffects() const {return mUseAdvancedEffects;}
328  void setUseAdvancedEffects( const bool effectsEnabled );
329 
331  Q_DECL_DEPRECATED QgsMapRenderer* mapRenderer() {return mMapRenderer;}
333 
336  const QgsMapSettings& mapSettings() const { return mMapSettings; }
337 
338  QgsComposition::PlotStyle plotStyle() const {return mPlotStyle;}
339  void setPlotStyle( const QgsComposition::PlotStyle style ) {mPlotStyle = style;}
340 
345  Q_DECL_DEPRECATED int pixelFontSize( double pointSize ) const;
346 
350  Q_DECL_DEPRECATED double pointFontSize( int pixelSize ) const;
351 
353  bool writeXML( QDomElement& composerElem, QDomDocument& doc );
354 
356  bool readXML( const QDomElement& compositionElem, const QDomDocument& doc );
357 
366  bool loadFromTemplate( const QDomDocument& doc, QMap<QString, QString>* substitutionMap = 0,
367  bool addUndoCommands = false, const bool clearComposition = true );
368 
378  void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0,
379  bool addUndoCommands = false, QPointF* pos = 0, bool pasteInPlace = false );
380 
382  void addItemToZList( QgsComposerItem* item );
384  void removeItemFromZList( QgsComposerItem* item );
385 
386  //functions to move selected items in hierarchy
387  void raiseSelectedItems();
388 
389  //returns true if successful
390  bool raiseItem( QgsComposerItem* item );
391  void lowerSelectedItems();
392  //returns true if successful
393  bool lowerItem( QgsComposerItem* item );
394  void moveSelectedItemsToTop();
395  //returns true if successful
396  bool moveItemToTop( QgsComposerItem* item );
397  void moveSelectedItemsToBottom();
398  //returns true if successful
399  bool moveItemToBottom( QgsComposerItem* item );
400 
401  //functions to find items by their position in the z list
402  void selectNextByZOrder( const ZValueDirection direction );
403  QgsComposerItem* getComposerItemBelow( QgsComposerItem* item ) const;
404  QgsComposerItem* getComposerItemAbove( QgsComposerItem* item ) const;
405 
406  //functions to align selected items
407  void alignSelectedItemsLeft();
408  void alignSelectedItemsHCenter();
409  void alignSelectedItemsRight();
410  void alignSelectedItemsTop();
411  void alignSelectedItemsVCenter();
412  void alignSelectedItemsBottom();
413 
414  //functions to lock and unlock items
416  void lockSelectedItems();
418  void unlockAllItems();
419 
424  Q_DECL_DEPRECATED void sortZList() {};
425 
429  void refreshZList();
430 
432  QPointF snapPointToGrid( const QPointF& scenePoint ) const;
433 
435  QList< QGraphicsLineItem* >* snapLines() {return &mSnapLines;}
436 
440  QgsComposerMouseHandles* selectionHandles() {return mSelectionHandles;}
441 
443  QGraphicsLineItem* addSnapLine();
445  void removeSnapLine( QGraphicsLineItem* line );
449  QGraphicsLineItem* nearestSnapLine( const bool horizontal, const double x, const double y, const double tolerance, QList< QPair< QgsComposerItem*, QgsComposerItem::ItemPositionMode > >& snappedItems ) const;
450 
455  void beginCommand( QgsComposerItem* item, const QString& commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
456 
458  void endCommand();
460  void cancelCommand();
461 
462  void beginMultiFrameCommand( QgsComposerMultiFrame* multiFrame, const QString& text, const QgsComposerMultiFrameMergeCommand::Context c = QgsComposerMultiFrameMergeCommand::Unknown );
463  void endMultiFrameCommand();
465  void cancelMultiFrameCommand();
466 
468  void addMultiFrame( QgsComposerMultiFrame* multiFrame );
470  void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
473  void addComposerArrow( QgsComposerArrow* arrow );
475  void addComposerLabel( QgsComposerLabel* label );
477  void addComposerMap( QgsComposerMap* map, const bool setDefaultPreviewStyle = true );
479  void addComposerScaleBar( QgsComposerScaleBar* scaleBar );
481  void addComposerLegend( QgsComposerLegend* legend );
483  void addComposerPicture( QgsComposerPicture* picture );
485  void addComposerShape( QgsComposerShape* shape );
487  void addComposerTable( QgsComposerAttributeTable* table );
489  void addComposerHtmlFrame( QgsComposerHtml* html, QgsComposerFrame* frame );
491  void addComposerTableFrame( QgsComposerAttributeTableV2* table, QgsComposerFrame* frame );
492 
494  void removeComposerItem( QgsComposerItem* item, const bool createCommand = true, const bool removeGroupItems = true );
495 
497  void pushAddRemoveCommand( QgsComposerItem* item, const QString& text, const QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
498 
501  void setPreventCursorChange( const bool preventChange ) { mPreventCursorChange = preventChange; }
502  bool preventCursorChange() const { return mPreventCursorChange; }
503 
504  //printing
505 
507  void beginPrint( QPrinter& printer, const bool evaluateDDPageSize = false );
509  void beginPrintAsPDF( QPrinter& printer, const QString& file );
510 
516  void doPrint( QPrinter& printer, QPainter& painter, bool startNewPage = false );
517 
521  bool print( QPrinter &printer, const bool evaluateDDPageSize = false );
522 
526  bool exportAsPDF( const QString& file );
527 
530  QImage printPageAsRaster( int page );
531 
534  void renderPage( QPainter* p, int page );
535 
537  void computeWorldFileParameters( double& a, double& b, double& c, double& d, double& e, double& f ) const;
538 
539  QgsAtlasComposition& atlasComposition() { return mAtlasComposition; }
540 
544  Q_DECL_DEPRECATED static void relativeResizeRect( QRectF& rectToResize, const QRectF& boundsBefore, const QRectF& boundsAfter );
545 
549  Q_DECL_DEPRECATED static double relativePosition( double position, double beforeMin, double beforeMax, double afterMin, double afterMax );
550 
555  QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; }
556 
562  bool setAtlasMode( const QgsComposition::AtlasMode mode );
563 
567  QList< QgsPaperItem* > pages() { return mPages; }
568 
573  QgsDataDefined* dataDefinedProperty( const QgsComposerObject::DataDefinedProperty property );
574 
583  void setDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property, bool active, bool useExpression, const QString &expression, const QString &field );
584 
589  QgsComposerModel * itemsModel() { return mItemsModel; }
590 
591  public slots:
593  void sendItemAddedSignal( QgsComposerItem* item );
594 
597  void updateBounds();
598 
604  void refreshItems();
605 
609  void setSelectedItem( QgsComposerItem* item );
610 
615  void setAllUnselected();
616 
624  void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
625 
626  protected:
627  void init();
628 
629 
630  private:
632  QgsMapRenderer* mMapRenderer;
633  const QgsMapSettings& mMapSettings;
634 
635  QgsComposition::PlotStyle mPlotStyle;
636  double mPageWidth;
637  double mPageHeight;
638  QList< QgsPaperItem* > mPages;
639  double mSpaceBetweenPages; //space in preview between pages
640 
642  QgsFillSymbolV2* mPageStyleSymbol;
643  void createDefaultPageStyleSymbol();
644 
646  QSet<QgsComposerMultiFrame*> mMultiFrames;
647 
649  int mPrintResolution;
650 
652  bool mPrintAsRaster;
653 
655  bool mGenerateWorldFile;
657  QgsComposerMap* mWorldFileMap;
658 
660  bool mUseAdvancedEffects;
661 
663  bool mSnapToGrid;
664  bool mGridVisible;
665  double mSnapGridResolution;
666  double mSnapGridOffsetX;
667  double mSnapGridOffsetY;
668  QPen mGridPen;
669  GridStyle mGridStyle;
670 
672  bool mAlignmentSnap;
673  bool mGuidesVisible;
674  bool mSmartGuides;
675  int mSnapTolerance;
676 
678  QList< QGraphicsLineItem* > mSnapLines;
679 
680  QgsComposerMouseHandles* mSelectionHandles;
681 
682  QUndoStack* mUndoStack;
683 
684  QgsComposerItemCommand* mActiveItemCommand;
685  QgsComposerMultiFrameCommand* mActiveMultiFrameCommand;
686 
688  QgsAtlasComposition mAtlasComposition;
689 
690  QgsComposition::AtlasMode mAtlasMode;
691 
692  bool mPreventCursorChange;
693 
694  QgsComposerModel * mItemsModel;
695 
697  QMap< QgsComposerObject::DataDefinedProperty, QString > mDataDefinedNames;
699  QMap< QgsComposerObject::DataDefinedProperty, QgsDataDefined* > mDataDefinedProperties;
700 
701  QgsComposition(); //default constructor is forbidden
702 
704  QRectF compositionBounds() const;
705 
707  void updateZValues( const bool addUndoCommands = true );
708 
711  int boundingRectOfSelectedItems( QRectF& bRect );
712 
714  void loadDefaults();
715 
717  void loadSettings();
718 
720  QPointF minPointFromXml( const QDomElement& elem ) const;
721 
722  void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c );
723 
724  void updatePaperItems();
725  void addPaperItem();
726  void removePaperItems();
727  void deleteAndRemoveMultiFrames();
728 
729  static QString encodeStringForXML( const QString& str );
730 
731  //tries to return the current QGraphicsView attached to the composition
732  QGraphicsView* graphicsView() const;
733 
734  /*Recalculates the page size using data defined page settings*/
735  void refreshPageSize();
736 
744  bool dataDefinedEvaluate( QgsComposerObject::DataDefinedProperty property, QVariant &expressionValue,
745  QMap< QgsComposerObject::DataDefinedProperty, QgsDataDefined* >* dataDefinedProperties );
746 
754  QVariant dataDefinedValue( QgsComposerObject::DataDefinedProperty property, const QgsFeature *feature, const QgsFields *fields,
755  QMap<QgsComposerObject::DataDefinedProperty, QgsDataDefined *> *dataDefinedProperties );
756 
757 
763  void prepareDataDefinedExpression( QgsDataDefined *dd, QMap< QgsComposerObject::DataDefinedProperty, QgsDataDefined* >* dataDefinedProperties ) const;
764 
765  private slots:
766  /*Prepares all data defined expressions*/
767  void prepareAllDataDefinedExpressions();
768 
769  signals:
770  void paperSizeChanged();
771  void nPagesChanged();
772 
774  void printResolutionChanged();
775 
777  void selectedItemChanged( QgsComposerItem* selected );
779  void composerArrowAdded( QgsComposerArrow* arrow );
781  void composerHtmlFrameAdded( QgsComposerHtml* html, QgsComposerFrame* frame );
783  void composerLabelAdded( QgsComposerLabel* label );
785  void composerMapAdded( QgsComposerMap* map );
787  void composerScaleBarAdded( QgsComposerScaleBar* scalebar );
789  void composerLegendAdded( QgsComposerLegend* legend );
791  void composerPictureAdded( QgsComposerPicture* picture );
793  void composerShapeAdded( QgsComposerShape* shape );
795  void composerTableAdded( QgsComposerAttributeTable* table );
797  void composerTableFrameAdded( QgsComposerAttributeTableV2* table, QgsComposerFrame* frame );
799  void itemRemoved( QgsComposerItem* );
800 
802  void refreshItemsTriggered();
803 
805  void statusMsgChanged( QString message );
806 
807  friend class QgsComposerObject; //for accessing dataDefinedEvaluate, readDataDefinedPropertyMap and writeDataDefinedPropertyMap
808  friend class QgsComposerModel; //for accessing updateZValues (should not be public)
809 };
810 
811 template<class T> void QgsComposition::composerItems( QList<T*>& itemList )
812 {
813  itemList.clear();
814  QList<QGraphicsItem *> graphicsItemList = items();
815  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
816  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
817  {
818  T* item = dynamic_cast<T*>( *itemIt );
819  if ( item )
820  {
821  itemList.push_back( item );
822  }
823  }
824 }
825 
826 #endif
827 
828 
829 
void setSnapTolerance(const int snapTolerance)
Sets the snap tolerance to use when automatically snapping items during movement and resizing to guid...
Definition: qgscomposition.h:234
A scale bar item that can be added to a map composition.
Definition: qgscomposerscalebar.h:30
QUndoStack * undoStack()
Returns pointer to undo/redo command storage.
Definition: qgscomposition.h:245
QgsComposition::AtlasMode atlasMode() const
Returns the current atlas mode of the composition.
Definition: qgscomposition.h:555
bool snapLinesVisible() const
Definition: qgscomposition.h:170
Definition: qgscomposition.h:89
A base class for objects which belong to a map composition.
Definition: qgscomposerobject.h:33
QgsFillSymbolV2 * pageStyleSymbol()
Note: added in version 2.1.
Definition: qgscomposition.h:140
void setPrintAsRaster(const bool enabled)
Definition: qgscomposition.h:315
State
Definition: qgsaddremoveitemcommand.h:32
A container class for data source field mapping or expression.
Definition: qgsdatadefined.h:32
An item that draws an arrow between to points.
Definition: qgscomposerarrow.h:28
QgsComposerModel * itemsModel()
Returns the items model attached to the composition.
Definition: qgscomposition.h:589
void setPlotStyle(const QgsComposition::PlotStyle style)
Definition: qgscomposition.h:339
const QgsMapSettings & mapSettings() const
Return setting of QGIS map canvas.
Definition: qgscomposition.h:336
const QPen & gridPen() const
Definition: qgscomposition.h:191
QgsComposerMouseHandles * selectionHandles()
Returns pointer to selection handles.
Definition: qgscomposition.h:440
bool smartGuidesEnabled() const
Definition: qgscomposition.h:176
A item that forms part of a map composition.
Definition: qgscomposeritem.h:38
Q_DECL_DEPRECATED double snapGridTolerance() const
Returns the snap tolerance to use when automatically snapping items during movement and resizing to t...
Definition: qgscomposition.h:210
bool preventCursorChange() const
Definition: qgscomposition.h:502
Container of fields for a vector layer.
Definition: qgsfield.h:163
Definition: qgscomposeritemcommand.h:73
DataDefinedProperty
Data defined properties for different item types.
Definition: qgscomposerobject.h:40
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:113
A non GUI class for rendering a map layer set onto a QPainter.
Definition: qgsmaprenderer.h:133
Definition: qgssymbolv2.h:277
double spaceBetweenPages() const
Definition: qgscomposition.h:130
bool alignmentSnap() const
Definition: qgscomposition.h:173
Definition: qgscomposerobject.h:43
Context
Definition: qgscomposeritemcommand.h:71
Definition: qgscomposition.h:112
A table that displays attributes from a vector layer.
Definition: qgscomposerattributetablev2.h:51
Definition: qgscomposition.h:95
A composer class that displays svg files or raster format (jpg, png, ...)
Definition: qgscomposerpicture.h:31
The QgsMapSettings class contains configuration for rendering of the map.
Definition: qgsmapsettings.h:52
Q_DECL_DEPRECATED void sortZList()
Sorts the zList.
Definition: qgscomposition.h:424
Context
Definition: qgscomposermultiframecommand.h:66
Definition: qgscomposermultiframecommand.h:68
void setPreventCursorChange(const bool preventChange)
If true, prevents any mouse cursor changes by the composition or by any composer items Used by QgsCom...
Definition: qgscomposition.h:501
PlotStyle
Plot type.
Definition: qgscomposition.h:78
int printResolution() const
Definition: qgscomposition.h:311
GridStyle
Style to draw the snapping grid.
Definition: qgscomposition.h:86
Abstract base class for composer items with the ability to distribute the content to several frames (...
Definition: qgscomposermultiframe.h:39
Definition: qgscomposerhtml.h:27
A class to display a table in the print composer, and allow the table to span over multiple frames...
Definition: qgscomposertablev2.h:49
Definition: qgscomposition.h:81
void setAlignmentSnap(const bool s)
Definition: qgscomposition.h:172
Definition: qgscomposermultiframecommand.h:26
bool printAsRaster() const
Definition: qgscomposition.h:314
void setWorldFileMap(QgsComposerMap *map)
Definition: qgscomposition.h:321
QgsComposerMap * worldFileMap() const
Definition: qgscomposition.h:320
Graphics scene for map printing.
Definition: qgscomposition.h:72
bool snapToGridEnabled() const
Definition: qgscomposition.h:163
Definition: qgsaddremoveitemcommand.h:34
Object representing map window.
Definition: qgscomposermap.h:46
Frame item for a composer multiframe item.
Definition: qgscomposerframe.h:25
void setGenerateWorldFile(const bool enabled)
Definition: qgscomposition.h:318
GridStyle gridStyle() const
Definition: qgscomposition.h:194
A model for items attached to a composition.
Definition: qgscomposermodel.h:47
AtlasMode
Composition atlas modes.
Definition: qgscomposition.h:110
QString file
Definition: qgssvgcache.cpp:76
QList< QgsPaperItem * > pages()
Return pages in the correct order.
Definition: qgscomposition.h:567
bool useAdvancedEffects() const
Returns true if a composition should use advanced effects such as blend modes.
Definition: qgscomposition.h:325
Q_DECL_DEPRECATED void setSnapGridTolerance(double tolerance)
Sets the snap tolerance to use when automatically snapping items during movement and resizing to the ...
Definition: qgscomposition.h:202
A composer command class for adding / removing composer items.
Definition: qgsaddremoveitemcommand.h:26
double snapGridOffsetY() const
Definition: qgscomposition.h:188
double snapGridOffsetX() const
Definition: qgscomposition.h:185
A table class that displays a vector attribute table.
Definition: qgscomposerattributetable.h:49
Undo command to undo/redo all composer item related changes.
Definition: qgscomposeritemcommand.h:27
int snapTolerance() const
Returns the snap tolerance to use when automatically snapping items during movement and resizing to g...
Definition: qgscomposition.h:242
A composer items that draws common shapes (ellipse, triangle, rectangle)
Definition: qgscomposershape.h:28
double snapGridResolution() const
Definition: qgscomposition.h:182
Definition: qgscomposition.h:88
Definition: qgscomposition.h:101
Q_DECL_DEPRECATED double alignmentSnapTolerance() const
Returns the snap tolerance to use when automatically snapping items during movement and resizing to g...
Definition: qgscomposition.h:226
void setSmartGuidesEnabled(const bool b)
Definition: qgscomposition.h:175
Definition: qgscomposition.h:113
A label that can be placed onto a map composition.
Definition: qgscomposerlabel.h:29
Class used to render an Atlas, iterating over geometry features.
Definition: qgsatlascomposition.h:41
bool gridVisible() const
Definition: qgscomposition.h:166
QgsAtlasComposition & atlasComposition()
Definition: qgscomposition.h:539
Handles drawing of selection outlines and mouse handles.
Definition: qgscomposermousehandles.h:31
void composerItems(QList< T * > &itemList)
Return composer items of a specific type.
Definition: qgscomposition.h:811
bool generateWorldFile() const
Definition: qgscomposition.h:317
QgsComposition::PlotStyle plotStyle() const
Definition: qgscomposition.h:338
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:470
A legend that can be placed onto a map composition.
Definition: qgscomposerlegend.h:56
Q_DECL_DEPRECATED void setAlignmentSnapTolerance(double t)
Sets the snap tolerance to use when automatically snapping items during movement and resizing to guid...
Definition: qgscomposition.h:218
PaperOrientation
Definition: qgscomposition.h:99
QList< QGraphicsLineItem * > * snapLines()
Returns pointer to snap lines collection.
Definition: qgscomposition.h:435
ZValueDirection
Definition: qgscomposition.h:93