17 #ifndef QGSCOMPOSERVIEW_H
18 #define QGSCOMPOSERVIEW_H
20 #include <QGraphicsView>
91 ActiveUntilMouseRelease
94 QgsComposerView( QWidget* parent = 0,
const char* name = 0, Qt::WindowFlags f = 0 );
103 void copyItems( ClipboardMode mode );
106 void pasteItems( PasteMode mode );
109 void deleteSelectedItems();
132 QMainWindow* composerWindow();
144 void setZoomLevel(
double zoomLevel );
151 void setPreviewModeEnabled(
bool enabled );
161 void mousePressEvent( QMouseEvent* )
override;
162 void mouseReleaseEvent( QMouseEvent* )
override;
163 void mouseMoveEvent( QMouseEvent* )
override;
164 void mouseDoubleClickEvent( QMouseEvent* e )
override;
166 void keyPressEvent( QKeyEvent * e )
override;
167 void keyReleaseEvent( QKeyEvent * e )
override;
169 void wheelEvent( QWheelEvent* event )
override;
171 void paintEvent( QPaintEvent* event )
override;
173 void hideEvent( QHideEvent* e )
override;
174 void showEvent( QShowEvent* e )
override;
176 void resizeEvent( QResizeEvent* event )
override;
177 void scrollContentsBy(
int dx,
int dy )
override;
186 QGraphicsRectItem* mRubberBandItem;
188 QGraphicsLineItem* mRubberBandLineItem;
192 QPointF mMoveContentStartPos;
194 QPointF mRubberBandStartPos;
203 bool mPaintingEnabled;
209 void addShape( Tool currentTool );
219 bool mMovingItemContent;
222 QPoint mMouseCurrentXY;
223 QPoint mMousePressStartPos;
228 QCursor defaultCursorForTool( Tool currentTool );
231 void wheelZoom( QWheelEvent * event );
233 void updateRubberBandRect( QPointF & pos,
const bool constrainSquare =
false,
const bool fromCenter =
false );
235 void updateRubberBandLine(
const QPointF & pos,
const bool constrainAngles =
false );
237 void removeRubberBand();
240 void startMarqueeSelect( QPointF & scenePoint );
242 void endMarqueeSelect( QMouseEvent* e );
244 void startMarqueeZoom( QPointF & scenePoint );
246 void endMarqueeZoom( QMouseEvent* e );
257 void actionFinished();
259 void cursorPosChanged( QPointF );
261 void zoomLevelChanged();