QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RGraphicsView Class Referenceabstract

Graphics view. More...

#include <RGraphicsView.h>

Inheritance diagram for RGraphicsView:
RNonCopyable RGraphicsViewImage

Public Types

enum  ColorMode { FullColor , GrayScale , BlackWhite }
 

Public Member Functions

void addTextLabel (const RTextLabel &textLabel)
 
void autoZoom (int margin=RDEFAULT_MIN1, bool ignoreEmpty=false, bool ignoreLineweight=false)
 
virtual void centerToBox (const RBox &box)
 Centers the view on the given box.
 
virtual void centerToPoint (const RVector &point)
 Centers the view on the given point.
 
void clear ()
 
void clearCaches ()
 
void clearTextLabels ()
 
bool getAntialiasing () const
 
QColor getBackgroundColor ()
 
virtual RBox getBox () const
 
RObject::Id getClosestEntity (const RVector &screenPosition, int range, int strictRange, bool includeLockedLayers=true, bool selectedOnly=false)
 Finds the entity that is the closest to the given screen coordinate (in pixels).
 
RRefPoint getClosestReferencePoint (const RVector &screenPosition, int range)
 Finds the reference point that is the closest to the given screen coordinate (in pixels).
 
RRefPoint getClosestReferencePoint (RObject::Id entityId, const RVector &screenPosition)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
RGraphicsView::ColorMode getColorMode ()
 
RVector getCurrentStepOffset () const
 
double getCurrentStepScaleFactor () const
 
virtual QCursor getCursor ()
 
virtual double getDevicePixelRatio () const
 
RDocumentgetDocument () const
 
RDocumentInterfacegetDocumentInterface () const
 
double getFactor (bool includeStepFactor=true) const
 
bool getForceTextHeightThreshold () const
 
RGridgetGrid ()
 
bool getHairlineMinimumMode ()
 
bool getHairlineMode ()
 
virtual int getHeight () const =0
 
RVector getLastKnownMousePosition () const
 
int getMargin ()
 
virtual RVector getMaximum () const
 
virtual RVector getMinimum () const
 
RVector getOffset (bool includeStepOffset=true) const
 
RGraphicsScenegetScene () const
 
virtual bool getSignalsBlocked () const
 
int getTextHeightThresholdOverride () const
 
QList< RTextLabelgetTextLabels ()
 
int getViewportNumber () const
 
QWidget * getWidget () const
 
virtual int getWidth () const =0
 
virtual void giveFocus ()=0
 
virtual void handleKeyPressEvent (QKeyEvent &event)
 
virtual void handleKeyReleaseEvent (QKeyEvent &event)
 
virtual void handleMouseDoubleClickEvent (RMouseEvent &event)
 This should be called by the mouse double click event handler of a higher level GUI toolkit.
 
virtual void handleMouseMoveEvent (RMouseEvent &event)
 This should be called by the mouse move event handler of a higher level GUI toolkit.
 
virtual void handleMousePressEvent (RMouseEvent &event)
 This should be called by the mouse press event handler of a higher level GUI toolkit.
 
virtual void handleMouseReleaseEvent (RMouseEvent &event)
 This should be called by the mouse release event handler of a higher level GUI toolkit.
 
virtual void handlePanGestureEvent (QPanGesture &gesture)
 
virtual void handlePinchGestureEvent (QPinchGesture &gesture)
 
virtual void handleSwipeGestureEvent (QSwipeGesture &gesture)
 
virtual void handleTabletEvent (RTabletEvent &event)
 This should be called by the tablet event handler of a higher level GUI toolkit.
 
virtual void handleTerminateEvent (RTerminateEvent &event)
 
virtual void handleWheelEvent (RWheelEvent &event)
 This should be called by the mouse wheel event handler of a higher level GUI toolkit.
 
virtual bool hasFocus ()=0
 
virtual int isActive () const
 
bool isExporting () const
 
bool isGridVisible () const
 
bool isPathVisible (const RPainterPath &path) const
 
bool isPrinting () const
 
bool isPrintingOrExporting () const
 
bool isPrintPreview () const
 
virtual bool isShared () const
 Reimplementations may return true to prevent this view from being deleted.
 
virtual QList< RVectormapCornersFromView () const
 
virtual double mapDistanceFromView (double d) const =0
 Maps the given view distance in pixels to a model distance.
 
virtual double mapDistanceToView (double d) const =0
 Maps the given model distance to a screen distance in pixels.
 
virtual RVector mapFromView (const RVector &v, double z=0.0) const =0
 Maps the given view coordinate in pixels to a model coordinate.
 
virtual RBox mapToView (const RBox &box) const
 Finds the entity that is the closest to the given screen coordinate (in pixels) and inside the current UCS (read floor).
 
virtual RVector mapToView (const RVector &v) const =0
 Maps the given model coordinate to a view coordinate in pixels.
 
virtual void paintCursorLine (const RLine &)
 
virtual void paintGridLine (const RLine &)
 
virtual void paintGridPoint (const RVector &)
 
virtual void paintGridPoints (const QVector< double > &ucsPositionX, const QVector< double > &ucsPositionY)
 
virtual void pan (const RVector &delta, bool regen=true)
 Pans (scrolls) by the given amount delta which is a vector in screen coordinates (pixels).
 
virtual void regenerate (bool force=false)=0
 Regenerates the view to show the visible parts of the underlying scene.
 
virtual void regenerate (QSet< RObject::Id > &affectedEntities)
 
virtual bool registerForFocus () const
 Reimplementations may return true to register this view and allow it to be returned by RDocumentInterface::getLastKnownViewWithFocus.
 
virtual void removeFocus ()=0
 
virtual void repaintView ()=0
 Repaints the view (widget, etc..).
 
void restoreViewport ()
 
 RGraphicsView (RGraphicsScene *scene=NULL)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
void saveViewport ()
 
void setAntialiasing (bool val)
 
virtual void setBackgroundColor (const QColor &col)
 
void setColorMode (RGraphicsView::ColorMode cm)
 
void setCurrentStepOffset (const RVector &s)
 
void setCurrentStepScaleFactor (double f)
 
virtual void setCursor (const QCursor &)
 
virtual void setCursor (Qt::CursorShape)
 
void setDisplayOnlyCurrentUcs (bool on)
 If on is true, only the current UCS and the entities that are in its range are displayed.
 
void setExporting (bool on)
 
void setFactor (double f, bool regen=true)
 
void setForceTextHeightThreshold (bool on)
 
void setGrid (RGrid *g)
 Sets the current grid.
 
void setGridVisible (bool on)
 
void setHairlineMinimumMode (bool on)
 
void setHairlineMode (bool on)
 
void setMargin (int m)
 
void setNavigationAction (RAction *action)
 Sets an action object that is typically used to handle all navigation interaction (zooming, panning, ...).
 
void setOffset (const RVector &offset, bool regen=true)
 
void setPrinting (bool on)
 
void setPrintPointSize (const RVector &s)
 
void setPrintPreview (bool on)
 
virtual void setScene (RGraphicsScene *scene, bool regen=true)
 
virtual void setSignalsBlocked (bool on)
 
void setTextHeightThresholdOverride (int v)
 
void setViewportNumber (int n)
 
void setWidget (QWidget *w)
 
virtual void simulateMouseMoveEvent ()
 
void startPan ()
 
void updateTextHeightThreshold ()
 
virtual void viewportChangeEvent ()
 
virtual void zoom (const RVector &center, double factor)
 Zooms in / out by the given factor towards / from the given center in scene coordinates.
 
void zoomIn ()
 Zooms in by factor 1.2.
 
void zoomIn (const RVector &center, double factor=1.2)
 Zooms in by factor 1.2.
 
void zoomOut ()
 Zooms out by factor 1.2.
 
void zoomOut (const RVector &center, double factor=1.2)
 Zooms out by factor 1.0/1.2.
 
void zoomPrevious ()
 
virtual void zoomTo (const RBox &window, int margin=0)
 Zooms the view in a way that the given window is visible and fills the view.
 
bool zoomToEntities (const QSet< RObject::Id > &ids, int margin=RDEFAULT_MIN1)
 
bool zoomToSelection (int margin=RDEFAULT_MIN1)
 
virtual ~RGraphicsView ()
 

Protected Attributes

bool antialiasing
 
bool autoScalePatterns
 
QColor backgroundColor
 
ColorMode colorMode
 
RVector currentStepOffset
 
double currentStepScaleFactor
 Current scale factor caused by a pinch gesture.
 
bool displayOnlyCurrentUcs
 True to only display entities within the horizontal slice that is defined by the current UCS.
 
bool exporting
 
double factor
 Scale factor from model coordinates to view coordinates.
 
bool forceTextHeightThreshold
 
RGridgrid
 Grid that is currently displayed by this view or NULL.
 
int gridVisible
 
bool hairlineMinimumMode
 
bool hairlineMode
 
RVector lastKnownModelPosition
 
RVector lastKnownScreenPosition
 
int margin
 
RActionnavigationAction
 The navigation action of this view or NULL if no navigation action has been set.
 
RVector offset
 Offset of the zero point from the lower left corner of the view in model coordinates.
 
double previousFactor
 
RVector previousOffset
 
bool printing
 
RVector printPointSize
 
bool printPreview
 
RGraphicsScenescene
 The scene this view is attached to.
 
int textHeightThreshold
 
int textHeightThresholdOverride
 
QList< RTextLabeltextLabels
 Internal list of text labels that were added to this view.
 
int viewportNumber
 
QWidget * widget
 

Additional Inherited Members

- Private Member Functions inherited from RNonCopyable
 RNonCopyable ()
 
virtual ~RNonCopyable ()
 

Detailed Description

Graphics view.

A graphics view displays a (part of a) graphics scene.

Scriptable:\nThis class is available in script environments.\n

Member Enumeration Documentation

◆ ColorMode

Enumerator
FullColor 
GrayScale 
BlackWhite 

Constructor & Destructor Documentation

◆ RGraphicsView()

RGraphicsView::RGraphicsView ( RGraphicsScene * scene = NULL)

Copyright (c) 2011-2018 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

◆ ~RGraphicsView()

RGraphicsView::~RGraphicsView ( )
virtual

Member Function Documentation

◆ addTextLabel()

void RGraphicsView::addTextLabel ( const RTextLabel & textLabel)

◆ autoZoom()

void RGraphicsView::autoZoom ( int margin = RDEFAULT_MIN1,
bool ignoreEmpty = false,
bool ignoreLineweight = false )

◆ centerToBox()

void RGraphicsView::centerToBox ( const RBox & box)
virtual

Centers the view on the given box.

The view is updated.

Parameters
boxBox to move into the center of the drawing in model coordinates.

◆ centerToPoint()

void RGraphicsView::centerToPoint ( const RVector & point)
virtual

Centers the view on the given point.

The view is updated.

Parameters
pointPoint to move into the center of the drawing in model coordinates.

◆ clear()

void RGraphicsView::clear ( )
inline

◆ clearCaches()

void RGraphicsView::clearCaches ( )

◆ clearTextLabels()

void RGraphicsView::clearTextLabels ( )

◆ getAntialiasing()

bool RGraphicsView::getAntialiasing ( ) const

◆ getBackgroundColor()

QColor RGraphicsView::getBackgroundColor ( )

◆ getBox()

RBox RGraphicsView::getBox ( ) const
virtual

◆ getClosestEntity()

REntity::Id RGraphicsView::getClosestEntity ( const RVector & screenPosition,
int range,
int strictRange,
bool includeLockedLayers = true,
bool selectedOnly = false )

Finds the entity that is the closest to the given screen coordinate (in pixels).

Parameters
rangeMaximum distance in pixels.
Returns
The closest entity or NULL.

◆ getClosestReferencePoint() [1/2]

RRefPoint RGraphicsView::getClosestReferencePoint ( const RVector & screenPosition,
int range )

Finds the reference point that is the closest to the given screen coordinate (in pixels).

Parameters
rangeMaximum distance in pixels.
Returns
The closest referecene point in model coordinates.

◆ getClosestReferencePoint() [2/2]

RRefPoint RGraphicsView::getClosestReferencePoint ( RObject::Id entityId,
const RVector & screenPosition )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ getColorMode()

RGraphicsView::ColorMode RGraphicsView::getColorMode ( )

◆ getCurrentStepOffset()

RVector RGraphicsView::getCurrentStepOffset ( ) const
inline

◆ getCurrentStepScaleFactor()

double RGraphicsView::getCurrentStepScaleFactor ( ) const
inline

◆ getCursor()

virtual QCursor RGraphicsView::getCursor ( )
inlinevirtual

Reimplemented in RGraphicsViewImage.

◆ getDevicePixelRatio()

virtual double RGraphicsView::getDevicePixelRatio ( ) const
inlinevirtual

Reimplemented in RGraphicsViewImage.

◆ getDocument()

RDocument * RGraphicsView::getDocument ( ) const
Returns
Reference to the document that is visualized by this view.

◆ getDocumentInterface()

RDocumentInterface * RGraphicsView::getDocumentInterface ( ) const
Returns
Reference to the document interface.

◆ getFactor()

double RGraphicsView::getFactor ( bool includeStepFactor = true) const

◆ getForceTextHeightThreshold()

bool RGraphicsView::getForceTextHeightThreshold ( ) const
inline

◆ getGrid()

RGrid * RGraphicsView::getGrid ( )
inline
Returns
Current grid or NULL if no grid is set.

◆ getHairlineMinimumMode()

bool RGraphicsView::getHairlineMinimumMode ( )

◆ getHairlineMode()

bool RGraphicsView::getHairlineMode ( )

◆ getHeight()

virtual int RGraphicsView::getHeight ( ) const
pure virtual
Returns
Height of the view in pixels.

Implemented in RGraphicsViewImage.

◆ getLastKnownMousePosition()

RVector RGraphicsView::getLastKnownMousePosition ( ) const
inline

◆ getMargin()

int RGraphicsView::getMargin ( )

◆ getMaximum()

RVector RGraphicsView::getMaximum ( ) const
virtual
Returns
The maximum coordinate that is currently visible in the view.

◆ getMinimum()

RVector RGraphicsView::getMinimum ( ) const
virtual
Returns
The minimum coordinate that is currently visible in the view.

◆ getOffset()

RVector RGraphicsView::getOffset ( bool includeStepOffset = true) const

◆ getScene()

RGraphicsScene * RGraphicsView::getScene ( ) const
Returns
Reference to the graphics scene that is visualized by this view.

◆ getSignalsBlocked()

virtual bool RGraphicsView::getSignalsBlocked ( ) const
inlinevirtual

◆ getTextHeightThresholdOverride()

int RGraphicsView::getTextHeightThresholdOverride ( ) const
inline

◆ getTextLabels()

QList< RTextLabel > RGraphicsView::getTextLabels ( )

◆ getViewportNumber()

int RGraphicsView::getViewportNumber ( ) const
inline

◆ getWidget()

QWidget * RGraphicsView::getWidget ( ) const
inline

◆ getWidth()

virtual int RGraphicsView::getWidth ( ) const
pure virtual
Returns
Width of the view in pixels.

Implemented in RGraphicsViewImage.

◆ giveFocus()

virtual void RGraphicsView::giveFocus ( )
pure virtual

Implemented in RGraphicsViewImage.

◆ handleKeyPressEvent()

void RGraphicsView::handleKeyPressEvent ( QKeyEvent & event)
virtual

◆ handleKeyReleaseEvent()

void RGraphicsView::handleKeyReleaseEvent ( QKeyEvent & event)
virtual

◆ handleMouseDoubleClickEvent()

void RGraphicsView::handleMouseDoubleClickEvent ( RMouseEvent & event)
virtual

This should be called by the mouse double click event handler of a higher level GUI toolkit.

Events are forwarded to the scene and the navigation action that is attached to this view.

◆ handleMouseMoveEvent()

void RGraphicsView::handleMouseMoveEvent ( RMouseEvent & event)
virtual

This should be called by the mouse move event handler of a higher level GUI toolkit.

Events are forwarded to the scene and the navigation action that is attached to this view.

◆ handleMousePressEvent()

void RGraphicsView::handleMousePressEvent ( RMouseEvent & event)
virtual

This should be called by the mouse press event handler of a higher level GUI toolkit.

Events are forwarded to the scene and the navigation action that is attached to this view.

◆ handleMouseReleaseEvent()

void RGraphicsView::handleMouseReleaseEvent ( RMouseEvent & event)
virtual

This should be called by the mouse release event handler of a higher level GUI toolkit.

Events are forwarded to the scene and the navigation action that is attached to this view.

◆ handlePanGestureEvent()

void RGraphicsView::handlePanGestureEvent ( QPanGesture & gesture)
virtual

◆ handlePinchGestureEvent()

void RGraphicsView::handlePinchGestureEvent ( QPinchGesture & gesture)
virtual

◆ handleSwipeGestureEvent()

void RGraphicsView::handleSwipeGestureEvent ( QSwipeGesture & gesture)
virtual

◆ handleTabletEvent()

void RGraphicsView::handleTabletEvent ( RTabletEvent & event)
virtual

This should be called by the tablet event handler of a higher level GUI toolkit.

Events are forwarded to the scene and the navigation action that is attached to this view.

◆ handleTerminateEvent()

void RGraphicsView::handleTerminateEvent ( RTerminateEvent & event)
virtual

◆ handleWheelEvent()

void RGraphicsView::handleWheelEvent ( RWheelEvent & event)
virtual

This should be called by the mouse wheel event handler of a higher level GUI toolkit.

Events are forwarded to the scene and the navigation action that is attached to this view.

◆ hasFocus()

virtual bool RGraphicsView::hasFocus ( )
pure virtual
Returns
True if this view currently has the focus.

Implemented in RGraphicsViewImage.

◆ isActive()

virtual int RGraphicsView::isActive ( ) const
inlinevirtual
Returns
True if this view is considered to be active and needs updates (for example if a view is visible).

◆ isExporting()

bool RGraphicsView::isExporting ( ) const

◆ isGridVisible()

bool RGraphicsView::isGridVisible ( ) const

◆ isPathVisible()

bool RGraphicsView::isPathVisible ( const RPainterPath & path) const

◆ isPrinting()

bool RGraphicsView::isPrinting ( ) const

◆ isPrintingOrExporting()

bool RGraphicsView::isPrintingOrExporting ( ) const

◆ isPrintPreview()

bool RGraphicsView::isPrintPreview ( ) const

◆ isShared()

virtual bool RGraphicsView::isShared ( ) const
inlinevirtual

Reimplementations may return true to prevent this view from being deleted.

Reimplemented in RGraphicsViewImage.

◆ mapCornersFromView()

QList< RVector > RGraphicsView::mapCornersFromView ( ) const
virtual
Returns
Four vectors with the coordinates of the four corners of the view mapped to scene coordinates.

◆ mapDistanceFromView()

virtual double RGraphicsView::mapDistanceFromView ( double d) const
pure virtual

Maps the given view distance in pixels to a model distance.

If the view projection is not orthogonal the result is undefined.

Implemented in RGraphicsViewImage.

◆ mapDistanceToView()

virtual double RGraphicsView::mapDistanceToView ( double d) const
pure virtual

Maps the given model distance to a screen distance in pixels.

If the view projection is not orthogonal the result is undefined.

Implemented in RGraphicsViewImage.

◆ mapFromView()

virtual RVector RGraphicsView::mapFromView ( const RVector & v,
double z = 0.0 ) const
pure virtual

Maps the given view coordinate in pixels to a model coordinate.

Parameters
vview coordinate in pixels, v.z is always 0
zknown z coordinate in model units

Implemented in RGraphicsViewImage.

◆ mapToView() [1/2]

RBox RGraphicsView::mapToView ( const RBox & box) const
virtual

Finds the entity that is the closest to the given screen coordinate (in pixels) and inside the current UCS (read floor).

Parameters
rangeMaximum distance in pixels.
Returns
The closest entity or NULL. Maps the given box (e.g. a 3d bounding box) to a 2d box in view coordinates (pixels).

◆ mapToView() [2/2]

virtual RVector RGraphicsView::mapToView ( const RVector & v) const
pure virtual

Maps the given model coordinate to a view coordinate in pixels.

Implemented in RGraphicsViewImage.

◆ paintCursorLine()

virtual void RGraphicsView::paintCursorLine ( const RLine & )
inlinevirtual

Reimplemented in RGraphicsViewImage.

◆ paintGridLine()

virtual void RGraphicsView::paintGridLine ( const RLine & )
inlinevirtual

Reimplemented in RGraphicsViewImage.

◆ paintGridPoint()

virtual void RGraphicsView::paintGridPoint ( const RVector & )
inlinevirtual

Reimplemented in RGraphicsViewImage.

◆ paintGridPoints()

void RGraphicsView::paintGridPoints ( const QVector< double > & ucsPositionX,
const QVector< double > & ucsPositionY )
virtual

◆ pan()

void RGraphicsView::pan ( const RVector & delta,
bool regen = true )
virtual

Pans (scrolls) by the given amount delta which is a vector in screen coordinates (pixels).

◆ regenerate() [1/2]

virtual void RGraphicsView::regenerate ( bool force = false)
pure virtual

Regenerates the view to show the visible parts of the underlying scene.

This function is called after the entities have been modified or the view port changed after a zoom or pan or after the window has been resized.

Parameters
forceTrue if scene has changed, don't use any optimizations, force regeneration.

Implemented in RGraphicsViewImage.

◆ regenerate() [2/2]

virtual void RGraphicsView::regenerate ( QSet< RObject::Id > & affectedEntities)
inlinevirtual

◆ registerForFocus()

virtual bool RGraphicsView::registerForFocus ( ) const
inlinevirtual

Reimplementations may return true to register this view and allow it to be returned by RDocumentInterface::getLastKnownViewWithFocus.

Reimplemented in RGraphicsViewImage.

◆ removeFocus()

virtual void RGraphicsView::removeFocus ( )
pure virtual

Implemented in RGraphicsViewImage.

◆ repaintView()

virtual void RGraphicsView::repaintView ( )
pure virtual

Repaints the view (widget, etc..).

This differs from regenerate in that it does not require the view to iterate through the scene elements. Instead for example a buffered bitmap might be drawn. This is for example called when the preview changes to restore the view before painting the preview on top of it.

Implemented in RGraphicsViewImage.

◆ restoreViewport()

void RGraphicsView::restoreViewport ( )

◆ saveViewport()

void RGraphicsView::saveViewport ( )

◆ setAntialiasing()

void RGraphicsView::setAntialiasing ( bool val)

◆ setBackgroundColor()

void RGraphicsView::setBackgroundColor ( const QColor & col)
virtual

Reimplemented in RGraphicsViewImage.

◆ setColorMode()

void RGraphicsView::setColorMode ( RGraphicsView::ColorMode cm)

◆ setCurrentStepOffset()

void RGraphicsView::setCurrentStepOffset ( const RVector & s)
inline

◆ setCurrentStepScaleFactor()

void RGraphicsView::setCurrentStepScaleFactor ( double f)
inline

◆ setCursor() [1/2]

virtual void RGraphicsView::setCursor ( const QCursor & )
inlinevirtual

Reimplemented in RGraphicsViewImage.

◆ setCursor() [2/2]

virtual void RGraphicsView::setCursor ( Qt::CursorShape )
inlinevirtual

Reimplemented in RGraphicsViewImage.

◆ setDisplayOnlyCurrentUcs()

void RGraphicsView::setDisplayOnlyCurrentUcs ( bool on)

If on is true, only the current UCS and the entities that are in its range are displayed.

The range of a UCS is defined by the length of its axis vectors. This can be used to display only one floor in an architecture application.

◆ setExporting()

void RGraphicsView::setExporting ( bool on)

◆ setFactor()

void RGraphicsView::setFactor ( double f,
bool regen = true )

◆ setForceTextHeightThreshold()

void RGraphicsView::setForceTextHeightThreshold ( bool on)
inline

◆ setGrid()

void RGraphicsView::setGrid ( RGrid * g)

Sets the current grid.

This graphics view takes ownership of the grid. The previous grid is deleted. Setting the grid to NULL disables the grid.

◆ setGridVisible()

void RGraphicsView::setGridVisible ( bool on)

◆ setHairlineMinimumMode()

void RGraphicsView::setHairlineMinimumMode ( bool on)

◆ setHairlineMode()

void RGraphicsView::setHairlineMode ( bool on)

◆ setMargin()

void RGraphicsView::setMargin ( int m)

◆ setNavigationAction()

void RGraphicsView::setNavigationAction ( RAction * action)

Sets an action object that is typically used to handle all navigation interaction (zooming, panning, ...).

All events that are received by this view are first sent to the graphics scene and then to this action if they were not consumed yet.

◆ setOffset()

void RGraphicsView::setOffset ( const RVector & offset,
bool regen = true )

◆ setPrinting()

void RGraphicsView::setPrinting ( bool on)

◆ setPrintPointSize()

void RGraphicsView::setPrintPointSize ( const RVector & s)

◆ setPrintPreview()

void RGraphicsView::setPrintPreview ( bool on)

◆ setScene()

void RGraphicsView::setScene ( RGraphicsScene * scene,
bool regen = true )
virtual

◆ setSignalsBlocked()

virtual void RGraphicsView::setSignalsBlocked ( bool on)
inlinevirtual

◆ setTextHeightThresholdOverride()

void RGraphicsView::setTextHeightThresholdOverride ( int v)
inline

◆ setViewportNumber()

void RGraphicsView::setViewportNumber ( int n)

◆ setWidget()

void RGraphicsView::setWidget ( QWidget * w)
inline

◆ simulateMouseMoveEvent()

void RGraphicsView::simulateMouseMoveEvent ( )
virtual

Reimplemented in RGraphicsViewImage.

◆ startPan()

void RGraphicsView::startPan ( )

◆ updateTextHeightThreshold()

void RGraphicsView::updateTextHeightThreshold ( )

◆ viewportChangeEvent()

void RGraphicsView::viewportChangeEvent ( )
virtual

Reimplemented in RGraphicsViewImage.

◆ zoom()

void RGraphicsView::zoom ( const RVector & center,
double factor )
virtual

Zooms in / out by the given factor towards / from the given center in scene coordinates.

◆ zoomIn() [1/2]

void RGraphicsView::zoomIn ( )

Zooms in by factor 1.2.

The center point is at the center of the view.

◆ zoomIn() [2/2]

void RGraphicsView::zoomIn ( const RVector & center,
double factor = 1.2 )

Zooms in by factor 1.2.

The given center point stays at the same position.

◆ zoomOut() [1/2]

void RGraphicsView::zoomOut ( )

Zooms out by factor 1.2.

The center point is at the center of the view.

◆ zoomOut() [2/2]

void RGraphicsView::zoomOut ( const RVector & center,
double factor = 1.2 )

Zooms out by factor 1.0/1.2.

The given center point stays at the same position.

◆ zoomPrevious()

void RGraphicsView::zoomPrevious ( )

◆ zoomTo()

void RGraphicsView::zoomTo ( const RBox & window,
int margin = 0 )
virtual

Zooms the view in a way that the given window is visible and fills the view.

The view is updated.

◆ zoomToEntities()

bool RGraphicsView::zoomToEntities ( const QSet< RObject::Id > & ids,
int margin = RDEFAULT_MIN1 )

◆ zoomToSelection()

bool RGraphicsView::zoomToSelection ( int margin = RDEFAULT_MIN1)

Member Data Documentation

◆ antialiasing

bool RGraphicsView::antialiasing
protected

◆ autoScalePatterns

bool RGraphicsView::autoScalePatterns
protected

◆ backgroundColor

QColor RGraphicsView::backgroundColor
protected

◆ colorMode

ColorMode RGraphicsView::colorMode
protected

◆ currentStepOffset

RVector RGraphicsView::currentStepOffset
protected

◆ currentStepScaleFactor

double RGraphicsView::currentStepScaleFactor
protected

Current scale factor caused by a pinch gesture.

◆ displayOnlyCurrentUcs

bool RGraphicsView::displayOnlyCurrentUcs
protected

True to only display entities within the horizontal slice that is defined by the current UCS.

◆ exporting

bool RGraphicsView::exporting
protected

◆ factor

double RGraphicsView::factor
protected

Scale factor from model coordinates to view coordinates.

◆ forceTextHeightThreshold

bool RGraphicsView::forceTextHeightThreshold
protected

◆ grid

RGrid* RGraphicsView::grid
protected

Grid that is currently displayed by this view or NULL.

◆ gridVisible

int RGraphicsView::gridVisible
mutableprotected

◆ hairlineMinimumMode

bool RGraphicsView::hairlineMinimumMode
protected

◆ hairlineMode

bool RGraphicsView::hairlineMode
protected

◆ lastKnownModelPosition

RVector RGraphicsView::lastKnownModelPosition
protected

◆ lastKnownScreenPosition

RVector RGraphicsView::lastKnownScreenPosition
protected

◆ margin

int RGraphicsView::margin
protected

◆ navigationAction

RAction* RGraphicsView::navigationAction
protected

The navigation action of this view or NULL if no navigation action has been set.

◆ offset

RVector RGraphicsView::offset
protected

Offset of the zero point from the lower left corner of the view in model coordinates.

◆ previousFactor

double RGraphicsView::previousFactor
protected

◆ previousOffset

RVector RGraphicsView::previousOffset
protected

◆ printing

bool RGraphicsView::printing
protected

◆ printPointSize

RVector RGraphicsView::printPointSize
protected

◆ printPreview

bool RGraphicsView::printPreview
protected

◆ scene

RGraphicsScene* RGraphicsView::scene
protected

The scene this view is attached to.

◆ textHeightThreshold

int RGraphicsView::textHeightThreshold
protected

◆ textHeightThresholdOverride

int RGraphicsView::textHeightThresholdOverride
protected

◆ textLabels

QList<RTextLabel> RGraphicsView::textLabels
protected

Internal list of text labels that were added to this view.

◆ viewportNumber

int RGraphicsView::viewportNumber
protected

◆ widget

QWidget* RGraphicsView::widget
protected

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