QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RGraphicsViewImage Class Reference

QImage based 2d graphics view. More...

#include <RGraphicsViewImage.h>

Inheritance diagram for RGraphicsViewImage:
RGraphicsView RNonCopyable

Signals

void updateSnapInfo (RGraphicsViewWorker *worker, RSnap *snap, RSnapRestriction *restriction)
 
void updateTextLabel (RGraphicsViewWorker *worker, const RTextLabel &textLabel)
 
void viewportChanged ()
 

Public Member Functions

void addToBackground (const RGraphicsSceneDrawable &drawable)
 
void addToOverlay (int overlayId, RObject::Id objectId, const RGraphicsSceneDrawable &drawable)
 
void clear ()
 
void clearBackground ()
 
void clearOverlay (int overlayId)
 
void clearOverlay (int overlayId, RObject::Id objectId)
 
virtual void emitUpdateSnapInfo (RSnap *snap, RSnapRestriction *restriction)
 
virtual void emitUpdateTextLabel (const RTextLabel &textLabel)
 
QImage getBuffer () const
 
bool getColorCorrectionOverride () const
 
virtual QCursor getCursor ()
 
virtual double getDevicePixelRatio () const
 
double getDrawingScale () const
 
QImage getGraphicsBufferWithPreview () const
 
virtual int getHeight () const
 
RVector getLastKnownScreenPosition () const
 
double getMaximumLineweight () const
 
double getMinimumLineweight () const
 
int getNumThreads () const
 
RVector getPaintOffset () const
 
bool getPanOptimization ()
 
QTransform getTransform () const
 
virtual int getWidth () const
 
virtual void giveFocus ()
 
virtual bool hasFocus ()
 
bool isAlphaEnabled () const
 
virtual bool isShared () const
 Reimplementations may return true to prevent this view from being deleted.
 
virtual double mapDistanceFromView (double d) const
 Maps the given view distance in pixels to a model distance.
 
virtual double mapDistanceToView (double d) const
 Maps the given model distance to a screen distance in pixels.
 
virtual RVector mapFromView (const RVector &v, double z=0.0) const
 Maps the given view coordinate in pixels to a model coordinate.
 
virtual RVector mapToView (const RVector &v) const
 Maps the given model coordinate to a view coordinate in pixels.
 
virtual void paintCursorLine (const RLine &ucsPosition)
 
virtual void paintDrawableThread (RGraphicsViewWorker *worker, RGraphicsSceneDrawable &drawable, const RBox &clipRectangle, bool preview=false)
 
virtual void paintEntities (QPainter *painter, const RBox &queryBox)
 
void paintEntitiesMulti (const RBox &queryBox)
 
virtual void paintEntityThread (RGraphicsViewWorker *worker, RObject::Id id, bool preview=false)
 Looks up entity drawable and paints it using the given worker.
 
virtual void paintGridLine (const RLine &ucsPosition)
 
virtual void paintGridPoint (const RVector &ucsPosition)
 
virtual void paintImage (RGraphicsViewWorker *worker, const RImageData &image, bool workingSet=true)
 
virtual void paintOverlay ()
 
virtual void paintText (RGraphicsViewWorker *worker, const RTextBasedData &text, bool workingSet=true)
 
virtual void regenerate (bool force=false)
 Regenerates the view from the underlying scene.
 
virtual bool registerForFocus () const
 Reimplementations may return true to register this view and allow it to be returned by RDocumentInterface::getLastKnownViewWithFocus.
 
virtual void removeFocus ()
 
virtual void repaintView ()
 Triggers a paintEvent based on a buffered offscreen bitmap (very fast).
 
virtual void resizeImage (int w, int h)
 
void restoreViewport ()
 
 RGraphicsViewImage (QObject *parent=NULL)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
void saveViewport ()
 
void setAlphaEnabled (bool on)
 
virtual void setBackgroundColor (const QColor &col)
 
void setBackgroundTransform (double bgFactor, const RVector &bgOffset)
 
void setColorCorrectionOverride (bool on)
 
virtual void setCursor (const QCursor &cursor)
 
virtual void setCursor (Qt::CursorShape cursorShape)
 
void setDrawingScale (double s)
 
void setLastKnownModelPosition (const RVector &p)
 
void setLastKnownScreenPosition (const RVector &p)
 
void setMaximumLineweight (double lw)
 
void setMinimumLineweight (double lw)
 
void setNumThreads (int n)
 
void setPaintOffset (const RVector &offset)
 
void setPaintOrigin (bool val)
 
void setPanOptimization (bool on)
 
virtual void setScene (RGraphicsSceneQt *scene, bool regen=true)
 
virtual void simulateMouseMoveEvent ()
 
virtual void updateImage ()
 Repaints the view.
 
virtual void viewportChangeEvent ()
 
virtual ~RGraphicsViewImage ()
 
- Public Member Functions inherited from 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
 
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
 
RDocumentgetDocument () const
 
RDocumentInterfacegetDocumentInterface () const
 
double getFactor (bool includeStepFactor=true) const
 
bool getForceTextHeightThreshold () const
 
RGridgetGrid ()
 
bool getHairlineMinimumMode ()
 
bool getHairlineMode ()
 
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 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 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 QList< RVectormapCornersFromView () const
 
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 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 (QSet< RObject::Id > &affectedEntities)
 
void restoreViewport ()
 
 RGraphicsView (RGraphicsScene *scene=NULL)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
void saveViewport ()
 
void setAntialiasing (bool val)
 
void setColorMode (RGraphicsView::ColorMode cm)
 
void setCurrentStepOffset (const RVector &s)
 
void setCurrentStepScaleFactor (double f)
 
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)
 
void startPan ()
 
void updateTextHeightThreshold ()
 
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 Member Functions

void applyColorCorrection (QBrush &brush)
 
void applyColorCorrection (QPen &pen)
 
void applyColorMode (QBrush &brush)
 
void applyColorMode (QPen &pen)
 
void applyMinimumLineweight (QPen &pen)
 
virtual void drawCircle (RGraphicsViewWorker *worker, QPointF pt, double pSize)
 
virtual void drawDot (RGraphicsViewWorker *worker, QPointF pt)
 
virtual void drawEx (RGraphicsViewWorker *worker, QPointF pt, double pSize)
 
virtual void drawLine (const QLineF &line) const
 
virtual void drawPlus (RGraphicsViewWorker *worker, QPointF pt, double pSize)
 
virtual void drawSquare (RGraphicsViewWorker *worker, QPointF pt, double pSize)
 
virtual void drawVBar (RGraphicsViewWorker *worker, QPointF pt, double pSize)
 
virtual void endPaint () const
 
double getPointSize (double pSize)
 
QList< RPainterPathgetTextLayoutsPainterPaths (const RTextBasedData &text, const QList< RTextLayout > &textLayouts)
 
void initPainter (QPaintDevice &device, bool erase, bool screen=false, const QRect &rect=QRect())
 
virtual RGraphicsViewWorkerinitWorker (int threadId)
 
virtual void initWorkers ()
 Updates the graphics buffer from scratch.
 
void invalidate (bool force=false)
 
virtual void paintBackground (RGraphicsViewWorker *worker, const QRect &rect=QRect())
 
virtual void paintCursor (RGraphicsViewWorker *worker)
 
virtual void paintDocument (const QRect &rect=QRect())
 
virtual void paintErase (RGraphicsViewWorker *worker, const QRect &rect=QRect())
 
virtual void paintGrid (RGraphicsViewWorker *worker, const QRect &rect=QRect())
 
virtual void paintMetaGrid (RGraphicsViewWorker *worker, const QRect &rect=QRect())
 
virtual void paintOrigin (RGraphicsViewWorker *worker)
 Paints the absolute zero point (origin).
 
virtual void paintReferencePoint (RGraphicsViewWorker *worker, const RRefPoint &pos, bool highlight)
 
virtual void paintRelativeZero (RGraphicsViewWorker *worker)
 
virtual void setBrush (const QBrush &brush) const
 
virtual void setPen (const QPen &pen) const
 
void updateTransformation () const
 

Protected Attributes

bool alphaEnabled
 
QList< RGraphicsSceneDrawablebackgroundDecoration
 
double backgroundFactor
 
RVector backgroundOffset
 
int bgColorLightness
 
RBox clipBox
 
bool colorCorrection
 
bool colorCorrectionDisableForPrinting
 
int colorCorrectionOverride
 
int colorThreshold
 
double currentScale
 
RGraphicsViewWorkerdecorationWorker
 
bool doPaintOrigin
 
double drawingScale
 
QImage graphicsBuffer
 
bool graphicsBufferNeedsUpdate
 
QImage graphicsBufferWithPreview
 
bool isSelected
 
double lastFactor
 
RVector lastOffset
 
QString lastScaleString
 
QSize lastSize
 
double maximumLineweight
 
double minimumLineweight
 
QMutex mutexSi
 
int numThreads
 
QMap< int, QMap< RObject::Id, QList< RGraphicsSceneDrawable > > > overlayDrawables
 
QPainter * painter
 
RVector paintOffset
 
bool panOptimization
 
QTransform previousView
 
RGraphicsSceneQtsceneQt
 
QSet< RObject::IdselectedIds
 
bool showOnlyPlottable
 
QTransform transform
 
QList< RGraphicsViewWorker * > workers
 
- Protected Attributes inherited from RGraphicsView
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

- Public Types inherited from RGraphicsView
enum  ColorMode { FullColor , GrayScale , BlackWhite }
 

Detailed Description

QImage based 2d graphics view.

This graphics view renders a rectangular area of a RGraphicsSceneQt into a QImage.

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

Constructor & Destructor Documentation

◆ RGraphicsViewImage()

RGraphicsViewImage::RGraphicsViewImage ( QObject * parent = 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.

◆ ~RGraphicsViewImage()

RGraphicsViewImage::~RGraphicsViewImage ( )
virtual

Member Function Documentation

◆ addToBackground()

void RGraphicsViewImage::addToBackground ( const RGraphicsSceneDrawable & drawable)

◆ addToOverlay()

void RGraphicsViewImage::addToOverlay ( int overlayId,
RObject::Id objectId,
const RGraphicsSceneDrawable & drawable )

◆ applyColorCorrection() [1/2]

void RGraphicsViewImage::applyColorCorrection ( QBrush & brush)
protected

◆ applyColorCorrection() [2/2]

void RGraphicsViewImage::applyColorCorrection ( QPen & pen)
protected

◆ applyColorMode() [1/2]

void RGraphicsViewImage::applyColorMode ( QBrush & brush)
protected

◆ applyColorMode() [2/2]

void RGraphicsViewImage::applyColorMode ( QPen & pen)
protected

◆ applyMinimumLineweight()

void RGraphicsViewImage::applyMinimumLineweight ( QPen & pen)
protected

◆ clear()

void RGraphicsViewImage::clear ( )

◆ clearBackground()

void RGraphicsViewImage::clearBackground ( )

◆ clearOverlay() [1/2]

void RGraphicsViewImage::clearOverlay ( int overlayId)

◆ clearOverlay() [2/2]

void RGraphicsViewImage::clearOverlay ( int overlayId,
RObject::Id objectId )

◆ drawCircle()

void RGraphicsViewImage::drawCircle ( RGraphicsViewWorker * worker,
QPointF pt,
double pSize )
protectedvirtual

◆ drawDot()

void RGraphicsViewImage::drawDot ( RGraphicsViewWorker * worker,
QPointF pt )
protectedvirtual

◆ drawEx()

void RGraphicsViewImage::drawEx ( RGraphicsViewWorker * worker,
QPointF pt,
double pSize )
protectedvirtual

◆ drawLine()

void RGraphicsViewImage::drawLine ( const QLineF & line) const
protectedvirtual

◆ drawPlus()

void RGraphicsViewImage::drawPlus ( RGraphicsViewWorker * worker,
QPointF pt,
double pSize )
protectedvirtual

◆ drawSquare()

void RGraphicsViewImage::drawSquare ( RGraphicsViewWorker * worker,
QPointF pt,
double pSize )
protectedvirtual

◆ drawVBar()

void RGraphicsViewImage::drawVBar ( RGraphicsViewWorker * worker,
QPointF pt,
double pSize )
protectedvirtual

◆ emitUpdateSnapInfo()

void RGraphicsViewImage::emitUpdateSnapInfo ( RSnap * snap,
RSnapRestriction * restriction )
virtual

◆ emitUpdateTextLabel()

void RGraphicsViewImage::emitUpdateTextLabel ( const RTextLabel & textLabel)
virtual

◆ endPaint()

void RGraphicsViewImage::endPaint ( ) const
protectedvirtual

◆ getBuffer()

QImage RGraphicsViewImage::getBuffer ( ) const

◆ getColorCorrectionOverride()

bool RGraphicsViewImage::getColorCorrectionOverride ( ) const
inline

◆ getCursor()

QCursor RGraphicsViewImage::getCursor ( )
virtual

Reimplemented from RGraphicsView.

◆ getDevicePixelRatio()

double RGraphicsViewImage::getDevicePixelRatio ( ) const
virtual

Reimplemented from RGraphicsView.

◆ getDrawingScale()

double RGraphicsViewImage::getDrawingScale ( ) const
inline

◆ getGraphicsBufferWithPreview()

QImage RGraphicsViewImage::getGraphicsBufferWithPreview ( ) const
inline

◆ getHeight()

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

Implements RGraphicsView.

◆ getLastKnownScreenPosition()

RVector RGraphicsViewImage::getLastKnownScreenPosition ( ) const
inline

◆ getMaximumLineweight()

double RGraphicsViewImage::getMaximumLineweight ( ) const
inline

◆ getMinimumLineweight()

double RGraphicsViewImage::getMinimumLineweight ( ) const
inline

◆ getNumThreads()

int RGraphicsViewImage::getNumThreads ( ) const
inline

◆ getPaintOffset()

RVector RGraphicsViewImage::getPaintOffset ( ) const
inline

◆ getPanOptimization()

bool RGraphicsViewImage::getPanOptimization ( )

◆ getPointSize()

double RGraphicsViewImage::getPointSize ( double pSize)
protected

◆ getTextLayoutsPainterPaths()

QList< RPainterPath > RGraphicsViewImage::getTextLayoutsPainterPaths ( const RTextBasedData & text,
const QList< RTextLayout > & textLayouts )
protected

◆ getTransform()

QTransform RGraphicsViewImage::getTransform ( ) const

◆ getWidth()

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

Implements RGraphicsView.

◆ giveFocus()

void RGraphicsViewImage::giveFocus ( )
virtual

Implements RGraphicsView.

◆ hasFocus()

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

Implements RGraphicsView.

◆ initPainter()

void RGraphicsViewImage::initPainter ( QPaintDevice & device,
bool erase,
bool screen = false,
const QRect & rect = QRect() )
protected
Non-Scriptable:\nThis function is not available in script environments.\n

◆ initWorker()

RGraphicsViewWorker * RGraphicsViewImage::initWorker ( int threadId)
protectedvirtual

◆ initWorkers()

void RGraphicsViewImage::initWorkers ( )
protectedvirtual

Updates the graphics buffer from scratch.

This can be relatively slow and is only called on view port changes or document changes.

◆ invalidate()

void RGraphicsViewImage::invalidate ( bool force = false)
protected

◆ isAlphaEnabled()

bool RGraphicsViewImage::isAlphaEnabled ( ) const
inline

◆ isShared()

virtual bool RGraphicsViewImage::isShared ( ) const
inlinevirtual

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

Reimplemented from RGraphicsView.

◆ mapDistanceFromView()

double RGraphicsViewImage::mapDistanceFromView ( double d) const
virtual

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

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

Implements RGraphicsView.

◆ mapDistanceToView()

double RGraphicsViewImage::mapDistanceToView ( double d) const
virtual

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

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

Implements RGraphicsView.

◆ mapFromView()

RVector RGraphicsViewImage::mapFromView ( const RVector & v,
double z = 0.0 ) const
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

Implements RGraphicsView.

◆ mapToView()

RVector RGraphicsViewImage::mapToView ( const RVector & v) const
virtual

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

Implements RGraphicsView.

◆ paintBackground()

void RGraphicsViewImage::paintBackground ( RGraphicsViewWorker * worker,
const QRect & rect = QRect() )
protectedvirtual

◆ paintCursor()

void RGraphicsViewImage::paintCursor ( RGraphicsViewWorker * worker)
protectedvirtual

◆ paintCursorLine()

void RGraphicsViewImage::paintCursorLine ( const RLine & ucsPosition)
virtual

Reimplemented from RGraphicsView.

◆ paintDocument()

void RGraphicsViewImage::paintDocument ( const QRect & rect = QRect())
protectedvirtual

◆ paintDrawableThread()

void RGraphicsViewImage::paintDrawableThread ( RGraphicsViewWorker * worker,
RGraphicsSceneDrawable & drawable,
const RBox & clipRectangle,
bool preview = false )
virtual

◆ paintEntities()

void RGraphicsViewImage::paintEntities ( QPainter * painter,
const RBox & queryBox )
virtual

◆ paintEntitiesMulti()

void RGraphicsViewImage::paintEntitiesMulti ( const RBox & queryBox)

◆ paintEntityThread()

void RGraphicsViewImage::paintEntityThread ( RGraphicsViewWorker * worker,
RObject::Id id,
bool preview = false )
virtual

Looks up entity drawable and paints it using the given worker.

◆ paintErase()

void RGraphicsViewImage::paintErase ( RGraphicsViewWorker * worker,
const QRect & rect = QRect() )
protectedvirtual

◆ paintGrid()

void RGraphicsViewImage::paintGrid ( RGraphicsViewWorker * worker,
const QRect & rect = QRect() )
protectedvirtual

◆ paintGridLine()

void RGraphicsViewImage::paintGridLine ( const RLine & ucsPosition)
virtual

Reimplemented from RGraphicsView.

◆ paintGridPoint()

void RGraphicsViewImage::paintGridPoint ( const RVector & ucsPosition)
virtual

Reimplemented from RGraphicsView.

◆ paintImage()

void RGraphicsViewImage::paintImage ( RGraphicsViewWorker * worker,
const RImageData & image,
bool workingSet = true )
virtual

◆ paintMetaGrid()

void RGraphicsViewImage::paintMetaGrid ( RGraphicsViewWorker * worker,
const QRect & rect = QRect() )
protectedvirtual

◆ paintOrigin()

void RGraphicsViewImage::paintOrigin ( RGraphicsViewWorker * worker)
protectedvirtual

Paints the absolute zero point (origin).

◆ paintOverlay()

void RGraphicsViewImage::paintOverlay ( )
virtual

◆ paintReferencePoint()

void RGraphicsViewImage::paintReferencePoint ( RGraphicsViewWorker * worker,
const RRefPoint & pos,
bool highlight )
protectedvirtual

◆ paintRelativeZero()

void RGraphicsViewImage::paintRelativeZero ( RGraphicsViewWorker * worker)
protectedvirtual

◆ paintText()

void RGraphicsViewImage::paintText ( RGraphicsViewWorker * worker,
const RTextBasedData & text,
bool workingSet = true )
virtual

◆ regenerate()

void RGraphicsViewImage::regenerate ( bool force = false)
virtual

Regenerates the view from the underlying scene.

Implements RGraphicsView.

◆ registerForFocus()

virtual bool RGraphicsViewImage::registerForFocus ( ) const
inlinevirtual

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

Reimplemented from RGraphicsView.

◆ removeFocus()

void RGraphicsViewImage::removeFocus ( )
virtual

Implements RGraphicsView.

◆ repaintView()

void RGraphicsViewImage::repaintView ( )
virtual

Triggers a paintEvent based on a buffered offscreen bitmap (very fast).

Implements RGraphicsView.

◆ resizeImage()

void RGraphicsViewImage::resizeImage ( int w,
int h )
virtual

◆ restoreViewport()

void RGraphicsViewImage::restoreViewport ( )

◆ saveViewport()

void RGraphicsViewImage::saveViewport ( )

◆ setAlphaEnabled()

void RGraphicsViewImage::setAlphaEnabled ( bool on)
inline

◆ setBackgroundColor()

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

Reimplemented from RGraphicsView.

◆ setBackgroundTransform()

void RGraphicsViewImage::setBackgroundTransform ( double bgFactor,
const RVector & bgOffset )

◆ setBrush()

void RGraphicsViewImage::setBrush ( const QBrush & brush) const
protectedvirtual

◆ setColorCorrectionOverride()

void RGraphicsViewImage::setColorCorrectionOverride ( bool on)
inline

◆ setCursor() [1/2]

void RGraphicsViewImage::setCursor ( const QCursor & cursor)
virtual

Reimplemented from RGraphicsView.

◆ setCursor() [2/2]

void RGraphicsViewImage::setCursor ( Qt::CursorShape cursorShape)
virtual

Reimplemented from RGraphicsView.

◆ setDrawingScale()

void RGraphicsViewImage::setDrawingScale ( double s)
inline

◆ setLastKnownModelPosition()

void RGraphicsViewImage::setLastKnownModelPosition ( const RVector & p)
inline

◆ setLastKnownScreenPosition()

void RGraphicsViewImage::setLastKnownScreenPosition ( const RVector & p)
inline

◆ setMaximumLineweight()

void RGraphicsViewImage::setMaximumLineweight ( double lw)
inline

◆ setMinimumLineweight()

void RGraphicsViewImage::setMinimumLineweight ( double lw)
inline

◆ setNumThreads()

void RGraphicsViewImage::setNumThreads ( int n)

◆ setPaintOffset()

void RGraphicsViewImage::setPaintOffset ( const RVector & offset)
inline

◆ setPaintOrigin()

void RGraphicsViewImage::setPaintOrigin ( bool val)

◆ setPanOptimization()

void RGraphicsViewImage::setPanOptimization ( bool on)

◆ setPen()

void RGraphicsViewImage::setPen ( const QPen & pen) const
protectedvirtual

◆ setScene()

void RGraphicsViewImage::setScene ( RGraphicsSceneQt * scene,
bool regen = true )
virtual

◆ simulateMouseMoveEvent()

void RGraphicsViewImage::simulateMouseMoveEvent ( )
virtual

Reimplemented from RGraphicsView.

◆ updateImage()

void RGraphicsViewImage::updateImage ( )
virtual

Repaints the view.

If the view has been invalidated before, the view is redrawn from scratch. Otherwise, only a cached buffer is drawn (very fast).

See also
invalidate

◆ updateSnapInfo

void RGraphicsViewImage::updateSnapInfo ( RGraphicsViewWorker * worker,
RSnap * snap,
RSnapRestriction * restriction )
signal

◆ updateTextLabel

void RGraphicsViewImage::updateTextLabel ( RGraphicsViewWorker * worker,
const RTextLabel & textLabel )
signal

◆ updateTransformation()

void RGraphicsViewImage::updateTransformation ( ) const
protected

◆ viewportChanged

void RGraphicsViewImage::viewportChanged ( )
signal

◆ viewportChangeEvent()

void RGraphicsViewImage::viewportChangeEvent ( )
virtual

Reimplemented from RGraphicsView.

Member Data Documentation

◆ alphaEnabled

bool RGraphicsViewImage::alphaEnabled
protected

◆ backgroundDecoration

QList<RGraphicsSceneDrawable> RGraphicsViewImage::backgroundDecoration
protected

◆ backgroundFactor

double RGraphicsViewImage::backgroundFactor
protected

◆ backgroundOffset

RVector RGraphicsViewImage::backgroundOffset
protected

◆ bgColorLightness

int RGraphicsViewImage::bgColorLightness
protected

◆ clipBox

RBox RGraphicsViewImage::clipBox
protected

◆ colorCorrection

bool RGraphicsViewImage::colorCorrection
protected

◆ colorCorrectionDisableForPrinting

bool RGraphicsViewImage::colorCorrectionDisableForPrinting
protected

◆ colorCorrectionOverride

int RGraphicsViewImage::colorCorrectionOverride
protected

◆ colorThreshold

int RGraphicsViewImage::colorThreshold
protected

◆ currentScale

double RGraphicsViewImage::currentScale
protected

◆ decorationWorker

RGraphicsViewWorker* RGraphicsViewImage::decorationWorker
protected

◆ doPaintOrigin

bool RGraphicsViewImage::doPaintOrigin
protected

◆ drawingScale

double RGraphicsViewImage::drawingScale
protected

◆ graphicsBuffer

QImage RGraphicsViewImage::graphicsBuffer
protected

◆ graphicsBufferNeedsUpdate

bool RGraphicsViewImage::graphicsBufferNeedsUpdate
protected

◆ graphicsBufferWithPreview

QImage RGraphicsViewImage::graphicsBufferWithPreview
protected

◆ isSelected

bool RGraphicsViewImage::isSelected
protected

◆ lastFactor

double RGraphicsViewImage::lastFactor
protected

◆ lastOffset

RVector RGraphicsViewImage::lastOffset
protected

◆ lastScaleString

QString RGraphicsViewImage::lastScaleString
protected

◆ lastSize

QSize RGraphicsViewImage::lastSize
protected

◆ maximumLineweight

double RGraphicsViewImage::maximumLineweight
protected

◆ minimumLineweight

double RGraphicsViewImage::minimumLineweight
protected

◆ mutexSi

QMutex RGraphicsViewImage::mutexSi
protected

◆ numThreads

int RGraphicsViewImage::numThreads
protected

◆ overlayDrawables

QMap<int, QMap<RObject::Id, QList<RGraphicsSceneDrawable> > > RGraphicsViewImage::overlayDrawables
protected

◆ painter

QPainter* RGraphicsViewImage::painter
protected

◆ paintOffset

RVector RGraphicsViewImage::paintOffset
protected

◆ panOptimization

bool RGraphicsViewImage::panOptimization
protected

◆ previousView

QTransform RGraphicsViewImage::previousView
protected

◆ sceneQt

RGraphicsSceneQt* RGraphicsViewImage::sceneQt
protected

◆ selectedIds

QSet<RObject::Id> RGraphicsViewImage::selectedIds
protected

◆ showOnlyPlottable

bool RGraphicsViewImage::showOnlyPlottable
protected

◆ transform

QTransform RGraphicsViewImage::transform
mutableprotected

◆ workers

QList<RGraphicsViewWorker*> RGraphicsViewImage::workers
protected

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