LibrePCB Developers Documentation
Loading...
Searching...
No Matches
SlintGraphicsView Class Referencefinal

The SlintGraphicsView class. More...

#include <slintgraphicsview.h>

Inherits QObject.

+ Collaboration diagram for SlintGraphicsView:

Classes

struct  Projection
 

Signals

void stateChanged ()
 
void transformChanged ()
 

Public Member Functions

 SlintGraphicsView (QObject *parent=nullptr) noexcept
 
 SlintGraphicsView (const SlintGraphicsView &other)=delete
 
virtual ~SlintGraphicsView () noexcept
 
bool isPanning () const noexcept
 
QPainterPath calcPosWithTolerance (const Point &pos, qreal multiplier) const noexcept
 
Point mapToScenePos (const QPointF &pos) const noexcept
 
void setEventHandler (IF_GraphicsViewEventHandler *obj) noexcept
 
slint::Image render (GraphicsScene &scene, float width, float height) noexcept
 
bool pointerEvent (const QPointF &pos, slint::private_api::PointerEvent e) noexcept
 
bool scrollEvent (const QPointF &pos, slint::private_api::PointerScrollEvent e) noexcept
 
bool keyEvent (const slint::private_api::KeyEvent &e) noexcept
 
void scrollLeft () noexcept
 
void scrollRight () noexcept
 
void scrollUp () noexcept
 
void scrollDown () noexcept
 
void zoomIn () noexcept
 
void zoomOut () noexcept
 
void zoomToSceneRect (const QRectF &r) noexcept
 
SlintGraphicsViewoperator= (const SlintGraphicsView &rhs)=delete
 

Private Member Functions

void scroll (const QPointF &delta) noexcept
 
void zoom (const QPointF &center, qreal factor) noexcept
 
void smoothTo (const Projection &projection) noexcept
 
bool applyProjection (const Projection &projection) noexcept
 

Private Attributes

IF_GraphicsViewEventHandlermEventHandler
 
Projection mProjection
 
QSizeF mViewSize
 
GraphicsSceneMouseEvent mMouseEvent
 
QDeadlineTimer mLeftMouseButtonDoubleClickTimer
 
bool mPanning = false
 
QPointF mPanningStartScreenPos
 
QPointF mPanningStartScenePos
 
Projection mAnimationDataStart
 
Projection mAnimationDataDelta
 
std::unique_ptr< QVariantAnimation > mAnimation
 

Detailed Description

The SlintGraphicsView class.

Constructor & Destructor Documentation

◆ SlintGraphicsView() [1/2]

SlintGraphicsView ( QObject *  parent = nullptr)
explicitnoexcept

◆ SlintGraphicsView() [2/2]

SlintGraphicsView ( const SlintGraphicsView other)
delete

◆ ~SlintGraphicsView()

~SlintGraphicsView ( )
virtualnoexcept

Member Function Documentation

◆ isPanning()

bool isPanning ( ) const
inlinenoexcept

◆ calcPosWithTolerance()

QPainterPath calcPosWithTolerance ( const Point pos,
qreal  multiplier 
) const
noexcept

◆ mapToScenePos()

Point mapToScenePos ( const QPointF &  pos) const
noexcept
+ Here is the call graph for this function:

◆ setEventHandler()

void setEventHandler ( IF_GraphicsViewEventHandler obj)
noexcept

◆ render()

slint::Image render ( GraphicsScene scene,
float  width,
float  height 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointerEvent()

bool pointerEvent ( const QPointF &  pos,
slint::private_api::PointerEvent  e 
)
noexcept
+ Here is the call graph for this function:

◆ scrollEvent()

bool scrollEvent ( const QPointF &  pos,
slint::private_api::PointerScrollEvent  e 
)
noexcept

◆ keyEvent()

bool keyEvent ( const slint::private_api::KeyEvent &  e)
noexcept
+ Here is the call graph for this function:

◆ scrollLeft()

void scrollLeft ( )
noexcept
+ Here is the call graph for this function:

◆ scrollRight()

void scrollRight ( )
noexcept
+ Here is the call graph for this function:

◆ scrollUp()

void scrollUp ( )
noexcept
+ Here is the call graph for this function:

◆ scrollDown()

void scrollDown ( )
noexcept
+ Here is the call graph for this function:

◆ zoomIn()

void zoomIn ( )
noexcept
+ Here is the call graph for this function:

◆ zoomOut()

void zoomOut ( )
noexcept
+ Here is the call graph for this function:

◆ zoomToSceneRect()

void zoomToSceneRect ( const QRectF &  r)
noexcept
+ Here is the call graph for this function:

◆ operator=()

SlintGraphicsView & operator= ( const SlintGraphicsView rhs)
delete

◆ stateChanged

void stateChanged ( )
signal
+ Here is the caller graph for this function:

◆ transformChanged

void transformChanged ( )
signal
+ Here is the caller graph for this function:

◆ scroll()

void scroll ( const QPointF &  delta)
privatenoexcept
+ Here is the caller graph for this function:

◆ zoom()

void zoom ( const QPointF &  center,
qreal  factor 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ smoothTo()

void smoothTo ( const Projection projection)
privatenoexcept

◆ applyProjection()

bool applyProjection ( const Projection projection)
privatenoexcept

Member Data Documentation

◆ mEventHandler

IF_GraphicsViewEventHandler* mEventHandler
private

◆ mProjection

Projection mProjection
private

◆ mViewSize

QSizeF mViewSize
private

◆ mMouseEvent

GraphicsSceneMouseEvent mMouseEvent
private

◆ mLeftMouseButtonDoubleClickTimer

QDeadlineTimer mLeftMouseButtonDoubleClickTimer
private

◆ mPanning

bool mPanning = false
private

◆ mPanningStartScreenPos

QPointF mPanningStartScreenPos
private

◆ mPanningStartScenePos

QPointF mPanningStartScenePos
private

◆ mAnimationDataStart

Projection mAnimationDataStart
private

◆ mAnimationDataDelta

Projection mAnimationDataDelta
private

◆ mAnimation

std::unique_ptr<QVariantAnimation> mAnimation
private

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