QGIS API Documentation
2.0.1-Dufour
|
Graphics scene for map printing. More...
#include <qgscomposition.h>
Public Types | |
enum | PlotStyle { Preview = 0, Print, Postscript } |
Plot type. More... | |
enum | GridStyle { Solid, Dots, Crosses } |
Style to draw the snapping grid. More... |
Public Slots | |
void | sendItemAddedSignal (QgsComposerItem *item) |
Casts object to the proper subclass type and calls corresponding itemAdded signal. |
Signals | |
void | paperSizeChanged () |
void | nPagesChanged () |
void | selectedItemChanged (QgsComposerItem *selected) |
Is emitted when selected item changed. | |
void | composerArrowAdded (QgsComposerArrow *arrow) |
Is emitted when new composer arrow has been added to the view. | |
void | composerHtmlFrameAdded (QgsComposerHtml *html, QgsComposerFrame *frame) |
Is emitted when a new composer html has been added to the view. | |
void | composerLabelAdded (QgsComposerLabel *label) |
Is emitted when new composer label has been added to the view. | |
void | composerMapAdded (QgsComposerMap *map) |
Is emitted when new composer map has been added to the view. | |
void | composerScaleBarAdded (QgsComposerScaleBar *scalebar) |
Is emitted when new composer scale bar has been added. | |
void | composerLegendAdded (QgsComposerLegend *legend) |
Is emitted when a new composer legend has been added. | |
void | composerPictureAdded (QgsComposerPicture *picture) |
Is emitted when a new composer picture has been added. | |
void | composerShapeAdded (QgsComposerShape *shape) |
Is emitted when a new composer shape has been added. | |
void | composerTableAdded (QgsComposerAttributeTable *table) |
Is emitted when a new composer table has been added. | |
void | itemRemoved (QgsComposerItem *) |
Is emitted when a composer item has been removed from the scene. |
Public Member Functions | |
QgsComposition (QgsMapRenderer *mapRenderer) | |
~QgsComposition () | |
void | setPaperSize (double width, double height) |
Changes size of paper item. | |
double | paperHeight () const |
Returns height of paper item. | |
double | paperWidth () const |
Returns width of paper item. | |
double | spaceBetweenPages () const |
void | setNumPages (int pages) |
Note: added in version 1.9. | |
int | numPages () const |
Note: added in version 1.9. | |
void | setSnapToGridEnabled (bool b) |
bool | snapToGridEnabled () const |
void | setSnapGridResolution (double r) |
double | snapGridResolution () const |
void | setSnapGridOffsetX (double offset) |
double | snapGridOffsetX () const |
void | setSnapGridOffsetY (double offset) |
double | snapGridOffsetY () const |
void | setGridPen (const QPen &p) |
const QPen & | gridPen () const |
void | setGridStyle (GridStyle s) |
GridStyle | gridStyle () const |
void | setAlignmentSnap (bool s) |
bool | alignmentSnap () const |
void | setAlignmentSnapTolerance (double t) |
double | alignmentSnapTolerance () const |
QUndoStack * | undoStack () |
Returns pointer to undo/redo command storage. | |
QgsComposerItem * | composerItemAt (const QPointF &position) |
Returns the topmost composer item. | |
int | pageNumberAt (const QPointF &position) const |
Returns the page number (0-bsaed) given a coordinate. | |
int | itemPageNumber (const QgsComposerItem *) const |
Returns on which page number (0-based) is displayed an item. | |
QList< QgsComposerItem * > | selectedComposerItems () |
QList< const QgsComposerMap * > | composerMapItems () const |
Returns pointers to all composer maps in the scene. | |
template<class T > | |
void | composerItems (QList< T * > &itemList) |
Return composer items of a specific type. | |
const QgsComposerMap * | getComposerMapById (int id) const |
Returns the composer map with specified id. | |
const QgsComposerHtml * | getComposerHtmlByItem (QgsComposerItem *item) const |
const QgsComposerItem * | getComposerItemById (QString theId) const |
Returns a composer item given its text identifier. | |
const QgsComposerItem * | getComposerItemByUuid (QString theUuid) const |
Returns a composer item given its unique identifier. | |
int | printResolution () const |
void | setPrintResolution (int dpi) |
bool | printAsRaster () const |
void | setPrintAsRaster (bool enabled) |
bool | useAdvancedEffects () const |
Returns true if a composition should use advanced effects such as blend modes. | |
void | setUseAdvancedEffects (bool effectsEnabled) |
Used to enable or disable advanced effects such as blend modes in a composition. | |
double | selectionTolerance () const |
void | setSelectionTolerance (double tol) |
QgsMapRenderer * | mapRenderer () |
Returns pointer to map renderer of qgis map canvas. | |
QgsComposition::PlotStyle | plotStyle () const |
void | setPlotStyle (QgsComposition::PlotStyle style) |
int | pixelFontSize (double pointSize) const |
Returns the pixel font size for a font that has point size set. | |
double | pointFontSize (int pixelSize) const |
Does the inverse calculation and returns points for pixels (equals to mm in QgsComposition) | |
bool | writeXML (QDomElement &composerElem, QDomDocument &doc) |
Writes settings to xml (paper dimension) | |
bool | readXML (const QDomElement &compositionElem, const QDomDocument &doc) |
Reads settings from xml file. | |
bool | loadFromTemplate (const QDomDocument &doc, QMap< QString, QString > *substitutionMap=0, bool addUndoCommands=false) |
Load a template document. | |
void | addItemsFromXML (const QDomElement &elem, const QDomDocument &doc, QMap< QgsComposerMap *, int > *mapsToRestore=0, bool addUndoCommands=false, QPointF *pos=0, bool pasteInPlace=false) |
Add items from XML representation to the graphics scene (for project file reading, pasting items from clipboard) | |
void | addItemToZList (QgsComposerItem *item) |
Adds item to z list. | |
void | removeItemFromZList (QgsComposerItem *item) |
Removes item from z list. | |
void | raiseSelectedItems () |
void | raiseItem (QgsComposerItem *item) |
void | lowerSelectedItems () |
void | lowerItem (QgsComposerItem *item) |
void | moveSelectedItemsToTop () |
void | moveItemToTop (QgsComposerItem *item) |
void | moveSelectedItemsToBottom () |
void | moveItemToBottom (QgsComposerItem *item) |
void | alignSelectedItemsLeft () |
void | alignSelectedItemsHCenter () |
void | alignSelectedItemsRight () |
void | alignSelectedItemsTop () |
void | alignSelectedItemsVCenter () |
void | alignSelectedItemsBottom () |
void | sortZList () |
Sorts the zList. | |
QPointF | snapPointToGrid (const QPointF &scenePoint) const |
Snaps a scene coordinate point to grid. | |
QPointF | alignItem (const QgsComposerItem *item, double &alignX, double &alignY, double dx=0, double dy=0) |
Snaps item position to align with other items (left / middle / right or top / middle / bottom. | |
QPointF | alignPos (const QPointF &pos, const QgsComposerItem *excludeItem, double &alignX, double &alignY) |
Snaps position to align with the boundaries of other items. | |
QGraphicsLineItem * | addSnapLine () |
Add a custom snap line (can be horizontal or vertical) | |
void | removeSnapLine (QGraphicsLineItem *line) |
Remove custom snap line (and delete the object) | |
QGraphicsLineItem * | nearestSnapLine (bool horizontal, double x, double y, double tolerance, QList< QPair< QgsComposerItem *, QgsComposerItem::ItemPositionMode > > &snappedItems) |
Get nearest snap line. | |
void | setSnapLinesVisible (bool visible) |
Hides / shows custom snap lines. | |
void | beginCommand (QgsComposerItem *item, const QString &commandText, QgsComposerMergeCommand::Context c=QgsComposerMergeCommand::Unknown) |
Allocates new item command and saves initial state in it. | |
void | endCommand () |
Saves end state of item and pushes command to the undo history. | |
void | cancelCommand () |
Deletes current command. | |
void | beginMultiFrameCommand (QgsComposerMultiFrame *multiFrame, const QString &text) |
void | endMultiFrameCommand () |
void | addMultiFrame (QgsComposerMultiFrame *multiFrame) |
Adds multiframe. | |
void | removeMultiFrame (QgsComposerMultiFrame *multiFrame) |
Removes multi frame (but does not delete it) | |
void | addComposerArrow (QgsComposerArrow *arrow) |
Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerLabel (QgsComposerLabel *label) |
Adds label to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerMap (QgsComposerMap *map, bool setDefaultPreviewStyle=true) |
Adds map to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerScaleBar (QgsComposerScaleBar *scaleBar) |
Adds scale bar to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerLegend (QgsComposerLegend *legend) |
Adds legend to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerPicture (QgsComposerPicture *picture) |
Adds picture to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerShape (QgsComposerShape *shape) |
Adds a composer shape to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerTable (QgsComposerAttributeTable *table) |
Adds a composer table to the graphics scene and advices composer to create a widget for it (through signal) | |
void | addComposerHtmlFrame (QgsComposerHtml *html, QgsComposerFrame *frame) |
Adds composer html frame and advices composer to create a widget for it (through signal) | |
void | removeComposerItem (QgsComposerItem *item, bool createCommand=true) |
Remove item from the graphics scene. | |
void | pushAddRemoveCommand (QgsComposerItem *item, const QString &text, QgsAddRemoveItemCommand::State state=QgsAddRemoveItemCommand::Added) |
Convenience function to create a QgsAddRemoveItemCommand, connect its signals and push it to the undo stack. | |
void | beginPrint (QPrinter &printer) |
Prepare the printer for printing. | |
void | beginPrintAsPDF (QPrinter &printer, const QString &file) |
Prepare the printer for printing in a PDF. | |
void | doPrint (QPrinter &printer, QPainter &painter) |
Print on a preconfigured printer. | |
void | print (QPrinter &printer) |
Convenience function that prepares the printer and prints. | |
void | exportAsPDF (const QString &file) |
Convenience function that prepares the printer for printing in PDF and prints. | |
QImage | printPageAsRaster (int page) |
print composer page to image If the image does not fit into memory, a null image is returned | |
void | renderPage (QPainter *p, int page) |
Render a page to a paint device. | |
QgsAtlasComposition & | atlasComposition () |
Private Member Functions | |
QgsComposition () | |
void | updateZValues () |
Reset z-values of items based on position in z list. | |
int | boundingRectOfSelectedItems (QRectF &bRect) |
Returns the bounding rectangle of the selected items in scene coordinates. | |
void | loadSettings () |
void | saveSettings () |
void | connectAddRemoveCommandSignals (QgsAddRemoveItemCommand *c) |
void | updatePaperItems () |
void | addPaperItem () |
void | removePaperItems () |
void | deleteAndRemoveMultiFrames () |
void | collectAlignCoordinates (QMap< double, const QgsComposerItem * > &alignCoordsX, QMap< double, const QgsComposerItem * > &alignCoordsY, const QgsComposerItem *excludeItem) |
void | checkNearestItem (double checkCoord, const QMap< double, const QgsComposerItem * > &alignCoords, double &smallestDiff, double itemCoordOffset, double &itemCoord, double &alignCoord) const |
Static Private Member Functions | |
static QString | encodeStringForXML (const QString &str) |
static bool | nearestItem (const QMap< double, const QgsComposerItem * > &coords, double value, double &nearestValue) |
Find nearest item in coordinate map to a double. |
Private Attributes | |
QgsMapRenderer * | mMapRenderer |
Pointer to map renderer of QGIS main map. | |
QgsComposition::PlotStyle | mPlotStyle |
double | mPageWidth |
double | mPageHeight |
QList< QgsPaperItem * > | mPages |
double | mSpaceBetweenPages |
QLinkedList< QgsComposerItem * > | mItemZList |
Maintains z-Order of items. | |
QSet< QgsComposerMultiFrame * > | mMultiFrames |
List multiframe objects. | |
int | mPrintResolution |
Dpi for printout. | |
bool | mPrintAsRaster |
Flag if map should be printed as a raster (via QImage). | |
bool | mUseAdvancedEffects |
Flag if advanced visual effects such as blend modes should be used. | |
double | mSelectionTolerance |
Distance tolerance for item selection (in mm) | |
bool | mSnapToGrid |
Parameters for snap to grid function. | |
double | mSnapGridResolution |
double | mSnapGridOffsetX |
double | mSnapGridOffsetY |
QPen | mGridPen |
GridStyle | mGridStyle |
bool | mAlignmentSnap |
Parameters for alignment snap. | |
double | mAlignmentSnapTolerance |
QList< QGraphicsLineItem * > | mSnapLines |
Arbitraty snap lines (horizontal and vertical) | |
QUndoStack | mUndoStack |
QgsComposerItemCommand * | mActiveItemCommand |
QgsComposerMultiFrameCommand * | mActiveMultiFrameCommand |
QgsAtlasComposition | mAtlasComposition |
The atlas composition object. |
Graphics scene for map printing.
The class manages the paper item which always is the item in the back (z-value 0). It maintains the z-Values of the items and stores them in a list in ascending z-Order. This list can be changed to lower/raise items one position or to bring them to front/back.
Definition at line 64 of file qgscomposition.h.
Style to draw the snapping grid.
Definition at line 78 of file qgscomposition.h.
QgsComposition::QgsComposition | ( | QgsMapRenderer * | mapRenderer | ) |
Definition at line 49 of file qgscomposition.cpp.
References addPaperItem(), loadSettings(), and mPrintResolution.
QgsComposition::~QgsComposition | ( | ) |
Definition at line 100 of file qgscomposition.cpp.
References deleteAndRemoveMultiFrames(), mActiveItemCommand, mActiveMultiFrameCommand, and removePaperItems().
|
private |
Definition at line 76 of file qgscomposition.cpp.
References loadSettings().
void QgsComposition::addComposerArrow | ( | QgsComposerArrow * | arrow | ) |
Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1638 of file qgscomposition.cpp.
References composerArrowAdded(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::mouseReleaseEvent().
void QgsComposition::addComposerHtmlFrame | ( | QgsComposerHtml * | html, |
QgsComposerFrame * | frame | ||
) |
Adds composer html frame and advices composer to create a widget for it (through signal)
Definition at line 1727 of file qgscomposition.cpp.
References composerHtmlFrameAdded(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by QgsComposerHtml::addFrame().
void QgsComposition::addComposerLabel | ( | QgsComposerLabel * | label | ) |
Adds label to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1647 of file qgscomposition.cpp.
References composerLabelAdded(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::mousePressEvent().
void QgsComposition::addComposerLegend | ( | QgsComposerLegend * | legend | ) |
Adds legend to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1685 of file qgscomposition.cpp.
References composerLegendAdded(), composerMapItems(), selectedItemChanged(), QgsComposerLegend::setComposerMap(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::mousePressEvent().
void QgsComposition::addComposerMap | ( | QgsComposerMap * | map, |
bool | setDefaultPreviewStyle = true |
||
) |
Adds map to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1656 of file qgscomposition.cpp.
References QgsComposerMap::Cache, QgsComposerMap::cache(), composerMapAdded(), QgsComposerMap::previewMode(), QgsComposerMap::Rectangle, selectedItemChanged(), QgsComposerMap::setPreviewMode(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::mouseReleaseEvent().
void QgsComposition::addComposerPicture | ( | QgsComposerPicture * | picture | ) |
Adds picture to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1700 of file qgscomposition.cpp.
References composerPictureAdded(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::mousePressEvent().
void QgsComposition::addComposerScaleBar | ( | QgsComposerScaleBar * | scaleBar | ) |
Adds scale bar to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1676 of file qgscomposition.cpp.
References composerScaleBarAdded(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::mousePressEvent().
void QgsComposition::addComposerShape | ( | QgsComposerShape * | shape | ) |
Adds a composer shape to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1709 of file qgscomposition.cpp.
References composerShapeAdded(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::addShape().
void QgsComposition::addComposerTable | ( | QgsComposerAttributeTable * | table | ) |
Adds a composer table to the graphics scene and advices composer to create a widget for it (through signal)
Definition at line 1718 of file qgscomposition.cpp.
References composerTableAdded(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by addItemsFromXML(), and QgsComposerView::mousePressEvent().
void QgsComposition::addItemsFromXML | ( | const QDomElement & | elem, |
const QDomDocument & | doc, | ||
QMap< QgsComposerMap *, int > * | mapsToRestore = 0 , |
||
bool | addUndoCommands = false , |
||
QPointF * | pos = 0 , |
||
bool | pasteInPlace = false |
||
) |
Add items from XML representation to the graphics scene (for project file reading, pasting items from clipboard)
elem | items parent element, e.g. <Composer>or <ComposerItemClipboard> |
doc | xml document |
mapsToRestore | for reading from project file: set preview move 'rectangle' to all maps and save the preview states to show composer maps on demand |
addUndoCommands | insert AddItem commands if true (e.g. for copy/paste) |
pos | item position. Optional, take position from xml if 0 |
pasteInPlace | whether the position should be kept but mapped to the page origin. (the page is the page under to the mouse cursor) |
Definition at line 591 of file qgscomposition.cpp.
References addComposerArrow(), addComposerLabel(), addComposerLegend(), addComposerMap(), addComposerPicture(), addComposerScaleBar(), addComposerShape(), addComposerTable(), addMultiFrame(), QgsComposerMap::assignFreeId(), QgsComposerItem::move(), mPageHeight, mSpaceBetweenPages, pageNumberAt(), paperHeight(), QgsComposerMap::previewMode(), pushAddRemoveCommand(), QgsComposerHtml::readXML(), QgsComposerAttributeTable::readXML(), QgsComposerItemGroup::readXML(), QgsComposerShape::readXML(), QgsComposerPicture::readXML(), QgsComposerArrow::readXML(), QgsComposerLabel::readXML(), QgsComposerLegend::readXML(), QgsComposerScaleBar::readXML(), QgsComposerMap::readXML(), QgsComposerMap::Rectangle, QgsComposerMultiFrame::setCreateUndoCommands(), QgsComposerItem::setItemPosition(), QgsComposerMap::setPreviewMode(), spaceBetweenPages(), and tr.
Referenced by QgsComposerView::keyPressEvent(), and loadFromTemplate().
void QgsComposition::addItemToZList | ( | QgsComposerItem * | item | ) |
Adds item to z list.
Usually called from constructor of QgsComposerItem
Definition at line 830 of file qgscomposition.cpp.
References mItemZList.
Referenced by QgsComposerItem::init().
void QgsComposition::addMultiFrame | ( | QgsComposerMultiFrame * | multiFrame | ) |
Adds multiframe.
The object is owned by QgsComposition until removeMultiFrame is called
Definition at line 1628 of file qgscomposition.cpp.
References mMultiFrames.
Referenced by addItemsFromXML(), QgsComposerMultiFrame::QgsComposerMultiFrame(), and QgsAddRemoveMultiFrameCommand::switchState().
|
private |
Definition at line 1911 of file qgscomposition.cpp.
References mPages, mSpaceBetweenPages, paperHeight(), paperWidth(), and QgsExpression::setSpecialColumn().
Referenced by QgsComposition(), readXML(), and setNumPages().
QGraphicsLineItem * QgsComposition::addSnapLine | ( | ) |
Add a custom snap line (can be horizontal or vertical)
Definition at line 1289 of file qgscomposition.cpp.
References mSnapLines.
Referenced by QgsComposerRuler::mousePressEvent(), and readXML().
QPointF QgsComposition::alignItem | ( | const QgsComposerItem * | item, |
double & | alignX, | ||
double & | alignY, | ||
double | dx = 0 , |
||
double | dy = 0 |
||
) |
Snaps item position to align with other items (left / middle / right or top / middle / bottom.
item | current item |
alignX | x-coordinate of align or -1 if not aligned to x |
alignY | y-coordinate of align or -1 if not aligned to y |
dx | item shift in x direction |
dy | item shift in y direction |
Definition at line 1207 of file qgscomposition.cpp.
References checkNearestItem(), and collectAlignCoordinates().
Referenced by QgsComposerItem::changeItemRectangle().
|
inline |
Definition at line 123 of file qgscomposition.h.
Referenced by QgsComposerItem::changeItemRectangle().
|
inline |
Definition at line 126 of file qgscomposition.h.
QPointF QgsComposition::alignPos | ( | const QPointF & | pos, |
const QgsComposerItem * | excludeItem, | ||
double & | alignX, | ||
double & | alignY | ||
) |
Snaps position to align with the boundaries of other items.
pos | position to snap |
excludeItem | item to exclude |
alignX | snapped x coordinate or -1 if not snapped |
alignY | snapped y coordinate or -1 if not snapped |
Definition at line 1250 of file qgscomposition.cpp.
References collectAlignCoordinates(), mAlignmentSnapTolerance, and nearestItem().
Referenced by QgsComposerItem::changeItemRectangle().
void QgsComposition::alignSelectedItemsBottom | ( | ) |
Definition at line 1111 of file qgscomposition.cpp.
References boundingRectOfSelectedItems(), mUndoStack, QgsComposerItemCommand::saveAfterState(), QgsComposerItemCommand::savePreviousState(), selectedComposerItems(), and tr.
void QgsComposition::alignSelectedItemsHCenter | ( | ) |
Definition at line 990 of file qgscomposition.cpp.
References boundingRectOfSelectedItems(), mUndoStack, QgsComposerItemCommand::saveAfterState(), QgsComposerItemCommand::savePreviousState(), selectedComposerItems(), and tr.
void QgsComposition::alignSelectedItemsLeft | ( | ) |
Definition at line 959 of file qgscomposition.cpp.
References boundingRectOfSelectedItems(), mUndoStack, QgsComposerItemCommand::saveAfterState(), QgsComposerItemCommand::savePreviousState(), selectedComposerItems(), and tr.
void QgsComposition::alignSelectedItemsRight | ( | ) |
Definition at line 1021 of file qgscomposition.cpp.
References boundingRectOfSelectedItems(), mUndoStack, QgsComposerItemCommand::saveAfterState(), QgsComposerItemCommand::savePreviousState(), selectedComposerItems(), and tr.
void QgsComposition::alignSelectedItemsTop | ( | ) |
Definition at line 1052 of file qgscomposition.cpp.
References boundingRectOfSelectedItems(), mUndoStack, QgsComposerItemCommand::saveAfterState(), QgsComposerItemCommand::savePreviousState(), selectedComposerItems(), and tr.
void QgsComposition::alignSelectedItemsVCenter | ( | ) |
Definition at line 1082 of file qgscomposition.cpp.
References boundingRectOfSelectedItems(), mUndoStack, QgsComposerItemCommand::saveAfterState(), QgsComposerItemCommand::savePreviousState(), selectedComposerItems(), and tr.
|
inline |
Definition at line 360 of file qgscomposition.h.
Referenced by loadFromTemplate().
void QgsComposition::beginCommand | ( | QgsComposerItem * | item, |
const QString & | commandText, | ||
QgsComposerMergeCommand::Context | c = QgsComposerMergeCommand::Unknown |
||
) |
Allocates new item command and saves initial state in it.
item | target item |
commandText | descriptive command text |
c | context for merge commands (unknown for non-mergeable commands) |
Definition at line 1559 of file qgscomposition.cpp.
References mActiveItemCommand, QgsComposerItemCommand::savePreviousState(), and QgsComposerMergeCommand::Unknown.
Referenced by QgsComposerItem::beginCommand(), and QgsComposerView::mouseReleaseEvent().
void QgsComposition::beginMultiFrameCommand | ( | QgsComposerMultiFrame * | multiFrame, |
const QString & | text | ||
) |
Definition at line 1603 of file qgscomposition.cpp.
References mActiveMultiFrameCommand, and QgsComposerMultiFrameCommand::savePreviousState().
Referenced by QgsComposerFrame::beginItemCommand(), and QgsComposerView::mouseReleaseEvent().
void QgsComposition::beginPrint | ( | QPrinter & | printer | ) |
Prepare the printer for printing.
Definition at line 1998 of file qgscomposition.cpp.
References printResolution().
Referenced by print().
void QgsComposition::beginPrintAsPDF | ( | QPrinter & | printer, |
const QString & | file | ||
) |
Prepare the printer for printing in a PDF.
Definition at line 1945 of file qgscomposition.cpp.
References QgsPaintEngineHack::fixEngineFlags(), paperHeight(), and paperWidth().
Referenced by exportAsPDF().
|
private |
Returns the bounding rectangle of the selected items in scene coordinates.
Definition at line 1411 of file qgscomposition.cpp.
References selectedComposerItems().
Referenced by alignSelectedItemsBottom(), alignSelectedItemsHCenter(), alignSelectedItemsLeft(), alignSelectedItemsRight(), alignSelectedItemsTop(), and alignSelectedItemsVCenter().
void QgsComposition::cancelCommand | ( | ) |
Deletes current command.
Definition at line 1597 of file qgscomposition.cpp.
References mActiveItemCommand.
Referenced by QgsComposerItem::cancelCommand().
|
private |
Definition at line 2118 of file qgscomposition.cpp.
References mAlignmentSnapTolerance, and nearestItem().
Referenced by alignItem().
|
private |
Definition at line 2075 of file qgscomposition.cpp.
References mSnapLines, and qgsDoubleNear().
Referenced by alignItem(), and alignPos().
|
signal |
Is emitted when new composer arrow has been added to the view.
Referenced by addComposerArrow(), and sendItemAddedSignal().
|
signal |
Is emitted when a new composer html has been added to the view.
Referenced by addComposerHtmlFrame(), and sendItemAddedSignal().
QgsComposerItem * QgsComposition::composerItemAt | ( | const QPointF & | position | ) |
Returns the topmost composer item.
Ignores mPaperItem
Definition at line 167 of file qgscomposition.cpp.
References mSelectionTolerance.
Referenced by QgsComposerView::mousePressEvent(), and QgsComposerView::wheelEvent().
void QgsComposition::composerItems | ( | QList< T * > & | itemList | ) |
Return composer items of a specific type.
Definition at line 476 of file qgscomposition.h.
Referenced by QgsAtlasComposition::endRender(), and QgsAtlasComposition::prepareForFeature().
|
signal |
Is emitted when new composer label has been added to the view.
Referenced by addComposerLabel(), and sendItemAddedSignal().
|
signal |
Is emitted when a new composer legend has been added.
Referenced by addComposerLegend(), and sendItemAddedSignal().
|
signal |
Is emitted when new composer map has been added to the view.
Referenced by addComposerMap(), and sendItemAddedSignal().
QList< const QgsComposerMap * > QgsComposition::composerMapItems | ( | ) | const |
Returns pointers to all composer maps in the scene.
Definition at line 222 of file qgscomposition.cpp.
Referenced by addComposerLegend(), QgsComposerMap::assignFreeId(), QgsComposerView::mousePressEvent(), QgsComposerMap::QgsComposerMap(), and QgsAtlasComposition::readXML().
|
signal |
Is emitted when a new composer picture has been added.
Referenced by addComposerPicture(), and sendItemAddedSignal().
|
signal |
Is emitted when new composer scale bar has been added.
Referenced by addComposerScaleBar(), and sendItemAddedSignal().
|
signal |
Is emitted when a new composer shape has been added.
Referenced by addComposerShape(), and sendItemAddedSignal().
|
signal |
Is emitted when a new composer table has been added.
Referenced by addComposerTable(), and sendItemAddedSignal().
|
private |
Definition at line 1816 of file qgscomposition.cpp.
References itemRemoved(), and sendItemAddedSignal().
Referenced by pushAddRemoveCommand(), and removeComposerItem().
|
private |
Definition at line 1935 of file qgscomposition.cpp.
References mMultiFrames.
Referenced by loadFromTemplate(), and ~QgsComposition().
void QgsComposition::doPrint | ( | QPrinter & | printer, |
QPainter & | painter | ||
) |
Print on a preconfigured printer.
Definition at line 1961 of file qgscomposition.cpp.
References mPrintAsRaster, numPages(), printPageAsRaster(), and renderPage().
Referenced by print().
|
staticprivate |
Definition at line 2064 of file qgscomposition.cpp.
Referenced by loadFromTemplate().
void QgsComposition::endCommand | ( | ) |
Saves end state of item and pushes command to the undo history.
Definition at line 1579 of file qgscomposition.cpp.
References QgsComposerItemCommand::containsChange(), QgsProject::dirty(), QgsProject::instance(), mActiveItemCommand, mUndoStack, and QgsComposerItemCommand::saveAfterState().
Referenced by QgsComposerItem::endCommand(), and QgsComposerView::mouseReleaseEvent().
void QgsComposition::endMultiFrameCommand | ( | ) |
Definition at line 1610 of file qgscomposition.cpp.
References QgsComposerMultiFrameCommand::containsChange(), QgsProject::dirty(), QgsProject::instance(), mActiveMultiFrameCommand, mUndoStack, and QgsComposerMultiFrameCommand::saveAfterState().
Referenced by QgsComposerFrame::endItemCommand(), and QgsComposerView::mouseReleaseEvent().
void QgsComposition::exportAsPDF | ( | const QString & | file | ) |
Convenience function that prepares the printer for printing in PDF and prints.
Definition at line 1954 of file qgscomposition.cpp.
References beginPrintAsPDF(), and print().
const QgsComposerHtml * QgsComposition::getComposerHtmlByItem | ( | QgsComposerItem * | item | ) | const |
Definition at line 258 of file qgscomposition.cpp.
References QgsComposerFrame::multiFrame().
const QgsComposerItem * QgsComposition::getComposerItemById | ( | QString | theId | ) | const |
Returns a composer item given its text identifier.
Ids are not necessarely unique, but this function returns only one element.
theId | - A QString representing the identifier of the item to retrieve. |
Definition at line 277 of file qgscomposition.cpp.
References QgsComposerItem::id().
const QgsComposerItem * QgsComposition::getComposerItemByUuid | ( | QString | theUuid | ) | const |
Returns a composer item given its unique identifier.
theUuid | A QString representing the UUID of the item to |
Definition at line 332 of file qgscomposition.cpp.
References QgsComposerItem::uuid().
const QgsComposerMap * QgsComposition::getComposerMapById | ( | int | id | ) | const |
Returns the composer map with specified id.
Definition at line 240 of file qgscomposition.cpp.
References QgsComposerMap::id().
Referenced by QgsComposerMap::assignFreeId(), QgsComposerMap::drawOverviewMapExtent(), QgsComposerAttributeTable::readXML(), QgsComposerPicture::readXML(), QgsComposerLegend::readXML(), QgsComposerScaleBar::readXML(), QgsComposerMap::setOverviewFrameMap(), and QgsComposerPicture::setRotationMap().
|
inline |
Definition at line 117 of file qgscomposition.h.
Referenced by QgsPaperItem::paint().
|
inline |
Definition at line 120 of file qgscomposition.h.
Referenced by QgsPaperItem::paint().
int QgsComposition::itemPageNumber | ( | const QgsComposerItem * | item | ) | const |
Returns on which page number (0-based) is displayed an item.
Definition at line 198 of file qgscomposition.cpp.
References pageNumberAt().
Referenced by QgsComposerLabel::displayText().
|
signal |
Is emitted when a composer item has been removed from the scene.
Referenced by connectAddRemoveCommandSignals(), loadFromTemplate(), and removeComposerItem().
bool QgsComposition::loadFromTemplate | ( | const QDomDocument & | doc, |
QMap< QString, QString > * | substitutionMap = 0 , |
||
bool | addUndoCommands = false |
||
) |
Load a template document.
doc | template document |
substitutionMap | map with text to replace. Text needs to be enclosed by brackets (e.g. '[text]' ) |
addUndoCommands | whether or not to add undo commands |
Definition at line 513 of file qgscomposition.cpp.
References addItemsFromXML(), atlasComposition(), deleteAndRemoveMultiFrames(), encodeStringForXML(), itemRemoved(), mItemZList, mPages, mUndoStack, QgsAtlasComposition::readXML(), and readXML().
|
private |
Definition at line 1499 of file qgscomposition.cpp.
References Crosses, Dots, mGridPen, mGridStyle, mSelectionTolerance, and Solid.
Referenced by QgsComposition().
void QgsComposition::lowerItem | ( | QgsComposerItem * | item | ) |
Definition at line 892 of file qgscomposition.cpp.
References mItemZList.
Referenced by lowerSelectedItems().
void QgsComposition::lowerSelectedItems | ( | ) |
Definition at line 878 of file qgscomposition.cpp.
References lowerItem(), selectedComposerItems(), and updateZValues().
|
inline |
Returns pointer to map renderer of qgis map canvas.
Definition at line 196 of file qgscomposition.h.
Referenced by QgsAtlasComposition::beginRender(), QgsAtlasComposition::endRender(), QgsComposerLegend::layerIdList(), and QgsComposerMap::QgsComposerMap().
void QgsComposition::moveItemToBottom | ( | QgsComposerItem * | item | ) |
Definition at line 948 of file qgscomposition.cpp.
References mItemZList.
Referenced by moveSelectedItemsToBottom().
void QgsComposition::moveItemToTop | ( | QgsComposerItem * | item | ) |
Definition at line 923 of file qgscomposition.cpp.
References mItemZList.
Referenced by moveSelectedItemsToTop().
void QgsComposition::moveSelectedItemsToBottom | ( | ) |
Definition at line 934 of file qgscomposition.cpp.
References moveItemToBottom(), selectedComposerItems(), and updateZValues().
void QgsComposition::moveSelectedItemsToTop | ( | ) |
Definition at line 908 of file qgscomposition.cpp.
References moveItemToTop(), selectedComposerItems(), and updateZValues().
|
staticprivate |
Find nearest item in coordinate map to a double.
Definition at line 2136 of file qgscomposition.cpp.
Referenced by alignPos(), and checkNearestItem().
QGraphicsLineItem * QgsComposition::nearestSnapLine | ( | bool | horizontal, |
double | x, | ||
double | y, | ||
double | tolerance, | ||
QList< QPair< QgsComposerItem *, QgsComposerItem::ItemPositionMode > > & | snappedItems | ||
) |
Get nearest snap line.
Definition at line 1327 of file qgscomposition.cpp.
References QgsComposerItem::ComposerPaper, QgsComposerItem::LowerMiddle, QgsComposerItem::Middle, QgsComposerItem::MiddleLeft, QgsComposerItem::MiddleRight, mSnapLines, qgsDoubleNear(), QgsComposerItem::type(), and QgsComposerItem::UpperMiddle.
Referenced by QgsComposerRuler::mousePressEvent().
|
signal |
Referenced by setNumPages().
int QgsComposition::numPages | ( | ) | const |
Note: added in version 1.9.
Definition at line 162 of file qgscomposition.cpp.
References mPages.
Referenced by QgsAtlasComposition::beginRender(), QgsComposerItem::changeItemRectangle(), doPrint(), QgsComposerMultiFrame::handlePageChange(), QgsComposerRuler::paintEvent(), readXML(), QgsComposerMultiFrame::recalculateFrameSizes(), setNumPages(), and QgsComposerRuler::setSnapLinePosition().
int QgsComposition::pageNumberAt | ( | const QPointF & | position | ) | const |
Returns the page number (0-bsaed) given a coordinate.
Definition at line 193 of file qgscomposition.cpp.
References paperHeight(), and spaceBetweenPages().
Referenced by addItemsFromXML(), and itemPageNumber().
double QgsComposition::paperHeight | ( | ) | const |
Returns height of paper item.
Definition at line 125 of file qgscomposition.cpp.
References mPageHeight.
Referenced by addItemsFromXML(), addPaperItem(), beginPrintAsPDF(), QgsComposerItem::changeItemRectangle(), QgsComposerMultiFrame::handlePageChange(), pageNumberAt(), QgsComposerRuler::paintEvent(), printPageAsRaster(), QgsComposerMultiFrame::recalculateFrameSizes(), and QgsComposerRuler::setSnapLinePosition().
|
signal |
Referenced by readXML().
double QgsComposition::paperWidth | ( | ) | const |
Returns width of paper item.
Definition at line 130 of file qgscomposition.cpp.
References mPageWidth.
Referenced by addPaperItem(), beginPrintAsPDF(), QgsComposerItem::changeItemRectangle(), printPageAsRaster(), and QgsComposerRuler::setSnapLinePosition().
int QgsComposition::pixelFontSize | ( | double | pointSize | ) | const |
Returns the pixel font size for a font that has point size set.
The result depends on the resolution (dpi) and of the preview mode. Each item that sets a font should call this function before drawing text
Definition at line 369 of file qgscomposition.cpp.
|
inline |
Definition at line 198 of file qgscomposition.h.
Referenced by QgsComposerItemGroup::drawFrame(), QgsComposerItem::drawSelectionBoxes(), QgsComposerArrow::drawSVGMarker(), QgsPaperItem::paint(), QgsComposerLabel::paint(), and QgsComposerMap::paint().
double QgsComposition::pointFontSize | ( | int | pixelSize | ) | const |
Does the inverse calculation and returns points for pixels (equals to mm in QgsComposition)
Definition at line 376 of file qgscomposition.cpp.
void QgsComposition::print | ( | QPrinter & | printer | ) |
Convenience function that prepares the printer and prints.
Definition at line 2008 of file qgscomposition.cpp.
References beginPrint(), and doPrint().
Referenced by exportAsPDF().
|
inline |
Definition at line 182 of file qgscomposition.h.
QImage QgsComposition::printPageAsRaster | ( | int | page | ) |
print composer page to image If the image does not fit into memory, a null image is returned
Definition at line 2015 of file qgscomposition.cpp.
References paperHeight(), paperWidth(), printResolution(), and renderPage().
Referenced by doPrint().
|
inline |
Definition at line 179 of file qgscomposition.h.
Referenced by beginPrint(), QgsComposerMap::drawGridLine(), QgsComposerMap::drawOverviewMapExtent(), QgsComposerHtml::htmlUnitsToMM(), QgsComposerLabel::htmlUnitsToMM(), and printPageAsRaster().
void QgsComposition::pushAddRemoveCommand | ( | QgsComposerItem * | item, |
const QString & | text, | ||
QgsAddRemoveItemCommand::State | state = QgsAddRemoveItemCommand::Added |
||
) |
Convenience function to create a QgsAddRemoveItemCommand, connect its signals and push it to the undo stack.
Definition at line 1808 of file qgscomposition.cpp.
References connectAddRemoveCommandSignals(), QgsProject::dirty(), QgsProject::instance(), and undoStack().
Referenced by addItemsFromXML(), QgsComposerView::addShape(), QgsComposerView::mousePressEvent(), QgsComposerView::mouseReleaseEvent(), and removeComposerItem().
void QgsComposition::raiseItem | ( | QgsComposerItem * | item | ) |
Definition at line 863 of file qgscomposition.cpp.
References mItemZList.
Referenced by raiseSelectedItems().
void QgsComposition::raiseSelectedItems | ( | ) |
Definition at line 849 of file qgscomposition.cpp.
References raiseItem(), selectedComposerItems(), and updateZValues().
bool QgsComposition::readXML | ( | const QDomElement & | compositionElem, |
const QDomDocument & | doc | ||
) |
Reads settings from xml file.
Definition at line 452 of file qgscomposition.cpp.
References addPaperItem(), addSnapLine(), mAlignmentSnap, mAlignmentSnapTolerance, mPageHeight, mPageWidth, mPrintAsRaster, mPrintResolution, mSnapGridOffsetX, mSnapGridOffsetY, mSnapGridResolution, mSnapToGrid, numPages(), paperSizeChanged(), removePaperItems(), and updatePaperItems().
Referenced by loadFromTemplate().
void QgsComposition::removeComposerItem | ( | QgsComposerItem * | item, |
bool | createCommand = true |
||
) |
Remove item from the graphics scene.
Additionally to QGraphicsScene::removeItem, this function considers undo/redo command
Definition at line 1736 of file qgscomposition.cpp.
References QgsComposerItem::beginItemCommand(), QgsComposerItem::ComposerFrame, connectAddRemoveCommandSignals(), QgsComposerItem::endItemCommand(), QgsComposerMultiFrame::frameCount(), QgsComposerMap::isDrawing(), itemRemoved(), QgsComposerItemGroup::items(), pushAddRemoveCommand(), QgsAddRemoveMultiFrameCommand::Removed, QgsAddRemoveItemCommand::Removed, removeMultiFrame(), tr, QgsComposerItem::type(), and undoStack().
Referenced by QgsComposerMultiFrame::deleteFrames(), QgsComposerView::keyPressEvent(), and QgsComposerMultiFrame::removeFrame().
void QgsComposition::removeItemFromZList | ( | QgsComposerItem * | item | ) |
Removes item from z list.
Usually called from destructor of QgsComposerItem
Definition at line 840 of file qgscomposition.cpp.
References mItemZList.
Referenced by QgsComposerItem::~QgsComposerItem().
void QgsComposition::removeMultiFrame | ( | QgsComposerMultiFrame * | multiFrame | ) |
Removes multi frame (but does not delete it)
Definition at line 1633 of file qgscomposition.cpp.
References mMultiFrames.
Referenced by removeComposerItem(), and QgsAddRemoveMultiFrameCommand::switchState().
|
private |
Definition at line 1925 of file qgscomposition.cpp.
References mPages, and QgsExpression::setSpecialColumn().
Referenced by readXML(), and ~QgsComposition().
void QgsComposition::removeSnapLine | ( | QGraphicsLineItem * | line | ) |
Remove custom snap line (and delete the object)
Definition at line 1304 of file qgscomposition.cpp.
References mSnapLines.
Referenced by QgsComposerRuler::mouseReleaseEvent().
void QgsComposition::renderPage | ( | QPainter * | p, |
int | page | ||
) |
Render a page to a paint device.
Definition at line 2033 of file qgscomposition.cpp.
References mPages, mPlotStyle, Print, and setSnapLinesVisible().
Referenced by doPrint(), and printPageAsRaster().
|
private |
Definition at line 1533 of file qgscomposition.cpp.
References Crosses, Dots, mGridPen, mGridStyle, mSelectionTolerance, and Solid.
Referenced by setGridPen(), setGridStyle(), setSelectionTolerance(), setSnapGridOffsetX(), setSnapGridOffsetY(), setSnapGridResolution(), and setSnapToGridEnabled().
QList< QgsComposerItem * > QgsComposition::selectedComposerItems | ( | ) |
Definition at line 203 of file qgscomposition.cpp.
Referenced by alignSelectedItemsBottom(), alignSelectedItemsHCenter(), alignSelectedItemsLeft(), alignSelectedItemsRight(), alignSelectedItemsTop(), alignSelectedItemsVCenter(), boundingRectOfSelectedItems(), QgsComposerView::groupItems(), QgsComposerView::keyPressEvent(), lowerSelectedItems(), moveSelectedItemsToBottom(), moveSelectedItemsToTop(), raiseSelectedItems(), and QgsComposerView::ungroupItems().
|
signal |
Is emitted when selected item changed.
If 0, no item is selected
Referenced by addComposerArrow(), addComposerHtmlFrame(), addComposerLabel(), addComposerLegend(), addComposerMap(), addComposerPicture(), addComposerScaleBar(), addComposerShape(), addComposerTable(), and sendItemAddedSignal().
|
inline |
Definition at line 192 of file qgscomposition.h.
|
slot |
Casts object to the proper subclass type and calls corresponding itemAdded signal.
Definition at line 1827 of file qgscomposition.cpp.
References composerArrowAdded(), composerHtmlFrameAdded(), composerLabelAdded(), composerLegendAdded(), composerMapAdded(), composerPictureAdded(), composerScaleBarAdded(), composerShapeAdded(), composerTableAdded(), QgsComposerFrame::multiFrame(), selectedItemChanged(), and QgsComposerItem::setSelected().
Referenced by connectAddRemoveCommandSignals().
|
inline |
Definition at line 122 of file qgscomposition.h.
|
inline |
Definition at line 125 of file qgscomposition.h.
void QgsComposition::setGridPen | ( | const QPen & | p | ) |
Definition at line 1479 of file qgscomposition.cpp.
References mGridPen, saveSettings(), and updatePaperItems().
void QgsComposition::setGridStyle | ( | GridStyle | s | ) |
Definition at line 1486 of file qgscomposition.cpp.
References mGridStyle, saveSettings(), and updatePaperItems().
void QgsComposition::setNumPages | ( | int | pages | ) |
Note: added in version 1.9.
Definition at line 135 of file qgscomposition.cpp.
References addPaperItem(), mPages, nPagesChanged(), numPages(), and QgsExpression::setSpecialColumn().
Referenced by QgsComposerMultiFrame::recalculateFrameSizes().
void QgsComposition::setPaperSize | ( | double | width, |
double | height | ||
) |
Changes size of paper item.
Definition at line 113 of file qgscomposition.cpp.
References mPageHeight, mPages, mPageWidth, and mSpaceBetweenPages.
|
inline |
Definition at line 199 of file qgscomposition.h.
|
inline |
Definition at line 183 of file qgscomposition.h.
|
inline |
Definition at line 180 of file qgscomposition.h.
void QgsComposition::setSelectionTolerance | ( | double | tol | ) |
Definition at line 1493 of file qgscomposition.cpp.
References mSelectionTolerance, and saveSettings().
void QgsComposition::setSnapGridOffsetX | ( | double | offset | ) |
Definition at line 1465 of file qgscomposition.cpp.
References mSnapGridOffsetX, saveSettings(), and updatePaperItems().
void QgsComposition::setSnapGridOffsetY | ( | double | offset | ) |
Definition at line 1472 of file qgscomposition.cpp.
References mSnapGridOffsetY, saveSettings(), and updatePaperItems().
void QgsComposition::setSnapGridResolution | ( | double | r | ) |
Definition at line 1458 of file qgscomposition.cpp.
References mSnapGridResolution, saveSettings(), and updatePaperItems().
void QgsComposition::setSnapLinesVisible | ( | bool | visible | ) |
Hides / shows custom snap lines.
Definition at line 1311 of file qgscomposition.cpp.
References mSnapLines.
Referenced by renderPage().
void QgsComposition::setSnapToGridEnabled | ( | bool | b | ) |
Definition at line 1451 of file qgscomposition.cpp.
References mSnapToGrid, saveSettings(), and updatePaperItems().
void QgsComposition::setUseAdvancedEffects | ( | bool | effectsEnabled | ) |
Used to enable or disable advanced effects such as blend modes in a composition.
Definition at line 352 of file qgscomposition.cpp.
References mUseAdvancedEffects, and QgsComposerItem::setEffectsEnabled().
|
inline |
Definition at line 111 of file qgscomposition.h.
Referenced by QgsPaperItem::paint().
|
inline |
Definition at line 114 of file qgscomposition.h.
Referenced by QgsPaperItem::paint().
|
inline |
Definition at line 108 of file qgscomposition.h.
Referenced by QgsPaperItem::paint().
QPointF QgsComposition::snapPointToGrid | ( | const QPointF & | scenePoint | ) | const |
Snaps a scene coordinate point to grid.
Definition at line 1188 of file qgscomposition.cpp.
References mPageHeight, mSnapGridOffsetX, mSnapGridOffsetY, mSnapGridResolution, mSnapToGrid, and mSpaceBetweenPages.
Referenced by QgsComposerItem::changeItemRectangle(), QgsComposerView::mousePressEvent(), and QgsComposerView::mouseReleaseEvent().
|
inline |
Definition at line 105 of file qgscomposition.h.
Referenced by QgsPaperItem::paint().
void QgsComposition::sortZList | ( | ) |
Sorts the zList.
The only time where this function needs to be called is from QgsComposer after reading all the items from xml file
Definition at line 1162 of file qgscomposition.cpp.
References mItemZList.
|
inline |
Definition at line 97 of file qgscomposition.h.
Referenced by addItemsFromXML(), QgsComposerItem::changeItemRectangle(), QgsComposerMultiFrame::handlePageChange(), pageNumberAt(), QgsComposerRuler::paintEvent(), QgsComposerMultiFrame::recalculateFrameSizes(), and QgsComposerRuler::setSnapLinePosition().
|
inline |
Returns pointer to undo/redo command storage.
Definition at line 129 of file qgscomposition.h.
Referenced by QgsComposerView::mouseReleaseEvent(), pushAddRemoveCommand(), and removeComposerItem().
|
private |
Definition at line 1902 of file qgscomposition.cpp.
References mPages.
Referenced by readXML(), setGridPen(), setGridStyle(), setSnapGridOffsetX(), setSnapGridOffsetY(), setSnapGridResolution(), and setSnapToGridEnabled().
|
private |
Reset z-values of items based on position in z list.
Definition at line 1140 of file qgscomposition.cpp.
References mItemZList, mUndoStack, QgsComposerItemCommand::saveAfterState(), QgsComposerItemCommand::savePreviousState(), and tr.
Referenced by lowerSelectedItems(), moveSelectedItemsToBottom(), moveSelectedItemsToTop(), and raiseSelectedItems().
|
inline |
Returns true if a composition should use advanced effects such as blend modes.
Definition at line 187 of file qgscomposition.h.
Referenced by QgsComposerMap::draw().
bool QgsComposition::writeXML | ( | QDomElement & | composerElem, |
QDomDocument & | doc | ||
) |
Writes settings to xml (paper dimension)
Definition at line 382 of file qgscomposition.cpp.
References QgsComposerItem::ComposerFrame, QgsComposerItem::ComposerPaper, mAlignmentSnap, mAlignmentSnapTolerance, mMultiFrames, mPageHeight, mPages, mPageWidth, mPrintAsRaster, mPrintResolution, mSnapGridOffsetX, mSnapGridOffsetY, mSnapGridResolution, mSnapLines, mSnapToGrid, QgsComposerItem::type(), and QgsComposerItem::writeXML().
|
private |
Definition at line 410 of file qgscomposition.h.
Referenced by beginCommand(), cancelCommand(), endCommand(), and ~QgsComposition().
|
private |
Definition at line 411 of file qgscomposition.h.
Referenced by beginMultiFrameCommand(), endMultiFrameCommand(), and ~QgsComposition().
|
private |
Parameters for alignment snap.
Definition at line 402 of file qgscomposition.h.
Referenced by readXML(), and writeXML().
|
private |
Definition at line 403 of file qgscomposition.h.
Referenced by alignPos(), checkNearestItem(), readXML(), and writeXML().
|
private |
The atlas composition object.
It is held by the QgsComposition
Definition at line 414 of file qgscomposition.h.
|
private |
Definition at line 398 of file qgscomposition.h.
Referenced by loadSettings(), saveSettings(), and setGridPen().
|
private |
Definition at line 399 of file qgscomposition.h.
Referenced by loadSettings(), saveSettings(), and setGridStyle().
|
private |
Maintains z-Order of items.
Starts with item at position 1 (position 0 is always paper item)
Definition at line 376 of file qgscomposition.h.
Referenced by addItemToZList(), loadFromTemplate(), lowerItem(), moveItemToBottom(), moveItemToTop(), raiseItem(), removeItemFromZList(), sortZList(), and updateZValues().
|
private |
Pointer to map renderer of QGIS main map.
Definition at line 368 of file qgscomposition.h.
|
private |
List multiframe objects.
Definition at line 379 of file qgscomposition.h.
Referenced by addMultiFrame(), deleteAndRemoveMultiFrames(), removeMultiFrame(), and writeXML().
|
private |
Definition at line 371 of file qgscomposition.h.
Referenced by addItemsFromXML(), paperHeight(), readXML(), setPaperSize(), snapPointToGrid(), and writeXML().
|
private |
Definition at line 372 of file qgscomposition.h.
Referenced by addPaperItem(), loadFromTemplate(), numPages(), removePaperItems(), renderPage(), setNumPages(), setPaperSize(), updatePaperItems(), and writeXML().
|
private |
Definition at line 370 of file qgscomposition.h.
Referenced by paperWidth(), readXML(), setPaperSize(), and writeXML().
|
private |
Definition at line 369 of file qgscomposition.h.
Referenced by renderPage().
|
private |
Flag if map should be printed as a raster (via QImage).
False by default
Definition at line 385 of file qgscomposition.h.
Referenced by doPrint(), readXML(), and writeXML().
|
private |
Dpi for printout.
Definition at line 382 of file qgscomposition.h.
Referenced by QgsComposition(), readXML(), and writeXML().
|
private |
Distance tolerance for item selection (in mm)
Definition at line 391 of file qgscomposition.h.
Referenced by composerItemAt(), loadSettings(), saveSettings(), and setSelectionTolerance().
|
private |
Definition at line 396 of file qgscomposition.h.
Referenced by readXML(), setSnapGridOffsetX(), snapPointToGrid(), and writeXML().
|
private |
Definition at line 397 of file qgscomposition.h.
Referenced by readXML(), setSnapGridOffsetY(), snapPointToGrid(), and writeXML().
|
private |
Definition at line 395 of file qgscomposition.h.
Referenced by readXML(), setSnapGridResolution(), snapPointToGrid(), and writeXML().
|
private |
Arbitraty snap lines (horizontal and vertical)
Definition at line 406 of file qgscomposition.h.
Referenced by addSnapLine(), collectAlignCoordinates(), nearestSnapLine(), removeSnapLine(), setSnapLinesVisible(), and writeXML().
|
private |
Parameters for snap to grid function.
Definition at line 394 of file qgscomposition.h.
Referenced by readXML(), setSnapToGridEnabled(), snapPointToGrid(), and writeXML().
|
private |
Definition at line 373 of file qgscomposition.h.
Referenced by addItemsFromXML(), addPaperItem(), setPaperSize(), and snapPointToGrid().
|
private |
Definition at line 408 of file qgscomposition.h.
Referenced by alignSelectedItemsBottom(), alignSelectedItemsHCenter(), alignSelectedItemsLeft(), alignSelectedItemsRight(), alignSelectedItemsTop(), alignSelectedItemsVCenter(), endCommand(), endMultiFrameCommand(), loadFromTemplate(), and updateZValues().
|
private |
Flag if advanced visual effects such as blend modes should be used.
True by default
Definition at line 388 of file qgscomposition.h.
Referenced by setUseAdvancedEffects().