QGIS API Documentation
2.8.2-Wien
|
Widget to display the composer items. More...
#include <qgscomposerview.h>
Public Types | |
enum | ClipboardMode { ClipboardModeCut, ClipboardModeCopy } |
enum | PasteMode { PasteModeCursor, PasteModeCenter, PasteModeInPlace } |
enum | Tool { Select = 0, AddArrow, AddHtml, AddMap, AddLegend, AddLabel, AddScalebar, AddPicture, AddRectangle, AddEllipse, AddTriangle, AddTable, AddAttributeTable, MoveItemContent, Pan, Zoom } |
Current tool. More... | |
enum | ToolStatus { Inactive, Active, ActiveUntilMouseRelease } |
Signals | |
void | actionFinished () |
Current action (e.g. | |
void | composerViewHide (QgsComposerView *) |
Emitted before composerview is hidden. | |
void | composerViewShow (QgsComposerView *) |
Emitted before composerview is shown. | |
void | compositionSet (QgsComposition *) |
Emitted when the composition is set for the view. | |
void | cursorPosChanged (QPointF) |
Is emitted when mouse cursor coordinates change. | |
void | itemRemoved (QgsComposerItem *) |
Is emitted when a composer item has been removed from the scene. | |
void | selectedItemChanged (QgsComposerItem *selected) |
Is emitted when selected item changed. | |
void | zoomLevelChanged () |
Is emitted when the view zoom changes. |
Public Member Functions | |
QgsComposerView (QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0) | |
QMainWindow * | composerWindow () |
Returns the composer main window. | |
QgsComposition * | composition () |
Returns the composition or 0 in case of error. | |
void | copyItems (ClipboardMode mode) |
Cuts or copies the selected items. | |
QgsComposerView::Tool | currentTool () const |
void | deleteSelectedItems () |
Deletes selected items. | |
void | groupItems () |
Add an item group containing the selected items. | |
bool | paintingEnabled () const |
void | pasteItems (PasteMode mode) |
Pastes items from clipboard. | |
void | selectAll () |
Selects all items. | |
void | selectInvert () |
Inverts current selection. | |
void | selectNone () |
Deselects all items. | |
void | setComposition (QgsComposition *c) |
Sets the composition for the view. | |
void | setCurrentTool (QgsComposerView::Tool t) |
void | setHorizontalRuler (QgsComposerRuler *r) |
void | setPaintingEnabled (bool enabled) |
void | setPreviewMode (QgsPreviewEffect::PreviewMode mode) |
Sets the preview mode which should be used to modify the view's appearance. | |
void | setPreviewModeEnabled (bool enabled) |
Sets whether a preview effect should be used to alter the view's appearance. | |
void | setVerticalRuler (QgsComposerRuler *r) |
void | setZoomLevel (double zoomLevel) |
Set zoom level, where a zoom level of 1.0 corresponds to 100%. | |
void | ungroupItems () |
Ungroups the selected items. | |
void | updateRulers () |
Update rulers with current scene rect. |
Protected Member Functions | |
void | hideEvent (QHideEvent *e) override |
void | keyPressEvent (QKeyEvent *e) override |
void | keyReleaseEvent (QKeyEvent *e) override |
void | mouseDoubleClickEvent (QMouseEvent *e) override |
void | mouseMoveEvent (QMouseEvent *) override |
void | mousePressEvent (QMouseEvent *) override |
void | mouseReleaseEvent (QMouseEvent *) override |
void | paintEvent (QPaintEvent *event) override |
void | resizeEvent (QResizeEvent *event) override |
void | scrollContentsBy (int dx, int dy) override |
void | showEvent (QShowEvent *e) override |
void | wheelEvent (QWheelEvent *event) override |
Widget to display the composer items.
Manages the composer tools and the mouse/key events. Creates the composer items according to the current map tools and keeps track of the rubber band item.
Definition at line 47 of file qgscomposerview.h.
Definition at line 74 of file qgscomposerview.h.
Definition at line 80 of file qgscomposerview.h.
Current tool.
Select | |
AddArrow | |
AddHtml | |
AddMap | |
AddLegend | |
AddLabel | |
AddScalebar | |
AddPicture | |
AddRectangle | |
AddEllipse | |
AddTriangle | |
AddTable | |
AddAttributeTable | |
MoveItemContent | |
Pan | |
Zoom |
Definition at line 54 of file qgscomposerview.h.
Definition at line 87 of file qgscomposerview.h.
QgsComposerView::QgsComposerView | ( | QWidget * | parent = 0 , |
const char * | name = 0 , |
||
Qt::WindowFlags | f = 0 |
||
) |
Definition at line 50 of file qgscomposerview.cpp.
|
signal |
Current action (e.g.
adding composer map) has been finished. The purpose of this signal is that QgsComposer may set the selection tool again
|
signal |
Emitted before composerview is hidden.
|
signal |
Emitted before composerview is shown.
QMainWindow * QgsComposerView::composerWindow | ( | ) |
Returns the composer main window.
Definition at line 1821 of file qgscomposerview.cpp.
QgsComposition * QgsComposerView::composition | ( | ) |
Returns the composition or 0 in case of error.
Definition at line 1767 of file qgscomposerview.cpp.
|
signal |
Emitted when the composition is set for the view.
void QgsComposerView::copyItems | ( | ClipboardMode | mode | ) |
Cuts or copies the selected items.
Definition at line 1163 of file qgscomposerview.cpp.
|
inline |
Definition at line 120 of file qgscomposerview.h.
|
signal |
Is emitted when mouse cursor coordinates change.
void QgsComposerView::deleteSelectedItems | ( | ) |
Deletes selected items.
Definition at line 1254 of file qgscomposerview.cpp.
void QgsComposerView::groupItems | ( | ) |
Add an item group containing the selected items.
Definition at line 1780 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1726 of file qgscomposerview.cpp.
|
signal |
Is emitted when a composer item has been removed from the scene.
|
overrideprotected |
Definition at line 1345 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1495 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1158 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 961 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 135 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 629 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1713 of file qgscomposerview.cpp.
|
inline |
Definition at line 135 of file qgscomposerview.h.
void QgsComposerView::pasteItems | ( | PasteMode | mode | ) |
Pastes items from clipboard.
Definition at line 1217 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1738 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1745 of file qgscomposerview.cpp.
void QgsComposerView::selectAll | ( | ) |
Selects all items.
Definition at line 1274 of file qgscomposerview.cpp.
|
signal |
Is emitted when selected item changed.
If 0, no item is selected
void QgsComposerView::selectInvert | ( | ) |
Inverts current selection.
Definition at line 1314 of file qgscomposerview.cpp.
void QgsComposerView::selectNone | ( | ) |
Deselects all items.
Definition at line 1304 of file qgscomposerview.cpp.
void QgsComposerView::setComposition | ( | QgsComposition * | c | ) |
Sets the composition for the view.
If the composition is being set manually and not by a QgsComposer, then this must be set BEFORE adding any items to the composition.
Definition at line 1751 of file qgscomposerview.cpp.
void QgsComposerView::setCurrentTool | ( | QgsComposerView::Tool | t | ) |
Definition at line 81 of file qgscomposerview.cpp.
|
inline |
Definition at line 140 of file qgscomposerview.h.
|
inline |
Definition at line 134 of file qgscomposerview.h.
void QgsComposerView::setPreviewMode | ( | QgsPreviewEffect::PreviewMode | mode | ) |
Sets the preview mode which should be used to modify the view's appearance.
Preview modes are only used if setPreviewMode is set to true.
mode | PreviewMode to be used to draw the view |
Definition at line 1703 of file qgscomposerview.cpp.
void QgsComposerView::setPreviewModeEnabled | ( | bool | enabled | ) |
Sets whether a preview effect should be used to alter the view's appearance.
enabled | Set to true to enable the preview effect on the view |
Definition at line 1693 of file qgscomposerview.cpp.
|
inline |
Definition at line 141 of file qgscomposerview.h.
void QgsComposerView::setZoomLevel | ( | double | zoomLevel | ) |
Set zoom level, where a zoom level of 1.0 corresponds to 100%.
Definition at line 1677 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1732 of file qgscomposerview.cpp.
void QgsComposerView::ungroupItems | ( | ) |
Ungroups the selected items.
Definition at line 1801 of file qgscomposerview.cpp.
void QgsComposerView::updateRulers | ( | ) |
Update rulers with current scene rect.
Definition at line 464 of file qgscomposerview.cpp.
|
overrideprotected |
Definition at line 1543 of file qgscomposerview.cpp.
|
signal |
Is emitted when the view zoom changes.