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 
126  void setPaperSize( const double width, const double height );
127 
133  double paperHeight() const;
134 
140  double paperWidth() const;
141 
145  double spaceBetweenPages() const { return mSpaceBetweenPages; }
146 
152  void setNumPages( const int pages );
153 
159  int numPages() const;
160 
170  bool pageIsEmpty( const int page ) const;
171 
179  bool shouldExportPage( const int page ) const;
180 
182  void setPageStyleSymbol( QgsFillSymbolV2* symbol );
184  QgsFillSymbolV2* pageStyleSymbol() { return mPageStyleSymbol; }
185 
189  QPointF positionOnPage( const QPointF & position ) const;
190 
194  int pageNumberForPoint( const QPointF & position ) const;
195 
199  void setStatusMessage( const QString & message );
200 
204  void updateSettings();
205 
206  void setSnapToGridEnabled( const bool b );
207  bool snapToGridEnabled() const {return mSnapToGrid;}
208 
209  void setGridVisible( const bool b );
210  bool gridVisible() const {return mGridVisible;}
211 
213  void setSnapLinesVisible( const bool visible );
214  bool snapLinesVisible() const {return mGuidesVisible;}
215 
216  void setAlignmentSnap( const bool s ) { mAlignmentSnap = s; }
217  bool alignmentSnap() const { return mAlignmentSnap; }
218 
219  void setSmartGuidesEnabled( const bool b ) { mSmartGuides = b; }
220  bool smartGuidesEnabled() const {return mSmartGuides;}
221 
223  void clearSnapLines();
224 
225  void setSnapGridResolution( const double r );
226  double snapGridResolution() const {return mSnapGridResolution;}
227 
228  void setSnapGridOffsetX( const double offset );
229  double snapGridOffsetX() const {return mSnapGridOffsetX;}
230 
231  void setSnapGridOffsetY( const double offset );
232  double snapGridOffsetY() const {return mSnapGridOffsetY;}
233 
234  void setGridPen( const QPen& p );
235  const QPen& gridPen() const {return mGridPen;}
236 
237  void setGridStyle( const GridStyle s );
238  GridStyle gridStyle() const {return mGridStyle;}
239 
246  Q_DECL_DEPRECATED void setSnapGridTolerance( double tolerance ) { mSnapTolerance = tolerance; }
247 
254  Q_DECL_DEPRECATED double snapGridTolerance() const {return mSnapTolerance;}
255 
262  Q_DECL_DEPRECATED void setAlignmentSnapTolerance( double t ) { mSnapTolerance = t; }
263 
270  Q_DECL_DEPRECATED double alignmentSnapTolerance() const { return mSnapTolerance; }
271 
278  void setSnapTolerance( const int snapTolerance ) { mSnapTolerance = snapTolerance; }
279 
286  int snapTolerance() const { return mSnapTolerance; }
287 
289  QUndoStack* undoStack() { return mUndoStack; }
290 
296  QgsComposerItem* composerItemAt( const QPointF & position, const bool ignoreLocked = false ) const;
297 
304  QgsComposerItem* composerItemAt( const QPointF & position, const QgsComposerItem* belowItem, const bool ignoreLocked = false ) const;
305 
307  int pageNumberAt( const QPointF& position ) const;
308 
310  int itemPageNumber( const QgsComposerItem* ) const;
311 
316  QList<QgsComposerItem*> selectedComposerItems( const bool includeLockedItems = true );
317 
321  QList<const QgsComposerMap*> composerMapItems() const;
322 
327  template<class T> void composerItems( QList<T*>& itemList );
328 
335  template<class T> void composerItemsOnPage( QList<T*>& itemList, const int pageNumber ) const;
336 
339  const QgsComposerMap* getComposerMapById( const int id ) const;
340 
347  Q_DECL_DEPRECATED const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) const;
348 
356  const QgsComposerItem* getComposerItemById( const QString theId ) const;
357 
362  const QgsComposerItem* getComposerItemByUuid( const QString theUuid ) const;
363 
364  int printResolution() const {return mPrintResolution;}
365  void setPrintResolution( const int dpi );
366 
367  bool printAsRaster() const {return mPrintAsRaster;}
368  void setPrintAsRaster( const bool enabled ) { mPrintAsRaster = enabled; }
369 
370  bool generateWorldFile() const { return mGenerateWorldFile; }
371  void setGenerateWorldFile( const bool enabled ) { mGenerateWorldFile = enabled; }
372 
373  QgsComposerMap* worldFileMap() const { return mWorldFileMap; }
374  void setWorldFileMap( QgsComposerMap* map ) { mWorldFileMap = map; }
375 
378  bool useAdvancedEffects() const {return mUseAdvancedEffects;}
381  void setUseAdvancedEffects( const bool effectsEnabled );
382 
384  Q_DECL_DEPRECATED QgsMapRenderer* mapRenderer() {return mMapRenderer;}
386 
389  const QgsMapSettings& mapSettings() const { return mMapSettings; }
390 
391  QgsComposition::PlotStyle plotStyle() const {return mPlotStyle;}
392  void setPlotStyle( const QgsComposition::PlotStyle style ) {mPlotStyle = style;}
393 
398  Q_DECL_DEPRECATED int pixelFontSize( double pointSize ) const;
399 
403  Q_DECL_DEPRECATED double pointFontSize( int pixelSize ) const;
404 
406  bool writeXML( QDomElement& composerElem, QDomDocument& doc );
407 
409  bool readXML( const QDomElement& compositionElem, const QDomDocument& doc );
410 
419  bool loadFromTemplate( const QDomDocument& doc, QMap<QString, QString>* substitutionMap = 0,
420  bool addUndoCommands = false, const bool clearComposition = true );
421 
431  void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0,
432  bool addUndoCommands = false, QPointF* pos = 0, bool pasteInPlace = false );
433 
435  void addItemToZList( QgsComposerItem* item );
437  void removeItemFromZList( QgsComposerItem* item );
438 
439  //functions to move selected items in hierarchy
440  void raiseSelectedItems();
441 
442  //returns true if successful
443  bool raiseItem( QgsComposerItem* item );
444  void lowerSelectedItems();
445  //returns true if successful
446  bool lowerItem( QgsComposerItem* item );
447  void moveSelectedItemsToTop();
448  //returns true if successful
449  bool moveItemToTop( QgsComposerItem* item );
450  void moveSelectedItemsToBottom();
451  //returns true if successful
452  bool moveItemToBottom( QgsComposerItem* item );
453 
454  //functions to find items by their position in the z list
455  void selectNextByZOrder( const ZValueDirection direction );
456  QgsComposerItem* getComposerItemBelow( QgsComposerItem* item ) const;
457  QgsComposerItem* getComposerItemAbove( QgsComposerItem* item ) const;
458 
459  //functions to align selected items
460  void alignSelectedItemsLeft();
461  void alignSelectedItemsHCenter();
462  void alignSelectedItemsRight();
463  void alignSelectedItemsTop();
464  void alignSelectedItemsVCenter();
465  void alignSelectedItemsBottom();
466 
467  //functions to lock and unlock items
469  void lockSelectedItems();
471  void unlockAllItems();
472 
477  Q_DECL_DEPRECATED void sortZList() {};
478 
482  void refreshZList();
483 
485  QPointF snapPointToGrid( const QPointF& scenePoint ) const;
486 
488  QList< QGraphicsLineItem* >* snapLines() {return &mSnapLines;}
489 
493  QgsComposerMouseHandles* selectionHandles() {return mSelectionHandles;}
494 
496  QGraphicsLineItem* addSnapLine();
498  void removeSnapLine( QGraphicsLineItem* line );
502  QGraphicsLineItem* nearestSnapLine( const bool horizontal, const double x, const double y, const double tolerance, QList< QPair< QgsComposerItem*, QgsComposerItem::ItemPositionMode > >& snappedItems ) const;
503 
508  void beginCommand( QgsComposerItem* item, const QString& commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
509 
511  void endCommand();
513  void cancelCommand();
514 
515  void beginMultiFrameCommand( QgsComposerMultiFrame* multiFrame, const QString& text, const QgsComposerMultiFrameMergeCommand::Context c = QgsComposerMultiFrameMergeCommand::Unknown );
516  void endMultiFrameCommand();
518  void cancelMultiFrameCommand();
519 
521  void addMultiFrame( QgsComposerMultiFrame* multiFrame );
523  void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
526  void addComposerArrow( QgsComposerArrow* arrow );
528  void addComposerLabel( QgsComposerLabel* label );
530  void addComposerMap( QgsComposerMap* map, const bool setDefaultPreviewStyle = true );
532  void addComposerScaleBar( QgsComposerScaleBar* scaleBar );
534  void addComposerLegend( QgsComposerLegend* legend );
536  void addComposerPicture( QgsComposerPicture* picture );
538  void addComposerShape( QgsComposerShape* shape );
540  void addComposerTable( QgsComposerAttributeTable* table );
542  void addComposerHtmlFrame( QgsComposerHtml* html, QgsComposerFrame* frame );
544  void addComposerTableFrame( QgsComposerAttributeTableV2* table, QgsComposerFrame* frame );
545 
547  void removeComposerItem( QgsComposerItem* item, const bool createCommand = true, const bool removeGroupItems = true );
548 
550  void pushAddRemoveCommand( QgsComposerItem* item, const QString& text, const QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
551 
554  void setPreventCursorChange( const bool preventChange ) { mPreventCursorChange = preventChange; }
555  bool preventCursorChange() const { return mPreventCursorChange; }
556 
557  //printing
558 
560  void beginPrint( QPrinter& printer, const bool evaluateDDPageSize = false );
562  void beginPrintAsPDF( QPrinter& printer, const QString& file );
563 
569  void doPrint( QPrinter& printer, QPainter& painter, bool startNewPage = false );
570 
574  bool print( QPrinter &printer, const bool evaluateDDPageSize = false );
575 
579  bool exportAsPDF( const QString& file );
580 
583  QImage printPageAsRaster( int page );
584 
587  void renderPage( QPainter* p, int page );
588 
590  void computeWorldFileParameters( double& a, double& b, double& c, double& d, double& e, double& f ) const;
591 
592  QgsAtlasComposition& atlasComposition() { return mAtlasComposition; }
593 
597  Q_DECL_DEPRECATED static void relativeResizeRect( QRectF& rectToResize, const QRectF& boundsBefore, const QRectF& boundsAfter );
598 
602  Q_DECL_DEPRECATED static double relativePosition( double position, double beforeMin, double beforeMax, double afterMin, double afterMax );
603 
608  QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; }
609 
615  bool setAtlasMode( const QgsComposition::AtlasMode mode );
616 
620  QList< QgsPaperItem* > pages() { return mPages; }
621 
626  QgsDataDefined* dataDefinedProperty( const QgsComposerObject::DataDefinedProperty property );
627 
636  void setDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property, bool active, bool useExpression, const QString &expression, const QString &field );
637 
642  QgsComposerModel * itemsModel() { return mItemsModel; }
643 
644  public slots:
646  void sendItemAddedSignal( QgsComposerItem* item );
647 
650  void updateBounds();
651 
657  void refreshItems();
658 
662  void setSelectedItem( QgsComposerItem* item );
663 
668  void setAllUnselected();
669 
677  void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
678 
679  protected:
680  void init();
681 
682 
683  private:
685  QgsMapRenderer* mMapRenderer;
686  const QgsMapSettings& mMapSettings;
687 
688  QgsComposition::PlotStyle mPlotStyle;
689  double mPageWidth;
690  double mPageHeight;
691  QList< QgsPaperItem* > mPages;
692  double mSpaceBetweenPages; //space in preview between pages
693 
695  QgsFillSymbolV2* mPageStyleSymbol;
696  void createDefaultPageStyleSymbol();
697 
699  QSet<QgsComposerMultiFrame*> mMultiFrames;
700 
702  int mPrintResolution;
703 
705  bool mPrintAsRaster;
706 
708  bool mGenerateWorldFile;
710  QgsComposerMap* mWorldFileMap;
711 
713  bool mUseAdvancedEffects;
714 
716  bool mSnapToGrid;
717  bool mGridVisible;
718  double mSnapGridResolution;
719  double mSnapGridOffsetX;
720  double mSnapGridOffsetY;
721  QPen mGridPen;
722  GridStyle mGridStyle;
723 
725  bool mAlignmentSnap;
726  bool mGuidesVisible;
727  bool mSmartGuides;
728  int mSnapTolerance;
729 
731  QList< QGraphicsLineItem* > mSnapLines;
732 
733  QgsComposerMouseHandles* mSelectionHandles;
734 
735  QUndoStack* mUndoStack;
736 
737  QgsComposerItemCommand* mActiveItemCommand;
738  QgsComposerMultiFrameCommand* mActiveMultiFrameCommand;
739 
741  QgsAtlasComposition mAtlasComposition;
742 
743  QgsComposition::AtlasMode mAtlasMode;
744 
745  bool mPreventCursorChange;
746 
747  QgsComposerModel * mItemsModel;
748 
750  QMap< QgsComposerObject::DataDefinedProperty, QString > mDataDefinedNames;
752  QMap< QgsComposerObject::DataDefinedProperty, QgsDataDefined* > mDataDefinedProperties;
753 
754  QgsComposition(); //default constructor is forbidden
755 
757  QRectF compositionBounds() const;
758 
760  void updateZValues( const bool addUndoCommands = true );
761 
764  int boundingRectOfSelectedItems( QRectF& bRect );
765 
767  void loadDefaults();
768 
770  void loadSettings();
771 
773  QPointF minPointFromXml( const QDomElement& elem ) const;
774 
775  void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c );
776 
777  void updatePaperItems();
778  void addPaperItem();
779  void removePaperItems();
780  void deleteAndRemoveMultiFrames();
781 
782  static QString encodeStringForXML( const QString& str );
783 
784  //tries to return the current QGraphicsView attached to the composition
785  QGraphicsView* graphicsView() const;
786 
787  /*Recalculates the page size using data defined page settings*/
788  void refreshPageSize();
789 
797  bool dataDefinedEvaluate( QgsComposerObject::DataDefinedProperty property, QVariant &expressionValue,
798  QMap< QgsComposerObject::DataDefinedProperty, QgsDataDefined* >* dataDefinedProperties );
799 
807  QVariant dataDefinedValue( QgsComposerObject::DataDefinedProperty property, const QgsFeature *feature, const QgsFields *fields,
808  QMap<QgsComposerObject::DataDefinedProperty, QgsDataDefined *> *dataDefinedProperties ) const;
809 
810 
816  void prepareDataDefinedExpression( QgsDataDefined *dd, QMap< QgsComposerObject::DataDefinedProperty, QgsDataDefined* >* dataDefinedProperties ) const;
817 
818  private slots:
819  /*Prepares all data defined expressions*/
820  void prepareAllDataDefinedExpressions();
821 
822  signals:
823  void paperSizeChanged();
824  void nPagesChanged();
825 
827  void printResolutionChanged();
828 
830  void selectedItemChanged( QgsComposerItem* selected );
832  void composerArrowAdded( QgsComposerArrow* arrow );
834  void composerHtmlFrameAdded( QgsComposerHtml* html, QgsComposerFrame* frame );
836  void composerLabelAdded( QgsComposerLabel* label );
838  void composerMapAdded( QgsComposerMap* map );
840  void composerScaleBarAdded( QgsComposerScaleBar* scalebar );
842  void composerLegendAdded( QgsComposerLegend* legend );
844  void composerPictureAdded( QgsComposerPicture* picture );
846  void composerShapeAdded( QgsComposerShape* shape );
848  void composerTableAdded( QgsComposerAttributeTable* table );
850  void composerTableFrameAdded( QgsComposerAttributeTableV2* table, QgsComposerFrame* frame );
852  void itemRemoved( QgsComposerItem* );
853 
855  void refreshItemsTriggered();
856 
858  void statusMsgChanged( QString message );
859 
860  friend class QgsComposerObject; //for accessing dataDefinedEvaluate, readDataDefinedPropertyMap and writeDataDefinedPropertyMap
861  friend class QgsComposerModel; //for accessing updateZValues (should not be public)
862 };
863 
864 template<class T> void QgsComposition::composerItems( QList<T*>& itemList )
865 {
866  itemList.clear();
867  QList<QGraphicsItem *> graphicsItemList = items();
868  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
869  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
870  {
871  T* item = dynamic_cast<T*>( *itemIt );
872  if ( item )
873  {
874  itemList.push_back( item );
875  }
876  }
877 }
878 
879 template<class T> void QgsComposition::composerItemsOnPage( QList<T*>& itemList, const int pageNumber ) const
880 {
881  itemList.clear();
882  QList<QGraphicsItem *> graphicsItemList = items();
883  QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
884  for ( ; itemIt != graphicsItemList.end(); ++itemIt )
885  {
886  T* item = dynamic_cast<T*>( *itemIt );
887  if ( item && itemPageNumber( item ) == pageNumber )
888  {
889  itemList.push_back( item );
890  }
891  }
892 }
893 
894 
895 #endif
896 
897 
898 
void setSnapTolerance(const int snapTolerance)
Sets the snap tolerance to use when automatically snapping items during movement and resizing to guid...
Definition: qgscomposition.h:278
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:289
QgsComposition::AtlasMode atlasMode() const
Returns the current atlas mode of the composition.
Definition: qgscomposition.h:608
bool snapLinesVisible() const
Definition: qgscomposition.h:214
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:184
void setPrintAsRaster(const bool enabled)
Definition: qgscomposition.h:368
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:642
void setPlotStyle(const QgsComposition::PlotStyle style)
Definition: qgscomposition.h:392
const QgsMapSettings & mapSettings() const
Return setting of QGIS map canvas.
Definition: qgscomposition.h:389
const QPen & gridPen() const
Definition: qgscomposition.h:235
QgsComposerMouseHandles * selectionHandles()
Returns pointer to selection handles.
Definition: qgscomposition.h:493
bool smartGuidesEnabled() const
Definition: qgscomposition.h:220
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:254
bool preventCursorChange() const
Definition: qgscomposition.h:555
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
Returns the vertical space between pages in a composer view.
Definition: qgscomposition.h:145
bool alignmentSnap() const
Definition: qgscomposition.h:217
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
void composerItemsOnPage(QList< T * > &itemList, const int pageNumber) const
Return composer items of a specific type on a specified page.
Definition: qgscomposition.h:879
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:477
Context
Definition: qgscomposermultiframecommand.h:66
int itemPageNumber(const QgsComposerItem *) const
Returns on which page number (0-based) is displayed an item.
Definition: qgscomposition.cpp:557
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:554
PlotStyle
Plot type.
Definition: qgscomposition.h:78
int printResolution() const
Definition: qgscomposition.h:364
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:216
Definition: qgscomposermultiframecommand.h:26
bool printAsRaster() const
Definition: qgscomposition.h:367
void setWorldFileMap(QgsComposerMap *map)
Definition: qgscomposition.h:374
QgsComposerMap * worldFileMap() const
Definition: qgscomposition.h:373
Graphics scene for map printing.
Definition: qgscomposition.h:72
bool snapToGridEnabled() const
Definition: qgscomposition.h:207
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:371
GridStyle gridStyle() const
Definition: qgscomposition.h:238
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:620
bool useAdvancedEffects() const
Returns true if a composition should use advanced effects such as blend modes.
Definition: qgscomposition.h:378
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:246
A composer command class for adding / removing composer items.
Definition: qgsaddremoveitemcommand.h:26
double snapGridOffsetY() const
Definition: qgscomposition.h:232
double snapGridOffsetX() const
Definition: qgscomposition.h:229
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:286
A composer items that draws common shapes (ellipse, triangle, rectangle)
Definition: qgscomposershape.h:28
double snapGridResolution() const
Definition: qgscomposition.h:226
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:270
void setSmartGuidesEnabled(const bool b)
Definition: qgscomposition.h:219
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:210
QgsAtlasComposition & atlasComposition()
Definition: qgscomposition.h:592
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:864
bool generateWorldFile() const
Definition: qgscomposition.h:370
QgsComposition::PlotStyle plotStyle() const
Definition: qgscomposition.h:391
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:262
PaperOrientation
Definition: qgscomposition.h:99
QList< QGraphicsLineItem * > * snapLines()
Returns pointer to snap lines collection.
Definition: qgscomposition.h:488
ZValueDirection
Definition: qgscomposition.h:93