TechDrawGui::QGTracker Class Reference

#include <QGTracker.h>

Public Types

enum  { Type = QGraphicsItem::UserType + 210 }
 
enum  TrackerMode { }
 
- Public Types inherited from TechDrawGui::QGIPrimPath
enum  { Type = QGraphicsItem::UserType + 170 }
 

Signals

void drawingFinished (std::vector< QPointF > pts, QGIView *qgParent)
 
void qViewPicked (QPointF pos, QGIView *qgParent)
 

Public Member Functions

virtual QRectF boundingRect () const override
 
std::vector< Base::Vector3dconvertPoints (void)
 
void drawTrackCircle (QPointF pos)
 
void drawTrackLine (QPointF pos)
 
void drawTrackPoint (QPointF pos)
 
void drawTrackSquare (QPointF pos)
 
TrackerMode getTrackerMode (void)
 
void onDoubleClick (QPointF pos)
 
void onMouseMove (QPointF pos)
 
void onMousePress (QPointF)
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
 
 QGTracker (QGSPage *scene=nullptr, QGTracker::TrackerMode m=QGTracker::TrackerMode::None)
 
void setCircleFromPoints (std::vector< QPointF > pts)
 
void setPathFromPoints (std::vector< QPointF > pts)
 
void setPoint (std::vector< QPointF > pts)
 
void setSquareFromPoints (std::vector< QPointF > pts)
 
void setTrackerMode (TrackerMode m)
 
virtual QPainterPath shape () const override
 
void sleep (bool b)
 
QPointF snapToAngle (QPointF pt)
 
void terminateDrawing (void)
 
int type () const override
 
 ~QGTracker ()
 
- Public Member Functions inherited from TechDrawGui::QGIPrimPath
QColor getFillColor (void)
 
Qt::BrushStyle getFillStyle ()
 
Qt::PenStyle getStyle ()
 
virtual double getWidth ()
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
 
 QGIPrimPath ()
 
void resetFill ()
 
virtual void setCapStyle (Qt::PenCapStyle c)
 
void setFill (QBrush b)
 
void setFill (QColor c, Qt::BrushStyle s)
 
void setFillColor (QColor c)
 
void setFillOverride (bool b)
 
void setFillStyle (Qt::BrushStyle f)
 
void setHighlighted (bool state)
 
virtual void setNormalColor (QColor c)
 
virtual void setPrettyNormal ()
 
virtual void setPrettyPre ()
 
virtual void setPrettySel ()
 
void setStyle (int s)
 
void setStyle (Qt::PenStyle s)
 
virtual void setWidth (double w)
 
virtual QPainterPath shape () const override
 
int type () const override
 
 ~QGIPrimPath ()
 

Protected Member Functions

void getPickedQGIV (QPointF pos)
 
QColor getTrackerColor ()
 
double getTrackerWeight ()
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
virtual void hoverMoveEvent (QGraphicsSceneHoverEvent *event) override
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
- Protected Member Functions inherited from TechDrawGui::QGIPrimPath
virtual QColor getNormalColor (void)
 
Base::Reference< ParameterGrpgetParmGroup (void)
 
virtual QColor getPreColor (void)
 
virtual QColor getSelectColor (void)
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
virtual Qt::PenCapStyle prefCapStyle (void)
 

Additional Inherited Members

- Protected Attributes inherited from TechDrawGui::QGIPrimPath
bool isHighlighted
 
QBrush m_brush
 
Qt::PenCapStyle m_capStyle
 
QColor m_colCurrent
 
QColor m_colDefFill
 
QColor m_colNormal
 
QColor m_colNormalFill
 
bool m_colOverride
 
QColor m_fillColorCurrent
 
bool m_fillOverride
 
Qt::BrushStyle m_fillStyleCurrent
 
QPen m_pen
 
Qt::PenStyle m_styleCurrent
 
Qt::BrushStyle m_styleDef
 
Qt::BrushStyle m_styleNormal
 
Qt::BrushStyle m_styleSelect
 
double m_width
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

◆ TrackerMode

Enumerator
Line 
Circle 
Rectangle 
Point 

Constructor & Destructor Documentation

◆ QGTracker()

◆ ~QGTracker()

QGTracker::~QGTracker ( )

Member Function Documentation

◆ boundingRect()

QRectF QGTracker::boundingRect ( ) const
overridevirtual

Referenced by shape().

◆ convertPoints()

std::vector< Base::Vector3d > QGTracker::convertPoints ( void  )

◆ drawingFinished

void TechDrawGui::QGTracker::drawingFinished ( std::vector< QPointF >  pts,
QGIView qgParent 
)
signal

Referenced by terminateDrawing().

◆ drawTrackCircle()

void QGTracker::drawTrackCircle ( QPointF  pos)

Referenced by onMouseMove().

◆ drawTrackLine()

void QGTracker::drawTrackLine ( QPointF  pos)

Referenced by onMouseMove().

◆ drawTrackPoint()

void QGTracker::drawTrackPoint ( QPointF  pos)

◆ drawTrackSquare()

void QGTracker::drawTrackSquare ( QPointF  pos)

Referenced by onMouseMove().

◆ getPickedQGIV()

void QGTracker::getPickedQGIV ( QPointF  pos)
protected

Referenced by onMousePress().

◆ getTrackerColor()

◆ getTrackerMode()

TrackerMode TechDrawGui::QGTracker::getTrackerMode ( void  )

◆ getTrackerWeight()

double QGTracker::getTrackerWeight ( )
protected

◆ hoverEnterEvent()

void QGTracker::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotectedvirtual

◆ hoverLeaveEvent()

void QGTracker::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotectedvirtual

◆ hoverMoveEvent()

void QGTracker::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotectedvirtual

References onMouseMove(), and snapToAngle().

◆ itemChange()

QVariant QGTracker::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overrideprotectedvirtual

◆ keyPressEvent()

void QGTracker::keyPressEvent ( QKeyEvent *  event)
overrideprotectedvirtual

References terminateDrawing().

◆ mouseDoubleClickEvent()

void QGTracker::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotectedvirtual

References onDoubleClick().

◆ mousePressEvent()

void QGTracker::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotectedvirtual

◆ mouseReleaseEvent()

void QGTracker::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotectedvirtual

◆ onDoubleClick()

void QGTracker::onDoubleClick ( QPointF  pos)

◆ onMouseMove()

void QGTracker::onMouseMove ( QPointF  pos)

◆ onMousePress()

void QGTracker::onMousePress ( QPointF  pos)

◆ paint()

void QGTracker::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget widget = nullptr 
)
overridevirtual

◆ qViewPicked

void TechDrawGui::QGTracker::qViewPicked ( QPointF  pos,
QGIView qgParent 
)
signal

◆ setCircleFromPoints()

void QGTracker::setCircleFromPoints ( std::vector< QPointF >  pts)

◆ setPathFromPoints()

void QGTracker::setPathFromPoints ( std::vector< QPointF >  pts)

◆ setPoint()

◆ setSquareFromPoints()

void QGTracker::setSquareFromPoints ( std::vector< QPointF >  pts)

◆ setTrackerMode()

void TechDrawGui::QGTracker::setTrackerMode ( TrackerMode  m)

Referenced by QGTracker().

◆ shape()

◆ sleep()

◆ snapToAngle()

QPointF QGTracker::snapToAngle ( QPointF  pt)

◆ terminateDrawing()

void QGTracker::terminateDrawing ( void  )

◆ type()

int TechDrawGui::QGTracker::type ( void  ) const
override

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