rocs/RocsCore
RootedTreeStructure.cpp
Go to the documentation of this file.
53 boost::shared_ptr<RootedTreeStructure> ds = boost::static_pointer_cast<RootedTreeStructure>(create(parent));
103 RootedTreeNode* newdataRootedNode = qobject_cast< RootedTreeNode* >(fromOtherToNew.value(n.get()).get());
104 newdataRootedNode->setNumberOfChilds(n->adjacentDataList().count()); //FIXME here it goes wrong!
166 if (p != ptr && p->property("TreeEdge").isValid() && p->property("TreeEdge").toInt() == treeEdge){
236 qScriptRegisterMetaType<RootedTreeNode*>(engine, rootedTreeNodeToScriptValue, rootedTreeNodeFromScriptValue);
static DataPtr create(DataStructurePtr parent, int uniqueIdentifier, int dataType)
Definition: RootedTreeNode.cpp:26
iterator insert(const Key &key, const T &value)
Definition: DataStructure.h:43
void enqueue(const T &t)
void importStructure(DataStructurePtr other)
overwrites the current DataStructure with all values (Data and Pointer) from the given datastructure ...
Definition: RootedTreeStructure.cpp:69
T dequeue()
virtual DataStructurePtr getDataStructure() const
Definition: DataStructure.cpp:103
RootedTreeStructure(Document *parent=0)
Definition: RootedTreeStructure.cpp:59
bool isShowingAllPointers() const
return true if all the pointers need to be draw.
Definition: RootedTreeStructure.cpp:240
const_iterator insert(const T &value)
QScriptValue rootedTreeNodeToScriptValue(QScriptEngine *, RootedTreeNode *const &in)
Definition: RootedTreeStructure.cpp:36
void changed()
void showPointersChanged(const bool)
signal emitted on change of pointers visibility
void setShowAllPointers(const bool v)
set if all the pointers should be draw or not.
Definition: RootedTreeStructure.cpp:245
PointerPtr createPointer(DataPtr from, DataPtr to, int dataType=0)
FIXME addeding multiple pointers.
Definition: RootedTreeStructure.cpp:147
PointerPtr setNodeParent(DataPtr parent) const
Definition: RootedTreeNode.cpp:98
Definition: RootedTreeStructure.h:27
virtual void setEngine(QScriptEngine *engine)
Definition: DataStructure.cpp:515
qreal x() const
qreal y() const
QVariant property(const char *name) const
~RootedTreeStructure()
Definition: RootedTreeStructure.cpp:133
QScriptValue root_node() const
Definition: RootedTreeStructure.cpp:210
bool isEmpty() const
void setEngine(QScriptEngine *engine)
Definition: RootedTreeStructure.cpp:233
const T value(const Key &key) const
void rootedTreeNodeFromScriptValue(const QScriptValue &object, RootedTreeNode *&out)
Definition: RootedTreeStructure.cpp:39
virtual PointerPtr createPointer(DataPtr from, DataPtr to, int pointerType)
Creates new pointer from data element "from" to data element "to" of given type "pointerType".
Definition: DataStructure.cpp:393
Definition: Document.h:41
bool contains(const T &value) const
int generateUniqueIdentifier()
Definition: DataStructure.cpp:295
QScriptValue add_data(const QString &name)
Create a new data (tree node) Note that it only create but not insert it into the tree...
Definition: RootedTreeStructure.cpp:138
void throw_exception(std::exception const &)
Definition: RootedTreeStructure.cpp:43
bool setProperty(const char *name, const QVariant &value)
qreal toReal(bool *ok) const
DataPtr createData(const QString &name, int dataType=0)
Definition: RootedTreeStructure.cpp:199
QObject * parent() const
void setNumberOfChilds(const qint32 number)
Definition: RootedTreeNode.cpp:53
PointerPtr setChild(DataPtr child, quint32 idx) const
Definition: RootedTreeNode.cpp:139
void set_root_node(RootedTreeNode *node)
Definition: RootedTreeStructure.cpp:219
static DataStructurePtr create(Document *parent)
Definition: RootedTreeStructure.cpp:45
Definition: RootedTreeNode.h:25
DataPtr child(const quint32 i) const
return the i (0 to n-1) child
Definition: RootedTreeNode.cpp:125
void addDynamicProperty(const QString &property, const QVariant &value=QVariant(0))
Definition: DataStructure.cpp:481
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.