#include <QGTracker.h>
Public Types | |
enum | { Type = QGraphicsItem::UserType + 210 } |
enum | TrackerMode { , Line, Circle, Rectangle, Point } |
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::Vector3d > | convertPoints (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=0) override |
QGTracker (QGraphicsScene *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 () |
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) |
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< ParameterGrp > | getParmGroup (void) |
virtual QColor | getPreColor (void) |
virtual QColor | getSelectColor (void) |
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
◆ TrackerMode
Constructor & Destructor Documentation
◆ QGTracker()
|
explicit |
◆ ~QGTracker()
QGTracker::~QGTracker | ( | ) |
Member Function Documentation
◆ boundingRect()
|
overridevirtual |
Referenced by shape().
◆ convertPoints()
std::vector< Base::Vector3d > QGTracker::convertPoints | ( | void | ) |
◆ drawingFinished
|
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()
|
protected |
Referenced by onMousePress().
◆ getTrackerColor()
|
protected |
References App::Color::asValue(), App::GetApplication(), ParameterGrp::GetGroup(), ParameterGrp::GetUnsigned(), and App::Application::GetUserParameter().
Referenced by QGTracker().
◆ getTrackerMode()
TrackerMode TechDrawGui::QGTracker::getTrackerMode | ( | void | ) |
Referenced by onDoubleClick(), onMouseMove(), and onMousePress().
◆ getTrackerWeight()
|
protected |
References App::GetApplication(), ParameterGrp::GetFloat(), ParameterGrp::GetGroup(), and App::Application::GetUserParameter().
Referenced by QGTracker().
◆ hoverEnterEvent()
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::hoverEnterEvent().
◆ hoverLeaveEvent()
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::hoverLeaveEvent().
◆ hoverMoveEvent()
|
overrideprotectedvirtual |
References onMouseMove(), and snapToAngle().
◆ itemChange()
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::itemChange().
◆ keyPressEvent()
|
overrideprotectedvirtual |
References terminateDrawing().
◆ mouseDoubleClickEvent()
|
overrideprotectedvirtual |
References onDoubleClick().
◆ mousePressEvent()
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::Rez::guiX(), TechDrawGui::QGIPrimPath::mousePressEvent(), onMousePress(), snapToAngle(), and terminateDrawing().
◆ mouseReleaseEvent()
|
overrideprotectedvirtual |
◆ onDoubleClick()
void QGTracker::onDoubleClick | ( | QPointF | pos | ) |
References getTrackerMode(), setPoint(), and terminateDrawing().
Referenced by mouseDoubleClickEvent().
◆ onMouseMove()
void QGTracker::onMouseMove | ( | QPointF | pos | ) |
References drawTrackCircle(), drawTrackLine(), drawTrackSquare(), and getTrackerMode().
Referenced by hoverMoveEvent().
◆ onMousePress()
void QGTracker::onMousePress | ( | QPointF | pos | ) |
References getPickedQGIV(), getTrackerMode(), setCircleFromPoints(), setPathFromPoints(), setPoint(), setSquareFromPoints(), and terminateDrawing().
Referenced by mousePressEvent().
◆ paint()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::paint(), and shape().
◆ qViewPicked
|
signal |
◆ setCircleFromPoints()
void QGTracker::setCircleFromPoints | ( | std::vector< QPointF > | pts | ) |
References Base::Console(), Base::ConsoleSingleton::Log(), and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by onMousePress().
◆ setPathFromPoints()
void QGTracker::setPathFromPoints | ( | std::vector< QPointF > | pts | ) |
References Base::Console(), Base::ConsoleSingleton::Log(), and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by onMousePress().
◆ setPoint()
void QGTracker::setPoint | ( | std::vector< QPointF > | pts | ) |
References Base::Console(), Base::ConsoleSingleton::Message(), and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by onDoubleClick(), and onMousePress().
◆ setSquareFromPoints()
void QGTracker::setSquareFromPoints | ( | std::vector< QPointF > | pts | ) |
References Base::Console(), Base::ConsoleSingleton::Log(), and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by onMousePress().
◆ setTrackerMode()
void TechDrawGui::QGTracker::setTrackerMode | ( | TrackerMode | m | ) |
Referenced by QGTracker().
◆ shape()
|
overridevirtual |
◆ sleep()
void QGTracker::sleep | ( | bool | b | ) |
◆ snapToAngle()
QPointF QGTracker::snapToAngle | ( | QPointF | pt | ) |
References TechDraw::DrawUtil::fpCompare().
Referenced by hoverMoveEvent(), and mousePressEvent().
◆ terminateDrawing()
void QGTracker::terminateDrawing | ( | void | ) |
References drawingFinished().
Referenced by keyPressEvent(), mousePressEvent(), onDoubleClick(), onMousePress(), and TechDrawGui::TaskLeaderLine::onTrackerClicked().
◆ type()
|
override |
The documentation for this class was generated from the following files:
- src/Mod/TechDraw/Gui/QGTracker.h
- src/Mod/TechDraw/Gui/QGTracker.cpp