#include <QGILeaderLine.h>
Public Types | |
enum | { Type = QGraphicsItem::UserType + 232 } |
Public Types inherited from TechDrawGui::QGIView | |
enum | { Type = QGraphicsItem::UserType + 101 } |
Public Slots | |
void | onLineEditFinished (QPointF attach, std::vector< QPointF > deltas) |
virtual void | onSourceChange (TechDraw::DrawView *newParent) override |
Public Slots inherited from TechDrawGui::QGIView | |
virtual void | onSourceChange (TechDraw::DrawView *newParent) |
Signals | |
void | editComplete (void) |
Public Member Functions | |
void | abandonEdit (void) |
virtual QRectF | boundingRect () const override |
void | closeEdit (void) |
virtual void | drawBorder () override |
double | getEdgeFuzz (void) const |
virtual TechDraw::DrawLeaderLine * | getFeature (void) |
double | getLineWidth (void) |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) override |
QGILeaderLine () | |
void | setArrows (std::vector< QPointF > pathPoints) |
void | setLeaderFeature (TechDraw::DrawLeaderLine *feat) |
void | setPrettyNormal () |
void | setPrettyPre () |
void | setPrettySel () |
virtual QPainterPath | shape (void) const override |
void | startPathEdit (void) |
int | type () const override |
virtual void | updateView (bool update=false) override |
~QGILeaderLine ()=default | |
Public Member Functions inherited from TechDrawGui::QGIView | |
virtual void | addArbitraryItem (QGraphicsItem *qgi) |
void | alignTo (QGraphicsItem *, const QString &alignment) |
virtual void | drawCaption (void) |
QGIViewClip * | getClipGroup (void) |
virtual QColor | getCurrentColor (void) |
virtual bool | getFrameState (void) |
MDIViewPage * | getMDIViewPage (void) const |
virtual QColor | getPreColor (void) |
double | getScale (void) |
virtual QColor | getSelectColor (void) |
virtual QColor | getSettingColor (void) |
const char * | getViewName () const |
const std::string | getViewNameAsString () const |
TechDraw::DrawView * | getViewObject () const |
virtual void | isVisible (bool state) |
virtual bool | isVisible (void) |
void | makeMark (Base::Vector3d v, QColor c=Qt::red) |
void | makeMark (double x, double y, QColor c=Qt::red) |
void | makeMark (QPointF p, QColor c=Qt::red) |
QGIView () | |
virtual void | removeChild (QGIView *child) |
virtual void | rotateView (void) |
virtual void | setGroupSelection (bool b) |
void | setLocked (bool b) |
virtual void | setSettingColor (QColor c) |
void | setViewFeature (TechDraw::DrawView *obj) |
virtual void | toggleCache (bool state) |
int | type () const override |
virtual | ~QGIView () |
void | setPosition (qreal x, qreal y) |
Methods to ensure that Y-Coordinates are orientated correctly. More... | |
qreal | getY () |
bool | isInnerView () |
void | isInnerView (bool state) |
double | getYInClip (double y) |
Protected Member Functions | |
virtual void | draw () override |
QPointF | getAttachFromFeature (void) |
QColor | getNormalColor () override |
std::vector< QPointF > | getWayPointsFromFeature (void) |
virtual QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
QPainterPath | makeLeaderPath (std::vector< QPointF > qPoints) |
void | restoreState (void) |
void | saveState (void) |
void | setNormalColorAll () |
Protected Member Functions inherited from TechDrawGui::QGIView | |
virtual QRectF | customChildrenBoundingRect (void) const |
void | dumpRect (const char *text, QRectF r) |
Base::Reference< ParameterGrp > | getParmGroupCol (void) |
QGIView * | getQGIVByName (std::string name) |
Protected Attributes | |
QGIArrow * | m_arrow1 |
QGIArrow * | m_arrow2 |
bool | m_blockDraw |
QGEPath * | m_editPath |
QColor | m_editPathColor |
Qt::PenStyle | m_editPathStyle |
bool | m_hasHover |
QGIPrimPath * | m_line |
QColor | m_lineColor |
Qt::PenStyle | m_lineStyle |
double | m_lineWidth |
QGraphicsItem * | m_parentItem |
std::vector< QPointF > | m_pathPoints |
std::vector< Base::Vector3d > | m_savePoints |
double | m_saveX |
double | m_saveY |
Protected Attributes inherited from TechDrawGui::QGIView | |
QHash< QString, QGraphicsItem * > | alignHash |
QGCustomBorder * | m_border |
QBrush | m_brush |
QGICaption * | m_caption |
QColor | m_colCurrent |
QColor | m_colNormal |
QColor | m_colPre |
QColor | m_colSel |
QColor | m_colSetting |
QPen | m_decorPen |
QFont | m_font |
bool | m_innerView |
QGCustomLabel * | m_label |
QGCustomImage * | m_lock |
bool | m_locked |
double | m_lockHeight |
double | m_lockWidth |
QPen | m_pen |
std::string | viewName |
TechDraw::DrawView * | viewObj |
Additional Inherited Members | |
Static Public Member Functions inherited from TechDrawGui::QGIView | |
static int | calculateFontPixelSize (double sizeInMillimetres) |
static int | calculateFontPixelWidth (const QFont &font) |
static double | getDimFontSize (void) |
static QGVPage * | getGraphicsView (TechDraw::DrawView *dv) |
static QString | getPrefFont (void) |
static double | getPrefFontSize (void) |
static Gui::ViewProvider * | getViewProvider (App::DocumentObject *obj) |
Public Attributes inherited from TechDrawGui::QGIView | |
boost::signals2::signal< void(QGIView *, QPointF)> | signalSelectPoint |
Static Public Attributes inherited from TechDrawGui::QGIView | |
static const double | DefaultFontSizeInMM = 5.0 |
Member Enumeration Documentation
◆ anonymous enum
Constructor & Destructor Documentation
◆ QGILeaderLine()
|
explicit |
References ZVALUE::DIMENSION, m_arrow1, m_arrow2, m_editPath, m_line, and onLineEditFinished().
◆ ~QGILeaderLine()
|
default |
Member Function Documentation
◆ abandonEdit()
void QGILeaderLine::abandonEdit | ( | void | ) |
References TechDrawGui::QGEPath::clearMarkers(), m_editPath, and restoreState().
Referenced by TechDrawGui::TaskLeaderLine::abandonEditSession().
◆ boundingRect()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
Referenced by draw().
◆ closeEdit()
void QGILeaderLine::closeEdit | ( | void | ) |
References m_editPath, and TechDrawGui::QGEPath::onEndEdit().
Referenced by TechDrawGui::TaskLeaderLine::onTrackerClicked().
◆ draw()
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIView.
References boundingRect(), TechDraw::DrawLeaderLine::getBaseScale(), TechDraw::DrawLeaderLine::getBaseView(), getFeature(), getLineWidth(), TechDraw::DrawView::getScale(), App::PropertyQuantity::getValue(), App::PropertyBool::getValue(), TechDrawGui::QGIView::getViewObject(), TechDrawGui::QGIView::getViewProvider(), getWayPointsFromFeature(), TechDrawGui::Rez::guiX(), TechDrawGui::QGEPath::inEdit(), TechDraw::DrawView::isLocked(), TechDrawGui::QGIView::isVisible(), m_blockDraw, m_editPath, m_hasHover, m_line, m_lineStyle, makeLeaderPath(), TechDraw::DrawLeaderLine::Scalable, DraftVecUtils::scale(), setArrows(), TechDrawGui::QGIPrimPath::setFillStyle(), setNormalColorAll(), setPrettyNormal(), setPrettyPre(), setPrettySel(), TechDrawGui::QGIPrimPath::setStyle(), TechDrawGui::QGIPrimPath::setWidth(), TechDraw::DrawView::X, and TechDraw::DrawView::Y.
Referenced by itemChange(), onLineEditFinished(), onSourceChange(), and updateView().
◆ drawBorder()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
◆ editComplete
|
signal |
Referenced by onLineEditFinished().
◆ getAttachFromFeature()
|
protected |
◆ getEdgeFuzz()
double QGILeaderLine::getEdgeFuzz | ( | void | ) | const |
References TechDrawGui::PreferencesGui::edgeFuzz().
◆ getFeature()
|
virtual |
◆ getLineWidth()
double QGILeaderLine::getLineWidth | ( | void | ) |
◆ getNormalColor()
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIView.
References TechDrawGui::QGIView::getViewObject(), TechDrawGui::QGIView::getViewProvider(), TechDrawGui::PreferencesGui::leaderQColor(), and TechDrawGui::QGIView::m_colNormal.
Referenced by setNormalColorAll().
◆ getWayPointsFromFeature()
|
protected |
◆ hoverEnterEvent()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
References TechDrawGui::QGIView::hoverEnterEvent(), m_hasHover, and setPrettyPre().
◆ hoverLeaveEvent()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
References TechDrawGui::QGIView::hoverLeaveEvent(), m_hasHover, and setPrettyNormal().
◆ itemChange()
|
overrideprotectedvirtual |
Reimplemented from TechDrawGui::QGIView.
References draw(), TechDrawGui::QGIView::itemChange(), setPrettyNormal(), and setPrettySel().
◆ makeLeaderPath()
|
protected |
References Base::Console(), TechDraw::DrawLeaderLine::EndSymbol, getFeature(), TechDrawGui::QGIArrow::getOverlapAdjust(), TechDrawGui::QGIArrow::getPrefArrowSize(), App::PropertyEnumeration::getValue(), Base::ConsoleSingleton::Message(), and TechDraw::DrawLeaderLine::StartSymbol.
Referenced by draw().
◆ mousePressEvent()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
◆ mouseReleaseEvent()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
◆ onLineEditFinished
|
slot |
References TechDrawGui::Rez::appX(), draw(), editComplete(), TechDraw::DrawUtil::fpCompare(), getAttachFromFeature(), getFeature(), m_blockDraw, and m_editPath.
Referenced by QGILeaderLine().
◆ onSourceChange
|
overridevirtualslot |
◆ paint()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
References TechDrawGui::QGIView::paint().
◆ restoreState()
|
protected |
References getFeature(), m_savePoints, m_saveX, and m_saveY.
Referenced by abandonEdit().
◆ saveState()
|
protected |
References getFeature(), m_savePoints, m_saveX, and m_saveY.
Referenced by startPathEdit().
◆ setArrows()
void QGILeaderLine::setArrows | ( | std::vector< QPointF > | pathPoints | ) |
References TechDrawGui::QGIArrow::draw(), TechDraw::DrawLeaderLine::EndSymbol, getFeature(), getLineWidth(), TechDrawGui::QGIArrow::getPrefArrowSize(), App::PropertyEnumeration::getValue(), m_arrow1, m_arrow2, TechDrawGui::QGIArrow::setDirection(), TechDrawGui::QGIArrow::setDirMode(), TechDrawGui::QGIArrow::setSize(), TechDrawGui::QGIArrow::setStyle(), TechDrawGui::QGIPrimPath::setWidth(), and TechDraw::DrawLeaderLine::StartSymbol.
Referenced by draw().
◆ setLeaderFeature()
void QGILeaderLine::setLeaderFeature | ( | TechDraw::DrawLeaderLine * | feat | ) |
◆ setNormalColorAll()
|
protected |
References getNormalColor(), m_arrow1, m_arrow2, m_editPath, m_line, TechDrawGui::QGIPrimPath::setFillColor(), and TechDrawGui::QGIPrimPath::setNormalColor().
Referenced by draw(), and setLeaderFeature().
◆ setPrettyNormal()
void QGILeaderLine::setPrettyNormal | ( | ) |
References m_arrow1, m_arrow2, m_line, and TechDrawGui::QGIPrimPath::setPrettyNormal().
Referenced by draw(), hoverLeaveEvent(), itemChange(), and setLeaderFeature().
◆ setPrettyPre()
void QGILeaderLine::setPrettyPre | ( | ) |
References m_arrow1, m_arrow2, m_line, and TechDrawGui::QGIPrimPath::setPrettyPre().
Referenced by draw(), and hoverEnterEvent().
◆ setPrettySel()
void QGILeaderLine::setPrettySel | ( | ) |
References m_arrow1, m_arrow2, m_line, and TechDrawGui::QGIPrimPath::setPrettySel().
Referenced by draw(), and itemChange().
◆ shape()
|
overridevirtual |
◆ startPathEdit()
void QGILeaderLine::startPathEdit | ( | void | ) |
◆ type()
|
override |
◆ updateView()
|
overridevirtual |
Reimplemented from TechDrawGui::QGIView.
References Base::Console(), draw(), TechDrawGui::QGIView::getViewObject(), TechDrawGui::QGIView::getViewProvider(), and Base::ConsoleSingleton::Warning().
Referenced by TechDrawGui::QGVPage::addViewLeader(), and setLeaderFeature().
Member Data Documentation
◆ m_arrow1
|
protected |
Referenced by QGILeaderLine(), setArrows(), setNormalColorAll(), setPrettyNormal(), setPrettyPre(), and setPrettySel().
◆ m_arrow2
|
protected |
Referenced by QGILeaderLine(), setArrows(), setNormalColorAll(), setPrettyNormal(), setPrettyPre(), and setPrettySel().
◆ m_blockDraw
|
protected |
Referenced by draw(), and onLineEditFinished().
◆ m_editPath
|
protected |
Referenced by abandonEdit(), closeEdit(), draw(), onLineEditFinished(), QGILeaderLine(), setNormalColorAll(), and startPathEdit().
◆ m_editPathColor
|
protected |
◆ m_editPathStyle
|
protected |
◆ m_hasHover
|
protected |
Referenced by draw(), hoverEnterEvent(), and hoverLeaveEvent().
◆ m_line
|
protected |
Referenced by draw(), QGILeaderLine(), setNormalColorAll(), setPrettyNormal(), setPrettyPre(), and setPrettySel().
◆ m_lineColor
|
protected |
◆ m_lineStyle
|
protected |
Referenced by draw().
◆ m_lineWidth
|
protected |
◆ m_parentItem
|
protected |
Referenced by onSourceChange().
◆ m_pathPoints
|
protected |
◆ m_savePoints
|
protected |
Referenced by restoreState(), and saveState().
◆ m_saveX
|
protected |
Referenced by restoreState(), and saveState().
◆ m_saveY
|
protected |
Referenced by restoreState(), and saveState().
The documentation for this class was generated from the following files:
- src/Mod/TechDraw/Gui/QGILeaderLine.h
- src/Mod/TechDraw/Gui/QGILeaderLine.cpp