|
graph_analysis
|
custom class for drag-n-drop of edges More...
#include <EdgeMimeData.hpp>


Public Member Functions | |
| EdgeMimeData (Vertex::Ptr &sourceVertex, Vertex::Ptr &targetVertex) | |
| bool | sourceVertexIsSameAs (const Vertex::Ptr &other) const |
| compares the stored reference to the other vertex given. More... | |
Public Attributes | |
| Vertex::Ptr & | mpSourceVertex |
| Vertex::Ptr & | mpTargetVertex |
custom class for drag-n-drop of edges
forgive me for this horrible hack... i hope it never explodes or rots.
the drag-n-drop event on the receiving side, inside the VertexItem, get a "const*" to this mimeData object, which we cannot manipulate. but somehow, i wanna tell the originating side on which vertex the drag event was dropped. so containing to references for the two vertexes.
funny sidenote: having a "mutable" member did result in horrible undefined behaviour, although it should work (tm).
| graph_analysis::gui::EdgeMimeData::EdgeMimeData | ( | Vertex::Ptr & | sourceVertex, |
| Vertex::Ptr & | targetVertex | ||
| ) |
| bool graph_analysis::gui::EdgeMimeData::sourceVertexIsSameAs | ( | const Vertex::Ptr & | other | ) | const |
compares the stored reference to the other vertex given.
protects against "self drops", when edges are considered to not connect one edge to itself.
| other | the vertex to check |
| Vertex::Ptr& graph_analysis::gui::EdgeMimeData::mpSourceVertex |
| Vertex::Ptr& graph_analysis::gui::EdgeMimeData::mpTargetVertex |
1.8.13