Version: 9.15.0
QtViewer_ViewPort Class Reference

#include <QtViewer_ViewPort.h>

Inheritance diagram for QtViewer_ViewPort:
Inheritance graph

Public Slots

virtual void updateSceneRect (const QRectF &rect)
 

Signals

void vpMouseEvent (QMouseEvent *)
 

Public Member Functions

 QtViewer_ViewPort (QWidget *theParent)
 
 ~QtViewer_ViewPort ()
 
void addItem (QGraphicsItem *theItem)
 
void fitAll ()
 
void fitSelect ()
 
void fitRect (const QRectF &theRect)
 
void pan (double theDX, double theDY)
 
void startDrawingRect (int x, int y)
 
void drawingRect (int x, int y)
 
void finishDrawingRect ()
 
QRect selectionRect ()
 
void activateZoomAction ()
 
void activateFitAreaAction ()
 
void activatePanAction ()
 
void activateGlobalPanAction ()
 
QImage dumpView (bool theWholeScene=false, QSizeF theSize=QSizeF())
 
bool dumpViewToFormat (const QString &fileName, const QString &format)
 
void addForegroundObject (QSharedPointer< QtViewer_PainterObject > obj)
 
void resetForeground ()
 

Protected Member Functions

virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void drawForeground (QPainter *painter, const QRectF &rect)
 
void clearActions ()
 

Private Attributes

double myFitAllGap
 
QRubberBand * myRectBand
 
QPoint myRectBandStart
 
QPoint myRectBandEnd
 
bool fittingArea
 
bool zooming
 
bool panning
 
bool globalPanning
 
QPoint previousPos
 
QCursor * zoomCursor
 
QList< QSharedPointer< QtViewer_PainterObject > > foregroundObjects
 

Constructor & Destructor Documentation

◆ QtViewer_ViewPort()

◆ ~QtViewer_ViewPort()

QtViewer_ViewPort::~QtViewer_ViewPort ( )

References zoomCursor.

Member Function Documentation

◆ activateFitAreaAction()

void QtViewer_ViewPort::activateFitAreaAction ( )

◆ activateGlobalPanAction()

void QtViewer_ViewPort::activateGlobalPanAction ( )

◆ activatePanAction()

void QtViewer_ViewPort::activatePanAction ( )

◆ activateZoomAction()

void QtViewer_ViewPort::activateZoomAction ( )

◆ addForegroundObject()

void QtViewer_ViewPort::addForegroundObject ( QSharedPointer< QtViewer_PainterObject obj)
inline

◆ addItem()

void QtViewer_ViewPort::addItem ( QGraphicsItem theItem)

◆ clearActions()

void QtViewer_ViewPort::clearActions ( )
protected

◆ drawForeground()

void QtViewer_ViewPort::drawForeground ( QPainter *  painter,
const QRectF &  rect 
)
protectedvirtual

References foregroundObjects.

◆ drawingRect()

void QtViewer_ViewPort::drawingRect ( int  x,
int  y 
)

◆ dumpView()

QImage QtViewer_ViewPort::dumpView ( bool  theWholeScene = false,
QSizeF  theSize = QSizeF() 
)

◆ dumpViewToFormat()

bool QtViewer_ViewPort::dumpViewToFormat ( const QString &  fileName,
const QString &  format 
)

◆ finishDrawingRect()

void QtViewer_ViewPort::finishDrawingRect ( )

◆ fitAll()

void QtViewer_ViewPort::fitAll ( )

References myFitAllGap.

◆ fitRect()

void QtViewer_ViewPort::fitRect ( const QRectF &  theRect)

◆ fitSelect()

void QtViewer_ViewPort::fitSelect ( )

References myFitAllGap, and selectionRect().

◆ keyPressEvent()

void QtViewer_ViewPort::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

References clearActions().

◆ mouseMoveEvent()

void QtViewer_ViewPort::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

◆ mousePressEvent()

void QtViewer_ViewPort::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

◆ mouseReleaseEvent()

void QtViewer_ViewPort::mouseReleaseEvent ( QMouseEvent *  event)
protectedvirtual

◆ pan()

void QtViewer_ViewPort::pan ( double  theDX,
double  theDY 
)

◆ resetForeground()

void QtViewer_ViewPort::resetForeground ( )

References foregroundObjects.

◆ resizeEvent()

void QtViewer_ViewPort::resizeEvent ( QResizeEvent *  event)
protectedvirtual

◆ selectionRect()

QRect QtViewer_ViewPort::selectionRect ( )

◆ startDrawingRect()

void QtViewer_ViewPort::startDrawingRect ( int  x,
int  y 
)

◆ updateSceneRect

void QtViewer_ViewPort::updateSceneRect ( const QRectF &  rect)
virtualslot

◆ vpMouseEvent

void QtViewer_ViewPort::vpMouseEvent ( QMouseEvent *  )
signal

◆ wheelEvent()

void QtViewer_ViewPort::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Member Data Documentation

◆ fittingArea

bool QtViewer_ViewPort::fittingArea
private

◆ foregroundObjects

QList<QSharedPointer<QtViewer_PainterObject> > QtViewer_ViewPort::foregroundObjects
private

◆ globalPanning

bool QtViewer_ViewPort::globalPanning
private

◆ myFitAllGap

double QtViewer_ViewPort::myFitAllGap
private

◆ myRectBand

QRubberBand* QtViewer_ViewPort::myRectBand
private

◆ myRectBandEnd

QPoint QtViewer_ViewPort::myRectBandEnd
private

◆ myRectBandStart

QPoint QtViewer_ViewPort::myRectBandStart
private

◆ panning

bool QtViewer_ViewPort::panning
private

◆ previousPos

QPoint QtViewer_ViewPort::previousPos
private

◆ zoomCursor

QCursor* QtViewer_ViewPort::zoomCursor
private

◆ zooming

bool QtViewer_ViewPort::zooming
private

The documentation for this class was generated from the following files: