The VNodePoint class point detail node. More...
#include <vnodepoint.h>
Public Types | |
enum | { Type = UserType + static_cast<int>(Tool::NodePoint) } |
Public Types inherited from VScenePoint | |
enum | { Type = UserType + static_cast<int>(Vis::ScenePoint) } |
Public Slots | |
virtual void | FullUpdateFromFile () Q_DECL_OVERRIDE |
showContextMenu emit when need show tool context menu. More... | |
void | nameChangedPosition (const QPointF &pos) |
nameChangedPosition point name change position. More... | |
void | pointChosen () |
void | EnableToolMove (bool move) |
virtual void | AllowHover (bool enabled) Q_DECL_OVERRIDE |
virtual void | AllowSelecting (bool enabled) Q_DECL_OVERRIDE |
void | allowTextHover (bool enabled) |
void | allowTextSelectable (bool enabled) |
Public Slots inherited from VAbstractTool | |
virtual void | FullUpdateFromFile ()=0 |
FullUpdateFromFile update tool data form file. More... | |
virtual void | AllowHover (bool enabled)=0 |
virtual void | AllowSelecting (bool enabled)=0 |
virtual void | ToolSelectionType (const SelectionType &type) |
Public Member Functions | |
virtual int | type () const Q_DECL_OVERRIDE |
virtual QString | getTagName () const Q_DECL_OVERRIDE |
virtual void | setPointNamePosition (quint32 id, const QPointF &pos) Q_DECL_OVERRIDE |
setPointNamePosition change name text position. More... | |
virtual void | setPointNameVisiblity (quint32 id, bool visible) Q_DECL_OVERRIDE |
Public Member Functions inherited from VAbstractNode | |
VAbstractNode (VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode, const QString &blockName=QString(), const quint32 &idTool=0, QObject *parent=nullptr) | |
VAbstractNode constructor. More... | |
virtual | ~VAbstractNode () Q_DECL_EQ_DEFAULT |
virtual void | ShowVisualization (bool show) Q_DECL_OVERRIDE |
virtual void | incrementReferens () Q_DECL_OVERRIDE |
incrementReferens increment referens. More... | |
virtual void | decrementReferens () Q_DECL_OVERRIDE |
decrementReferens decrement reference for all parent objects. More... | |
ParentType | GetParentType () const |
void | SetParentType (const ParentType &value) |
virtual void | GroupVisibility (quint32 object, bool visible) Q_DECL_OVERRIDE |
bool | IsExluded () const |
void | SetExluded (bool exluded) |
Public Member Functions inherited from VAbstractTool | |
VAbstractTool (VAbstractPattern *doc, VContainer *data, quint32 id, QObject *parent=nullptr) | |
VAbstractTool container. More... | |
virtual | ~VAbstractTool () Q_DECL_OVERRIDE |
quint32 | getId () const |
getId return object id. More... | |
const VContainer * | getData () const |
getData return pointer to data container. More... | |
QMap< QString, quint32 > | PointsList () const |
Public Member Functions inherited from VDataTool | |
VDataTool (VContainer *data, QObject *parent=nullptr) | |
VDataTool constructor. More... | |
virtual | ~VDataTool () Q_DECL_EQ_DEFAULT |
VContainer | getData () const |
getData return data container. More... | |
void | setData (const VContainer *value) |
setData set data container. More... | |
virtual quint32 | referens () const |
referens return count of referens. More... | |
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 () |
Static Public Member Functions | |
static void | Create (VAbstractPattern *doc, VContainer *data, VMainGraphicsScene *scene, quint32 id, quint32 idPoint, const Document &parse, const Source &typeCreation, const QString &blockName=QString(), const quint32 &idTool=0) |
Create help create tool. More... | |
Static Public Member Functions inherited from VAbstractTool | |
static qreal | CheckFormula (const quint32 &toolId, QString &formula, VContainer *data) |
CheckFormula check formula. More... | |
static const QStringList | Colors () |
static QMap< QString, QString > | ColorsList () |
static QMap< QString, QString > | supportColorsList () |
static QMap< QString, QString > | backgroundColorsList () |
static QPixmap | createColorIcon (const int w, const int h, const QString &color) |
static const QStringList | fills () |
static void | AddRecord (const quint32 id, const Tool &toolType, VAbstractPattern *doc) |
AddRecord add record about tool in history. More... | |
static void | AddNodes (VAbstractPattern *doc, QDomElement &domElement, const VPiecePath &path) |
static void | AddNodes (VAbstractPattern *doc, QDomElement &domElement, const VPiece &piece) |
template<typename T > | |
static quint32 | CreateNode (VContainer *data, quint32 id) |
CreateNode create new node for detail. More... | |
Static Public Attributes | |
static const QString | ToolType = QStringLiteral("modeling") |
Static Public Attributes inherited from VAbstractNode | |
static const QString | AttrIdTool = QStringLiteral("idTool") |
Static Public Attributes inherited from VAbstractTool | |
static bool | m_suppressContextMenu = false |
static const QString | AttrInUse = QStringLiteral("inUse") |
Protected Member Functions | |
virtual void | AddToFile () Q_DECL_OVERRIDE |
AddToFile add tag with Information about tool into file. More... | |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE |
mouseReleaseEvent handle mouse release events. More... | |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
virtual void | ShowNode () Q_DECL_OVERRIDE |
virtual void | HideNode () Q_DECL_OVERRIDE |
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE |
Protected Member Functions inherited from VAbstractNode | |
void | AddToModeling (const QDomElement &domElement) |
AddToModeling add tag to modeling tag current pattern peace. More... | |
virtual void | ToolCreation (const Source &typeCreation) Q_DECL_OVERRIDE |
virtual void | SetVisualization () Q_DECL_OVERRIDE |
Protected Member Functions inherited from VAbstractTool | |
virtual void | RefreshDataInFile () |
RefreshDataInFile refresh attributes in file. If attributes don't exist create them. More... | |
virtual void | RemoveReferens () |
RemoveReferens decrement value of reference. More... | |
virtual void | deleteTool (bool ask=true) |
deleteTool full delete object form scene and file. More... | |
template<typename T > | |
void | AddVisualization () |
Protected Member Functions inherited from VScenePoint | |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE |
void | setOnlyPoint (bool value) |
bool | isOnlyPoint () const |
void | setPointColor (const QString &value) |
Private Member Functions | |
VNodePoint (VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Source &typeCreation, const QString &blockName=QString(), const quint32 &idTool=0, QObject *qoParent=nullptr, QGraphicsItem *parent=nullptr) | |
VNodePoint constructor. More... | |
Additional Inherited Members | |
Signals inherited from VAbstractTool | |
void | toolHasChanges () |
toolHasChanges emit if tool create change that need save. More... | |
void | chosenTool (quint32 id, SceneObject type) |
chosenTool emit if object was clicked. More... | |
void | LiteUpdateTree (const Document &parse) |
FullUpdateTree emit if need reparse pattern file. More... | |
void | ToolTip (const QString &toolTip) |
Static Protected Member Functions inherited from VAbstractTool | |
static int | ConfirmDeletion () |
static QDomElement | AddSANode (VAbstractPattern *doc, const QString &tagName, const VPieceNode &node) |
static void | AddNode (VAbstractPattern *doc, QDomElement &domElement, const VPieceNode &node) |
static QVector< VPieceNode > | PrepareNodes (const VPiecePath &path, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) |
static quint32 | PrepareNode (const VPieceNode &node, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) |
Protected Attributes inherited from VAbstractNode | |
ParentType | parentType |
quint32 | idNode |
idNodenode id. More... | |
quint32 | idTool |
idTool id tool. More... | |
QString | m_blockName |
bool | m_exluded |
Protected Attributes inherited from VAbstractTool | |
VAbstractPattern * | doc |
doc dom document container More... | |
const quint32 | m_id |
id object id. More... | |
QPointer< Visualization > | vis |
SelectionType | selectionType |
Protected Attributes inherited from VDataTool | |
VContainer | data |
data container with data More... | |
quint32 | _referens |
_referens keep count tools what use this tool. If value more than 1 you can't delete tool. More... | |
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 |
The VNodePoint class point detail node.
Definition at line 72 of file vnodepoint.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 82 of file vnodepoint.h.
|
private |
VNodePoint constructor.
doc | dom document container. |
data | container with variables. |
id | object id in container. |
idPoint | object id in containerPoint. |
typeCreation | way we create this tool. |
idTool | tool id. |
qoParent | QObject parent |
parent | parent object. |
Definition at line 104 of file vnodepoint.cpp.
References contextMenuEvent(), VDataTool::data, VScenePoint::m_pointName, nameChangedPosition(), VGraphicsSimpleTextItem::nameChangedPosition(), pointChosen(), VGraphicsSimpleTextItem::pointChosen(), VScenePoint::refreshPointGeometry(), VGraphicsSimpleTextItem::setShowParentTooltip(), VGraphicsSimpleTextItem::showContextMenu(), and VAbstractNode::ToolCreation().
Referenced by Create().
|
protectedvirtual |
AddToFile add tag with Information about tool into file.
Implements VAbstractTool.
Definition at line 204 of file vnodepoint.cpp.
References VAbstractNode::AddToModeling(), VDomDocument::AttrId, AttrIdObject, VAbstractNode::AttrIdTool, AttrMx, AttrMy, AttrShowPointName, AttrType, VDataTool::data, VAbstractTool::doc, VContainer::GeometricObject(), getTagName(), VAbstractNode::idNode, VAbstractNode::idTool, VAbstractTool::m_id, NULL_ID, qApp, VDomDocument::SetAttribute(), and ToolType.
|
virtualslot |
Definition at line 352 of file vnodepoint.cpp.
Referenced by Create().
|
virtualslot |
Definition at line 358 of file vnodepoint.cpp.
Referenced by Create().
|
slot |
Definition at line 364 of file vnodepoint.cpp.
References VScenePoint::m_pointName.
Referenced by Create().
|
slot |
Definition at line 370 of file vnodepoint.cpp.
References VScenePoint::m_pointName.
Referenced by Create().
|
protectedvirtual |
Definition at line 323 of file vnodepoint.cpp.
References VDataTool::data, VAbstractTool::doc, VAbstractTool::m_id, VAbstractTool::m_suppressContextMenu, and qApp.
Referenced by VNodePoint().
|
static |
Create help create tool.
doc | dom document container. |
data | container with variables. |
id | object id in container. |
idPoint | object id in containerPoint. |
parse | parser file mode. |
typeCreation | way we create this tool. |
idTool | tool id. |
Definition at line 134 of file vnodepoint.cpp.
References VAbstractTool::AddRecord(), VAbstractPattern::AddTool(), AllowHover(), AllowSelecting(), allowTextHover(), allowTextSelectable(), VDataTool::data, VAbstractTool::doc, VMainGraphicsScene::EnablePointItemHover(), VMainGraphicsScene::EnablePointItemSelection(), VMainGraphicsScene::enableTextItemHover(), VMainGraphicsScene::enableTextItemSelection(), EnableToolMove(), VMainGraphicsScene::EnableToolMove(), FullParse, VAbstractPattern::getTool(), VAbstractNode::idTool, NodePoint, NULL_ID, SCASSERT, Scene, VAbstractNode::SetParentType(), VAbstractPattern::UpdateToolData(), and VNodePoint().
Referenced by QT_WARNING_POP::AddNodePoint(), VPattern::ParseNodePoint(), and VAbstractTool::PrepareNode().
|
slot |
Definition at line 346 of file vnodepoint.cpp.
References VScenePoint::m_pointName.
Referenced by Create(), PatternPieceTool::EnableToolMove(), and PatternPieceTool::pieceLockedChanged().
|
virtualslot |
showContextMenu emit when need show tool context menu.
FullUpdateFromFile update tool data form file.
event | context menu event. |
Definition at line 188 of file vnodepoint.cpp.
References VDataTool::data, VAbstractTool::m_id, and VScenePoint::refreshPointGeometry().
|
virtual |
Implements VAbstractTool.
Definition at line 173 of file vnodepoint.cpp.
References VAbstractPattern::TagPoint.
Referenced by AddToFile().
|
protectedvirtual |
Implements VAbstractNode.
Definition at line 317 of file vnodepoint.cpp.
|
overrideprotectedvirtual |
Reimplemented from VScenePoint.
Definition at line 240 of file vnodepoint.cpp.
References VDataTool::data, VContainer::GetGObject(), VScenePoint::hoverEnterEvent(), and VAbstractTool::m_id.
|
protectedvirtual |
Definition at line 225 of file vnodepoint.cpp.
|
protectedvirtual |
mouseReleaseEvent handle mouse release events.
event | mouse release event. |
Definition at line 253 of file vnodepoint.cpp.
References VAbstractTool::chosenTool(), VAbstractTool::m_id, and Point.
|
slot |
nameChangedPosition point name change position.
pos | new position. |
Definition at line 302 of file vnodepoint.cpp.
References VAbstractTool::doc, VAbstractTool::m_id, MoveLabel, and qApp.
Referenced by VNodePoint().
|
slot |
Definition at line 179 of file vnodepoint.cpp.
References VAbstractTool::chosenTool(), VAbstractTool::m_id, and Point.
Referenced by VNodePoint().
|
virtual |
setPointNamePosition change name text position.
pos | new position. |
Reimplemented from VAbstractTool.
Definition at line 267 of file vnodepoint.cpp.
References VDataTool::data, VContainer::GeometricObject(), VAbstractTool::m_id, VScenePoint::m_pointName, VMainGraphicsView::NewSceneRect(), qApp, VScenePoint::refreshLeader(), and VGraphicsSimpleTextItem::setPosition().
|
virtual |
Reimplemented from VAbstractTool.
Definition at line 287 of file vnodepoint.cpp.
References VDataTool::data, VContainer::GeometricObject(), VAbstractTool::m_id, and VScenePoint::refreshPointGeometry().
|
protectedvirtual |
Implements VAbstractNode.
Definition at line 308 of file vnodepoint.cpp.
References VAbstractNode::m_exluded, VAbstractNode::parentType, and Scene.
|
inlinevirtual |
|
static |
Definition at line 80 of file vnodepoint.h.
Referenced by AddToFile(), and VPattern::ParsePointElement().