RGraphicsView
Class in Core Module
Header: #include <src/core/RGraphicsView.h>
Inherits: RNonCopyable (private)
Inherited by: RGraphicsViewImage
Description
Section titled “Description”Graphics view.
A graphics view displays a (part of a) graphics scene.
Scriptable: This class is available in script environments.
Public Types
Section titled “Public Types”| enum | ColorMode { FullColor, GrayScale, BlackWhite } |
Public Functions
Section titled “Public Functions”RGraphicsView(RGraphicsScene *scene=NULL) |
|
| virtual | ~RGraphicsView() |
| 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 |
| virtual QImage | getBuffer() constgetBuffer |
| 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 |
| RDocument * | getDocument() const |
| RDocumentInterface * | getDocumentInterface() const |
| double | getFactor(bool includeStepFactor=true) const |
| bool | getForceTextHeightThreshold() const |
| RGrid * | getGrid() |
| bool | getHairlineMinimumMode() |
| bool | getHairlineMode() |
| virtual int | getHeight() const =0 = 0 |
| RVector | getLastKnownMousePosition() const |
| int | getMargin() |
| virtual RVector | getMaximum() const |
| virtual RVector | getMinimum() const |
| RVector | getOffset(bool includeStepOffset=true) const |
| RGraphicsScene * | getScene() const |
| virtual bool | getSignalsBlocked() const |
| int | getTextHeightThresholdOverride() const |
| QList< RTextLabel > | getTextLabels() |
| int | getViewportNumber() const |
| QWidget * | getWidget() const |
| virtual int | getWidth() const =0 = 0 |
| virtual void | giveFocus()=0 = 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 = 0 |
| void | invalidateLastKnownPositions()Forgets the positions of the last mouse event. |
| 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() constReimplementations may return true to prevent this view from being deleted. |
| virtual QList< RVector > | mapCornersFromView() const |
| virtual double | mapDistanceFromView(double d) const =0 = 0Maps the given view distance in pixels to a model distance. |
| virtual double | mapDistanceToView(double d) const =0 = 0Maps the given model distance to a screen distance in pixels. |
| virtual RVector | mapFromView(const RVector &v, double z=0.0) const =0 = 0Maps the given view coordinate in pixels to a model coordinate. |
| virtual RBox | mapToView(const RBox &box) constFinds 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 = 0Maps 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 = 0Regenerates the view to show the visible parts of the underlying scene. |
| virtual void | regenerate(QSet< RObject::Id > &affectedEntities) |
| virtual bool | registerForFocus() constReimplementations may return true to register this view and allow it to be returned by RDocumentInterface::getLastKnownViewWithFocus. |
| virtual void | removeFocus()=0 = 0 |
| virtual void | repaintView()=0 = 0Repaints the view (widget, etc..). |
| void | restoreViewport() |
| 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 ¢er, 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 ¢er, double factor=1.2)Zooms in by factor 1.2. |
| void | zoomOut()Zooms out by factor 1.2. |
| void | zoomOut(const RVector ¢er, 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) |
Protected Attributes
Section titled “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 |
| RGrid * | grid Grid that is currently displayed by this view or NULL. |
| int | gridVisible |
| bool | hairlineMinimumMode |
| bool | hairlineMode |
| RVector | lastKnownModelPosition |
| RVector | lastKnownScreenPosition |
| int | margin |
| RAction * | navigationAction 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 |
| RGraphicsScene * | scene The scene this view is attached to. |
| int | textHeightThreshold |
| int | textHeightThresholdOverride |
| QList< RTextLabel > | textLabels Internal list of text labels that were added to this view. |
| int | viewportNumber |
| QWidget * | widget |
Member Documentation
Section titled “Member Documentation”ColorMode
Section titled “ColorMode”enum ColorMode| Value | Description |
|---|---|
FullColor |
|
GrayScale |
|
BlackWhite |
RGraphicsView
Section titled “RGraphicsView”RGraphicsView::RGraphicsView(RGraphicsScene *scene=NULL)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
Section titled “~RGraphicsView”virtual RGraphicsView::~RGraphicsView()virtual
addTextLabel
Section titled “addTextLabel”void RGraphicsView::addTextLabel(const RTextLabel &textLabel)autoZoom
Section titled “autoZoom”void RGraphicsView::autoZoom(int margin=RDEFAULT_MIN1, bool ignoreEmpty=false, bool ignoreLineweight=false)centerToBox
Section titled “centerToBox”virtual void RGraphicsView::centerToBox(const RBox &box)virtual
Centers the view on the given box.
The view is updated.
Parameters:
box: Box to move into the center of the drawing in model coordinates.
centerToPoint
Section titled “centerToPoint”virtual void RGraphicsView::centerToPoint(const RVector &point)virtual
Centers the view on the given point.
The view is updated.
Parameters:
point: Point to move into the center of the drawing in model coordinates.
void RGraphicsView::clear()inline
clearCaches
Section titled “clearCaches”void RGraphicsView::clearCaches()clearTextLabels
Section titled “clearTextLabels”void RGraphicsView::clearTextLabels()getAntialiasing
Section titled “getAntialiasing”bool RGraphicsView::getAntialiasing() constconst
getBackgroundColor
Section titled “getBackgroundColor”QColor RGraphicsView::getBackgroundColor()getBox
Section titled “getBox”virtual RBox RGraphicsView::getBox() constvirtual const
getBuffer
Section titled “getBuffer”virtual QImage RGraphicsView::getBuffer() constvirtual inline const
getBuffer
Returns: Buffer to rendered graphics view, if supported by the implementation.
Reimplemented in getBuffer.
getClosestEntity
Section titled “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:
range: Maximum distance in pixels.
Returns: The closest entity or NULL.
getClosestReferencePoint
Section titled “getClosestReferencePoint”RRefPoint RGraphicsView::getClosestReferencePoint(const RVector &screenPosition, int range)Finds the reference point that is the closest to the given screen coordinate (in pixels).
Parameters:
range: Maximum distance in pixels.
Returns: The closest referecene point in model coordinates.
getClosestReferencePoint
Section titled “getClosestReferencePoint”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
Section titled “getColorMode”RGraphicsView::ColorMode RGraphicsView::getColorMode()getCurrentStepOffset
Section titled “getCurrentStepOffset”RVector RGraphicsView::getCurrentStepOffset() constinline const
getCurrentStepScaleFactor
Section titled “getCurrentStepScaleFactor”double RGraphicsView::getCurrentStepScaleFactor() constinline const
getCursor
Section titled “getCursor”virtual QCursor RGraphicsView::getCursor()virtual inline
Reimplemented in getCursor.
getDevicePixelRatio
Section titled “getDevicePixelRatio”virtual double RGraphicsView::getDevicePixelRatio() constvirtual inline const
Reimplemented in getDevicePixelRatio.
getDocument
Section titled “getDocument”RDocument * RGraphicsView::getDocument() constconst
Returns: Reference to the document that is visualized by this view.
getDocumentInterface
Section titled “getDocumentInterface”RDocumentInterface * RGraphicsView::getDocumentInterface() constconst
Returns: Reference to the document interface.
getFactor
Section titled “getFactor”double RGraphicsView::getFactor(bool includeStepFactor=true) constconst
getForceTextHeightThreshold
Section titled “getForceTextHeightThreshold”bool RGraphicsView::getForceTextHeightThreshold() constinline const
getGrid
Section titled “getGrid”RGrid * RGraphicsView::getGrid()inline
Returns: Current grid or NULL if no grid is set.
getHairlineMinimumMode
Section titled “getHairlineMinimumMode”bool RGraphicsView::getHairlineMinimumMode()getHairlineMode
Section titled “getHairlineMode”bool RGraphicsView::getHairlineMode()getHeight
Section titled “getHeight”virtual int RGraphicsView::getHeight() const =0 = 0pure virtual const
Returns: Height of the view in pixels.
Reimplemented in getHeight.
getLastKnownMousePosition
Section titled “getLastKnownMousePosition”RVector RGraphicsView::getLastKnownMousePosition() constinline const
getMargin
Section titled “getMargin”int RGraphicsView::getMargin()getMaximum
Section titled “getMaximum”virtual RVector RGraphicsView::getMaximum() constvirtual const
Returns: The maximum coordinate that is currently visible in the view.
getMinimum
Section titled “getMinimum”virtual RVector RGraphicsView::getMinimum() constvirtual const
Returns: The minimum coordinate that is currently visible in the view.
getOffset
Section titled “getOffset”RVector RGraphicsView::getOffset(bool includeStepOffset=true) constconst
getScene
Section titled “getScene”RGraphicsScene * RGraphicsView::getScene() constconst
Returns: Reference to the graphics scene that is visualized by this view.
getSignalsBlocked
Section titled “getSignalsBlocked”virtual bool RGraphicsView::getSignalsBlocked() constvirtual inline const
getTextHeightThresholdOverride
Section titled “getTextHeightThresholdOverride”int RGraphicsView::getTextHeightThresholdOverride() constinline const
getTextLabels
Section titled “getTextLabels”QList< RTextLabel > RGraphicsView::getTextLabels()getViewportNumber
Section titled “getViewportNumber”int RGraphicsView::getViewportNumber() constinline const
getWidget
Section titled “getWidget”QWidget * RGraphicsView::getWidget() constinline const
getWidth
Section titled “getWidth”virtual int RGraphicsView::getWidth() const =0 = 0pure virtual const
Returns: Width of the view in pixels.
Reimplemented in getWidth.
giveFocus
Section titled “giveFocus”virtual void RGraphicsView::giveFocus()=0 = 0pure virtual
Reimplemented in giveFocus.
handleKeyPressEvent
Section titled “handleKeyPressEvent”virtual void RGraphicsView::handleKeyPressEvent(QKeyEvent &event)virtual
handleKeyReleaseEvent
Section titled “handleKeyReleaseEvent”virtual void RGraphicsView::handleKeyReleaseEvent(QKeyEvent &event)virtual
handleMouseDoubleClickEvent
Section titled “handleMouseDoubleClickEvent”virtual 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
Section titled “handleMouseMoveEvent”virtual 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
Section titled “handleMousePressEvent”virtual 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
Section titled “handleMouseReleaseEvent”virtual 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
Section titled “handlePanGestureEvent”virtual void RGraphicsView::handlePanGestureEvent(QPanGesture &gesture)virtual
handlePinchGestureEvent
Section titled “handlePinchGestureEvent”virtual void RGraphicsView::handlePinchGestureEvent(QPinchGesture &gesture)virtual
handleSwipeGestureEvent
Section titled “handleSwipeGestureEvent”virtual void RGraphicsView::handleSwipeGestureEvent(QSwipeGesture &gesture)virtual
handleTabletEvent
Section titled “handleTabletEvent”virtual 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
Section titled “handleTerminateEvent”virtual void RGraphicsView::handleTerminateEvent(RTerminateEvent &event)virtual
handleWheelEvent
Section titled “handleWheelEvent”virtual 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
Section titled “hasFocus”virtual bool RGraphicsView::hasFocus()=0 = 0pure virtual
Returns: True if this view currently has the focus.
Reimplemented in hasFocus.
invalidateLastKnownPositions
Section titled “invalidateLastKnownPositions”void RGraphicsView::invalidateLastKnownPositions()inline
Forgets the positions of the last mouse event.
Called when the current block of the document changes: the model position was captured in the coordinate system of the previous block and the screen position refers to its (possibly different) transformation, so simulateMouseMoveEvent must not replay them in the new block (the entity next to the stale position was highlighted after returning from a block to the model space). Nothing is simulated until the next real mouse move.
isActive
Section titled “isActive”virtual int RGraphicsView::isActive() constvirtual inline const
Returns: True if this view is considered to be active and needs updates (for example if a view is visible).
isExporting
Section titled “isExporting”bool RGraphicsView::isExporting() constconst
isGridVisible
Section titled “isGridVisible”bool RGraphicsView::isGridVisible() constconst
isPathVisible
Section titled “isPathVisible”bool RGraphicsView::isPathVisible(const RPainterPath &path) constconst
isPrinting
Section titled “isPrinting”bool RGraphicsView::isPrinting() constconst
isPrintingOrExporting
Section titled “isPrintingOrExporting”bool RGraphicsView::isPrintingOrExporting() constconst
isPrintPreview
Section titled “isPrintPreview”bool RGraphicsView::isPrintPreview() constconst
isShared
Section titled “isShared”virtual bool RGraphicsView::isShared() constvirtual inline const
Reimplementations may return true to prevent this view from being deleted.
Reimplemented in isShared.
mapCornersFromView
Section titled “mapCornersFromView”virtual QList< RVector > RGraphicsView::mapCornersFromView() constvirtual const
Returns: Four vectors with the coordinates of the four corners of the view mapped to scene coordinates.
mapDistanceFromView
Section titled “mapDistanceFromView”virtual double RGraphicsView::mapDistanceFromView(double d) const =0 = 0pure virtual const
Maps the given view distance in pixels to a model distance.
If the view projection is not orthogonal the result is undefined.
Reimplemented in mapDistanceFromView.
mapDistanceToView
Section titled “mapDistanceToView”virtual double RGraphicsView::mapDistanceToView(double d) const =0 = 0pure virtual const
Maps the given model distance to a screen distance in pixels.
If the view projection is not orthogonal the result is undefined.
Reimplemented in mapDistanceToView.
mapFromView
Section titled “mapFromView”virtual RVector RGraphicsView::mapFromView(const RVector &v, double z=0.0) const =0 = 0pure virtual const
Maps the given view coordinate in pixels to a model coordinate.
Parameters:
v: view coordinate in pixels, v.z is always 0z: known z coordinate in model units
Reimplemented in mapFromView.
mapToView
Section titled “mapToView”virtual RBox RGraphicsView::mapToView(const RBox &box) constvirtual const
Finds the entity that is the closest to the given screen coordinate (in pixels) and inside the current UCS (read floor).
Parameters:
range: Maximum 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
Section titled “mapToView”virtual RVector RGraphicsView::mapToView(const RVector &v) const =0 = 0pure virtual const
Maps the given model coordinate to a view coordinate in pixels.
Reimplemented in mapToView.
paintCursorLine
Section titled “paintCursorLine”virtual void RGraphicsView::paintCursorLine(const RLine &)virtual inline
Reimplemented in paintCursorLine.
paintGridLine
Section titled “paintGridLine”virtual void RGraphicsView::paintGridLine(const RLine &)virtual inline
Reimplemented in paintGridLine.
paintGridPoint
Section titled “paintGridPoint”virtual void RGraphicsView::paintGridPoint(const RVector &)virtual inline
Reimplemented in paintGridPoint.
paintGridPoints
Section titled “paintGridPoints”virtual void RGraphicsView::paintGridPoints(const QVector< double > &ucsPositionX, const QVector< double > &ucsPositionY)virtual
virtual 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
Section titled “regenerate”virtual void RGraphicsView::regenerate(bool force=false)=0 = 0pure 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:
force: True if scene has changed, don’t use any optimizations, force regeneration.
Reimplemented in regenerate.
regenerate
Section titled “regenerate”virtual void RGraphicsView::regenerate(QSet< RObject::Id > &affectedEntities)virtual inline
registerForFocus
Section titled “registerForFocus”virtual bool RGraphicsView::registerForFocus() constvirtual inline const
Reimplementations may return true to register this view and allow it to be returned by RDocumentInterface::getLastKnownViewWithFocus.
Reimplemented in registerForFocus.
removeFocus
Section titled “removeFocus”virtual void RGraphicsView::removeFocus()=0 = 0pure virtual
Reimplemented in removeFocus.
repaintView
Section titled “repaintView”virtual void RGraphicsView::repaintView()=0 = 0pure 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.
Reimplemented in repaintView.
restoreViewport
Section titled “restoreViewport”void RGraphicsView::restoreViewport()saveViewport
Section titled “saveViewport”void RGraphicsView::saveViewport()setAntialiasing
Section titled “setAntialiasing”void RGraphicsView::setAntialiasing(bool val)setBackgroundColor
Section titled “setBackgroundColor”virtual void RGraphicsView::setBackgroundColor(const QColor &col)virtual
Reimplemented in setBackgroundColor.
setColorMode
Section titled “setColorMode”void RGraphicsView::setColorMode(RGraphicsView::ColorMode cm)setCurrentStepOffset
Section titled “setCurrentStepOffset”void RGraphicsView::setCurrentStepOffset(const RVector &s)inline
setCurrentStepScaleFactor
Section titled “setCurrentStepScaleFactor”void RGraphicsView::setCurrentStepScaleFactor(double f)inline
setCursor
Section titled “setCursor”virtual void RGraphicsView::setCursor(const QCursor &)virtual inline
Reimplemented in setCursor.
setCursor
Section titled “setCursor”virtual void RGraphicsView::setCursor(Qt::CursorShape)virtual inline
Reimplemented in setCursor.
setDisplayOnlyCurrentUcs
Section titled “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
Section titled “setExporting”void RGraphicsView::setExporting(bool on)setFactor
Section titled “setFactor”void RGraphicsView::setFactor(double f, bool regen=true)setForceTextHeightThreshold
Section titled “setForceTextHeightThreshold”void RGraphicsView::setForceTextHeightThreshold(bool on)inline
setGrid
Section titled “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
Section titled “setGridVisible”void RGraphicsView::setGridVisible(bool on)setHairlineMinimumMode
Section titled “setHairlineMinimumMode”void RGraphicsView::setHairlineMinimumMode(bool on)setHairlineMode
Section titled “setHairlineMode”void RGraphicsView::setHairlineMode(bool on)setMargin
Section titled “setMargin”void RGraphicsView::setMargin(int m)setNavigationAction
Section titled “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
Section titled “setOffset”void RGraphicsView::setOffset(const RVector &offset, bool regen=true)setPrinting
Section titled “setPrinting”void RGraphicsView::setPrinting(bool on)setPrintPointSize
Section titled “setPrintPointSize”void RGraphicsView::setPrintPointSize(const RVector &s)setPrintPreview
Section titled “setPrintPreview”void RGraphicsView::setPrintPreview(bool on)setScene
Section titled “setScene”virtual void RGraphicsView::setScene(RGraphicsScene *scene, bool regen=true)virtual
setSignalsBlocked
Section titled “setSignalsBlocked”virtual void RGraphicsView::setSignalsBlocked(bool on)virtual inline
setTextHeightThresholdOverride
Section titled “setTextHeightThresholdOverride”void RGraphicsView::setTextHeightThresholdOverride(int v)inline
setViewportNumber
Section titled “setViewportNumber”void RGraphicsView::setViewportNumber(int n)setWidget
Section titled “setWidget”void RGraphicsView::setWidget(QWidget *w)inline
simulateMouseMoveEvent
Section titled “simulateMouseMoveEvent”virtual void RGraphicsView::simulateMouseMoveEvent()virtual
Reimplemented in simulateMouseMoveEvent.
startPan
Section titled “startPan”void RGraphicsView::startPan()updateTextHeightThreshold
Section titled “updateTextHeightThreshold”void RGraphicsView::updateTextHeightThreshold()viewportChangeEvent
Section titled “viewportChangeEvent”virtual void RGraphicsView::viewportChangeEvent()virtual
Reimplemented in viewportChangeEvent.
virtual void RGraphicsView::zoom(const RVector ¢er, double factor)virtual
Zooms in / out by the given factor towards / from the given center in scene coordinates.
zoomIn
Section titled “zoomIn”void RGraphicsView::zoomIn()Zooms in by factor 1.2.
The center point is at the center of the view.
zoomIn
Section titled “zoomIn”void RGraphicsView::zoomIn(const RVector ¢er, double factor=1.2)Zooms in by factor 1.2.
The given center point stays at the same position.
zoomOut
Section titled “zoomOut”void RGraphicsView::zoomOut()Zooms out by factor 1.2.
The center point is at the center of the view.
zoomOut
Section titled “zoomOut”void RGraphicsView::zoomOut(const RVector ¢er, double factor=1.2)Zooms out by factor 1.0/1.2.
The given center point stays at the same position.
zoomPrevious
Section titled “zoomPrevious”void RGraphicsView::zoomPrevious()zoomTo
Section titled “zoomTo”virtual 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
Section titled “zoomToEntities”bool RGraphicsView::zoomToEntities(const QSet< RObject::Id > &ids, int margin=RDEFAULT_MIN1)zoomToSelection
Section titled “zoomToSelection”bool RGraphicsView::zoomToSelection(int margin=RDEFAULT_MIN1)antialiasing
Section titled “antialiasing”bool RGraphicsView::antialiasingprotected
autoScalePatterns
Section titled “autoScalePatterns”bool RGraphicsView::autoScalePatternsprotected
backgroundColor
Section titled “backgroundColor”QColor RGraphicsView::backgroundColorprotected
colorMode
Section titled “colorMode”ColorMode RGraphicsView::colorModeprotected
currentStepOffset
Section titled “currentStepOffset”RVector RGraphicsView::currentStepOffsetprotected
currentStepScaleFactor
Section titled “currentStepScaleFactor”double RGraphicsView::currentStepScaleFactorprotected
Current scale factor caused by a pinch gesture.
displayOnlyCurrentUcs
Section titled “displayOnlyCurrentUcs”bool RGraphicsView::displayOnlyCurrentUcsprotected
True to only display entities within the horizontal slice that is defined by the current UCS.
exporting
Section titled “exporting”bool RGraphicsView::exportingprotected
factor
Section titled “factor”double RGraphicsView::factorprotected
Scale factor from model coordinates to view coordinates.
forceTextHeightThreshold
Section titled “forceTextHeightThreshold”bool RGraphicsView::forceTextHeightThresholdprotected
RGrid* RGraphicsView::gridprotected
Grid that is currently displayed by this view or NULL.
gridVisible
Section titled “gridVisible”int RGraphicsView::gridVisibleprotected
hairlineMinimumMode
Section titled “hairlineMinimumMode”bool RGraphicsView::hairlineMinimumModeprotected
hairlineMode
Section titled “hairlineMode”bool RGraphicsView::hairlineModeprotected
lastKnownModelPosition
Section titled “lastKnownModelPosition”RVector RGraphicsView::lastKnownModelPositionprotected
lastKnownScreenPosition
Section titled “lastKnownScreenPosition”RVector RGraphicsView::lastKnownScreenPositionprotected
margin
Section titled “margin”int RGraphicsView::marginprotected
navigationAction
Section titled “navigationAction”RAction* RGraphicsView::navigationActionprotected
The navigation action of this view or NULL if no navigation action has been set.
offset
Section titled “offset”RVector RGraphicsView::offsetprotected
Offset of the zero point from the lower left corner of the view in model coordinates.
previousFactor
Section titled “previousFactor”double RGraphicsView::previousFactorprotected
previousOffset
Section titled “previousOffset”RVector RGraphicsView::previousOffsetprotected
printing
Section titled “printing”bool RGraphicsView::printingprotected
printPointSize
Section titled “printPointSize”RVector RGraphicsView::printPointSizeprotected
printPreview
Section titled “printPreview”bool RGraphicsView::printPreviewprotected
RGraphicsScene* RGraphicsView::sceneprotected
The scene this view is attached to.
textHeightThreshold
Section titled “textHeightThreshold”int RGraphicsView::textHeightThresholdprotected
textHeightThresholdOverride
Section titled “textHeightThresholdOverride”int RGraphicsView::textHeightThresholdOverrideprotected
textLabels
Section titled “textLabels”QList<RTextLabel> RGraphicsView::textLabelsprotected
Internal list of text labels that were added to this view.
viewportNumber
Section titled “viewportNumber”int RGraphicsView::viewportNumberprotected
widget
Section titled “widget”QWidget* RGraphicsView::widgetprotected