#include <vsimplepoint.h>
Public Types | |
enum | { Type = UserType + static_cast<int>(Vis::SimplePoint) } |
Public Types inherited from VScenePoint | |
enum | { Type = UserType + static_cast<int>(Vis::ScenePoint) } |
Public Slots | |
void | deletePoint () |
void | pointChosen () |
void | pointSelected (bool selected) |
void | pointnameChangedPosition (const QPointF &pos) |
Signals | |
void | Choosed (quint32 id) |
Choosed send id when clicked. More... | |
void | Selected (bool selected, quint32 id) |
void | nameChangedPosition (const QPointF &pos, quint32 id) |
Signals inherited from VAbstractSimple | |
void | showContextMenu (QGraphicsSceneContextMenuEvent *event, quint32 id=null_id) |
void | Delete () |
Public Member Functions | |
VSimplePoint (quint32 id, const QColor ¤tColor, QObject *parent=nullptr) | |
virtual | ~VSimplePoint ()=default |
virtual int | type () const Q_DECL_OVERRIDE |
void | SetVisualizationMode (bool value) |
bool | IsVisualizationMode () const |
void | SetPointHighlight (bool value) |
void | SetEnabled (bool enabled) |
void | EnableToolMove (bool move) |
void | allowTextHover (bool enabled) |
void | allowTextSelectable (bool enabled) |
virtual void | ToolSelectionType (const SelectionType &type) Q_DECL_OVERRIDE |
void | setOnlyPoint (bool value) |
bool | isOnlyPoint () const |
Public Member Functions inherited from VAbstractSimple | |
VAbstractSimple (quint32 id, QObject *parent=nullptr) | |
virtual | ~VAbstractSimple ()=default |
GOType | GetType () const |
void | SetType (const GOType &value) |
Public Member Functions inherited from VScenePoint | |
VScenePoint (const QColor &lineColor, QGraphicsItem *parent=nullptr) | |
virtual | ~VScenePoint ()=default |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) Q_DECL_OVERRIDE |
virtual void | refreshPointGeometry (const VPointF &point) |
void | refreshLeader () |
Protected Member Functions | |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE |
virtual void | keyReleaseEvent (QKeyEvent *event) Q_DECL_OVERRIDE |
virtual QVariant | itemChange (GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE |
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE |
Protected Member Functions inherited from VScenePoint | |
void | setOnlyPoint (bool value) |
bool | isOnlyPoint () const |
void | setPointColor (const QString &value) |
Private Attributes | |
bool | m_visualizationMode |
bool | m_alwaysHovered |
Additional Inherited Members | |
Protected Attributes inherited from VAbstractSimple | |
quint32 | id |
id spline id. More... | |
SelectionType | selectionType |
GOType | type |
Protected Attributes inherited from VScenePoint | |
VGraphicsSimpleTextItem * | m_pointName |
VScaledLine * | m_pointLeader |
namePoint point text. More... | |
QColor | m_pointColor |
pointL line that we see if Text is moved too away from point. More... | |
bool | m_onlyPoint |
m_pointColor color of point. More... | |
bool | m_isHovered |
bool | m_showPointName |
Definition at line 72 of file vsimplepoint.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 80 of file vsimplepoint.h.
VSimplePoint::VSimplePoint | ( | quint32 | id, |
const QColor & | currentColor, | ||
QObject * | parent = nullptr |
||
) |
Definition at line 74 of file vsimplepoint.cpp.
References contextMenuEvent(), deletePoint(), VGraphicsSimpleTextItem::deleteTool(), VScenePoint::m_pointColor, VScenePoint::m_pointName, VGraphicsSimpleTextItem::nameChangedPosition(), VGraphicsSimpleTextItem::pointChosen(), pointChosen(), pointnameChangedPosition(), VGraphicsSimpleTextItem::pointSelected(), pointSelected(), and VGraphicsSimpleTextItem::showContextMenu().
|
virtualdefault |
void VSimplePoint::allowTextHover | ( | bool | enabled | ) |
Definition at line 122 of file vsimplepoint.cpp.
References VScenePoint::m_pointName.
Referenced by VAbstractOperation::AllowPointLabelHover(), and VToolDoublePoint::allowTextHover().
void VSimplePoint::allowTextSelectable | ( | bool | enabled | ) |
Definition at line 128 of file vsimplepoint.cpp.
References VScenePoint::m_pointName.
Referenced by VAbstractOperation::AllowPointLabelSelecting(), and VToolDoublePoint::allowTextSelectable().
|
signal |
Choosed send id when clicked.
id | point id. |
Referenced by VAbstractOperation::InitOperatedObjects(), mousePressEvent(), mouseReleaseEvent(), pointChosen(), and VToolDoublePoint::VToolDoublePoint().
|
protectedvirtual |
Definition at line 258 of file vsimplepoint.cpp.
References VAbstractSimple::showContextMenu().
Referenced by VSimplePoint().
|
slot |
Definition at line 141 of file vsimplepoint.cpp.
References VAbstractSimple::Delete().
Referenced by VSimplePoint().
void VSimplePoint::EnableToolMove | ( | bool | move | ) |
Definition at line 116 of file vsimplepoint.cpp.
References VScenePoint::m_pointName.
Referenced by VAbstractOperation::EnableToolMove(), and VToolDoublePoint::EnableToolMove().
|
protectedvirtual |
Reimplemented from VScenePoint.
Definition at line 213 of file vsimplepoint.cpp.
References VScenePoint::m_isHovered.
|
protectedvirtual |
Reimplemented from VScenePoint.
Definition at line 220 of file vsimplepoint.cpp.
References m_alwaysHovered, and VScenePoint::m_isHovered.
bool VScenePoint::isOnlyPoint |
Definition at line 91 of file vscenepoint.cpp.
bool VSimplePoint::IsVisualizationMode | ( | ) | const |
Definition at line 96 of file vsimplepoint.cpp.
References m_visualizationMode.
|
protectedvirtual |
Definition at line 244 of file vsimplepoint.cpp.
References VScenePoint::m_pointName, and Selected().
|
protectedvirtual |
Definition at line 230 of file vsimplepoint.cpp.
References VAbstractSimple::Delete().
|
protectedvirtual |
Definition at line 165 of file vsimplepoint.cpp.
References ByMouseRelease, Choosed(), m_visualizationMode, and VAbstractSimple::selectionType.
|
protectedvirtual |
Definition at line 197 of file vsimplepoint.cpp.
References ByMouseRelease, Choosed(), m_visualizationMode, and VAbstractSimple::selectionType.
|
signal |
|
slot |
Definition at line 147 of file vsimplepoint.cpp.
References Choosed().
Referenced by VSimplePoint().
|
slot |
Definition at line 159 of file vsimplepoint.cpp.
References nameChangedPosition().
Referenced by VSimplePoint().
|
slot |
Definition at line 153 of file vsimplepoint.cpp.
Referenced by VSimplePoint().
|
signal |
Referenced by VAbstractOperation::InitOperatedObjects(), itemChange(), and VToolDoublePoint::VToolDoublePoint().
void VSimplePoint::SetEnabled | ( | bool | enabled | ) |
Definition at line 109 of file vsimplepoint.cpp.
References VScenePoint::m_pointName, and VGraphicsSimpleTextItem::setEnabled().
Referenced by VAbstractOperation::Disable(), and VToolDoublePoint::Disable().
void VScenePoint::setOnlyPoint |
Definition at line 90 of file vscenepoint.cpp.
Referenced by PieceAnchorPointVisual::RefreshGeometry(), and VisToolInternalPath::RefreshGeometry().
void VSimplePoint::SetPointHighlight | ( | bool | value | ) |
Definition at line 102 of file vsimplepoint.cpp.
References m_alwaysHovered, and VScenePoint::m_isHovered.
Referenced by VisPath::GetPoint().
void VSimplePoint::SetVisualizationMode | ( | bool | value | ) |
Definition at line 89 of file vsimplepoint.cpp.
References m_visualizationMode.
Referenced by VisPath::GetPoint().
|
virtual |
Reimplemented from VAbstractSimple.
Definition at line 134 of file vsimplepoint.cpp.
References VScenePoint::m_pointName, VGraphicsSimpleTextItem::textSelectionType(), VAbstractSimple::ToolSelectionType(), and type().
Referenced by VAbstractOperation::ToolSelectionType(), and VToolDoublePoint::ToolSelectionType().
|
inlinevirtual |
Reimplemented from VScenePoint.
Definition at line 79 of file vsimplepoint.h.
References Type.
Referenced by ToolSelectionType().
|
private |
Definition at line 124 of file vsimplepoint.h.
Referenced by hoverLeaveEvent(), and SetPointHighlight().
|
private |
Definition at line 123 of file vsimplepoint.h.
Referenced by IsVisualizationMode(), mousePressEvent(), mouseReleaseEvent(), and SetVisualizationMode().