#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::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=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< ParameterGrp > | getParmGroup (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 |
|
explicit |
QGTracker::~QGTracker | ( | ) |
|
overridevirtual |
Referenced by shape().
std::vector< Base::Vector3d > QGTracker::convertPoints | ( | void | ) |
|
signal |
Referenced by terminateDrawing().
void QGTracker::drawTrackCircle | ( | QPointF | pos | ) |
Referenced by onMouseMove().
void QGTracker::drawTrackLine | ( | QPointF | pos | ) |
Referenced by onMouseMove().
void QGTracker::drawTrackPoint | ( | QPointF | pos | ) |
void QGTracker::drawTrackSquare | ( | QPointF | pos | ) |
Referenced by onMouseMove().
|
protected |
Referenced by onMousePress().
|
protected |
References App::Color::asValue(), App::GetApplication(), ParameterGrp::GetGroup(), ParameterGrp::GetUnsigned(), and App::Application::GetUserParameter().
Referenced by QGTracker().
TrackerMode TechDrawGui::QGTracker::getTrackerMode | ( | void | ) |
Referenced by onDoubleClick(), onMouseMove(), and onMousePress().
|
protected |
References App::GetApplication(), ParameterGrp::GetFloat(), ParameterGrp::GetGroup(), and App::Application::GetUserParameter().
Referenced by QGTracker().
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::hoverEnterEvent().
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::hoverLeaveEvent().
|
overrideprotectedvirtual |
References onMouseMove(), and snapToAngle().
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::itemChange().
|
overrideprotectedvirtual |
References terminateDrawing().
|
overrideprotectedvirtual |
References onDoubleClick().
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::Rez::guiX(), TechDrawGui::QGIPrimPath::mousePressEvent(), onMousePress(), snapToAngle(), and terminateDrawing().
|
overrideprotectedvirtual |
void QGTracker::onDoubleClick | ( | QPointF | pos | ) |
References getTrackerMode(), setPoint(), and terminateDrawing().
Referenced by mouseDoubleClickEvent().
void QGTracker::onMouseMove | ( | QPointF | pos | ) |
References drawTrackCircle(), drawTrackLine(), drawTrackSquare(), and getTrackerMode().
Referenced by hoverMoveEvent().
void QGTracker::onMousePress | ( | QPointF | pos | ) |
References getPickedQGIV(), getTrackerMode(), setCircleFromPoints(), setPathFromPoints(), setPoint(), setSquareFromPoints(), and terminateDrawing().
Referenced by mousePressEvent().
|
overridevirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References TechDrawGui::QGIPrimPath::paint(), and shape().
|
signal |
void QGTracker::setCircleFromPoints | ( | std::vector< QPointF > | pts | ) |
References Base::Console(), Base::ConsoleSingleton::Log(), and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by onMousePress().
void QGTracker::setPathFromPoints | ( | std::vector< QPointF > | pts | ) |
References Base::Console(), Base::ConsoleSingleton::Log(), and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by onMousePress().
void QGTracker::setPoint | ( | std::vector< QPointF > | pts | ) |
void QGTracker::setSquareFromPoints | ( | std::vector< QPointF > | pts | ) |
References Base::Console(), Base::ConsoleSingleton::Log(), and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by onMousePress().
void TechDrawGui::QGTracker::setTrackerMode | ( | TrackerMode | m | ) |
Referenced by QGTracker().
|
overridevirtual |
Reimplemented from TechDrawGui::QGIPrimPath.
References boundingRect().
Referenced by draftguitools.gui_offset.Offset::action(), PathScripts.PathSurfaceSupport.PathGeometryGenerator::generatePathGeometry(), draftguitools.gui_offset.Offset::numericRadius(), and paint().
void QGTracker::sleep | ( | bool | b | ) |
QPointF QGTracker::snapToAngle | ( | QPointF | pt | ) |
References TechDraw::DrawUtil::fpCompare().
Referenced by hoverMoveEvent(), and mousePressEvent().
void QGTracker::terminateDrawing | ( | void | ) |
References drawingFinished().
Referenced by keyPressEvent(), mousePressEvent(), onDoubleClick(), onMousePress(), and TechDrawGui::TaskLeaderLine::onTrackerClicked().
|
override |
Referenced by ArchProfile.ProfileTaskPanel::accept(), and ArchProfile.ProfileTaskPanel::retranslateUi().