rocs/RocsCore
#include <Data.h>
|
virtual | ~Data () |
|
void | addPointer (PointerPtr pointer) |
|
DataList | adjacentDataList () const |
|
QVariant | color () const |
|
PointerPtr | createPointer (DataPtr to) |
|
DataStructurePtr | dataStructure () const |
|
int | dataType () const |
|
QScriptEngine * | engine () const |
|
virtual DataPtr | getData () const |
|
QString | icon () const |
|
int | identifier () const |
|
PointerList & | inPointerList () const |
|
bool | isVisible () const |
|
PointerList & | outPointerList () const |
|
PointerList | pointerList () const |
|
PointerList | pointerList (DataPtr to) const |
|
QList< QString > | properties () const |
|
void | remove (PointerPtr e) |
|
QScriptValue | scriptValue () const |
|
virtual void | setEngine (QScriptEngine *_engine) |
|
qreal | width () const |
|
qreal | x () const |
|
qreal | y () const |
|
| QObject (QObject *parent) |
|
| QObject (QObject *parent, const char *name) |
|
virtual | ~QObject () |
|
bool | blockSignals (bool block) |
|
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
|
const QObjectList & | children () const |
|
const char * | className () const |
|
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
|
void | deleteLater () |
|
void | destroyed (QObject *obj) |
|
bool | disconnect (const QObject *receiver, const char *method) |
|
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
|
void | dumpObjectInfo () |
|
void | dumpObjectTree () |
|
QList< QByteArray > | dynamicPropertyNames () const |
|
virtual bool | event (QEvent *e) |
|
T | findChild (const QString &name) const |
|
QList< T > | findChildren (const QRegExp ®Exp) const |
|
QList< T > | findChildren (const QString &name) const |
|
bool | inherits (const char *className) const |
|
void | insertChild (QObject *object) |
|
void | installEventFilter (QObject *filterObj) |
|
bool | isA (const char *className) const |
|
bool | isWidgetType () const |
|
void | killTimer (int id) |
|
virtual const QMetaObject * | metaObject () const |
|
void | moveToThread (QThread *targetThread) |
|
const char * | name () const |
|
const char * | name (const char *defaultName) const |
|
QString | objectName () const |
|
QObject * | parent () const |
|
QVariant | property (const char *name) const |
|
void | removeChild (QObject *object) |
|
void | removeEventFilter (QObject *obj) |
|
void | setName (const char *name) |
|
void | setObjectName (const QString &name) |
|
void | setParent (QObject *parent) |
|
bool | setProperty (const char *name, const QVariant &value) |
|
bool | signalsBlocked () const |
|
int | startTimer (int interval) |
|
QThread * | thread () const |
|
|
static DataPtr | create (DataStructurePtr dataStructure, int uniqueIdentifier, int dataType) |
|
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
|
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
|
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
|
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
|
QString | tr (const char *sourceText, const char *disambiguation, int n) |
|
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
|
Definition at line 40 of file Data.h.
Default destructor.
DO NOT CALL IT, let the shared pointer take care for deletion.
Definition at line 138 of file Data.cpp.
Data::Data |
( |
DataStructurePtr |
dataStructure, |
|
|
int |
uniqueIdentifer, |
|
|
int |
dataType |
|
) |
| |
|
protected |
Protected constructor.
Definition at line 132 of file Data.cpp.
void Data::add_property |
( |
const QString & |
name, |
|
|
const QString & |
value |
|
) |
| |
|
slot |
void Data::addDynamicProperty |
( |
const QString & |
property, |
|
|
const QVariant & |
value |
|
) |
| |
|
slot |
Add new dynamic property with identifier property
to this data element and sets it to value
.
- Parameters
-
property | is the identifier for the new property |
value | is the value of this new property |
Definition at line 434 of file Data.cpp.
Register an created pointer to this data element.
By the pointer direction it is decided whether it is an out-/in-pointer. Calling this method more than once with the same pointer is safe (the pointer is added still only once.)
- Parameters
-
pointer | is pointer to be added |
Definition at line 231 of file Data.cpp.
DataList Data::adjacentDataList |
( |
| ) |
const |
- Returns
- list of adjacent data elements
Definition at line 197 of file Data.cpp.
- Returns
- color of data element
void Data::colorChanged |
( |
const QColor & |
c | ) |
|
|
signal |
Create data element objects.
- Parameters
-
dataStructure | is data structure to that the new data element belongs |
uniqueIdentifier | is unique identifier of the data element, it must be unique within the document |
dataType | is the type of the created data element, it must be existing and registered |
- Returns
- the created data element
Definition at line 92 of file Data.cpp.
Factory method to create a data element of type T
.
Definition at line 264 of file Data.h.
Create new pointer to to
.
By using this method, the pointer gets registered at both of its end-points. Use this method to create new pointers.
- Parameters
-
to | is the target of the new pointer |
- Returns
- the created pointer
Definition at line 257 of file Data.cpp.
- Returns
- data structure to that this data element belongs
Definition at line 150 of file Data.cpp.
int Data::dataType |
( |
| ) |
const |
- Returns
- data type of this data element
Definition at line 387 of file Data.cpp.
void Data::dataTypeChanged |
( |
int |
dataType | ) |
|
|
signal |
- Returns
- script engine
Definition at line 482 of file Data.cpp.
- Returns
- shared pointer to this data element
Definition at line 125 of file Data.cpp.
- Returns
- icon of data element
Definition at line 362 of file Data.cpp.
int Data::identifier |
( |
| ) |
const |
- Returns
- unique identifier of this data element
Definition at line 382 of file Data.cpp.
- Returns
- list of in-pointers of this data element
Definition at line 372 of file Data.cpp.
bool Data::isVisible |
( |
| ) |
const |
- Returns
- true if data element is visible, otherwise false
Definition at line 155 of file Data.cpp.
- Returns
- list of out-pointers of this data element
Definition at line 377 of file Data.cpp.
- Returns
- list of all pointers connected to this data element (in and out pointers)
Definition at line 218 of file Data.cpp.
- Returns
- all pointers that connect this data element with
to
Definition at line 308 of file Data.cpp.
void Data::pointerListChanged |
( |
| ) |
|
|
signal |
void Data::posChanged |
( |
const QPointF & |
p | ) |
|
|
signal |
void Data::propertyAdded |
( |
const QString & |
name | ) |
|
|
signal |
void Data::propertyChanged |
( |
const QString & |
name | ) |
|
|
signal |
void Data::propertyRemoved |
( |
const QString & |
name | ) |
|
|
signal |
Remove pointer from pointer list.
- Parameters
-
e | is pointer to be removed |
Definition at line 262 of file Data.cpp.
void Data::remove_property |
( |
const QString & |
name | ) |
|
|
slot |
void Data::removeDynamicProperty |
( |
const QString & |
property | ) |
|
|
slot |
Remove dynamic property with identifier property
from data element.
- Parameters
-
property | is identifier of the property |
Definition at line 444 of file Data.cpp.
void Data::renameDynamicProperty |
( |
const QString & |
oldName, |
|
|
const QString & |
newName |
|
) |
| |
|
slot |
- Returns
- script value representation of this data element
Definition at line 471 of file Data.cpp.
void Data::self_remove |
( |
| ) |
|
|
slot |
void Data::setColor |
( |
const QVariant & |
s | ) |
|
|
slot |
void Data::setDataType |
( |
int |
dataType | ) |
|
|
slot |
Set script engine.
The engine must be set to access the script value.
Reimplemented in GraphNode.
Definition at line 476 of file Data.cpp.
void Data::setPos |
( |
qreal |
x, |
|
|
qreal |
y |
|
) |
| |
|
slot |
void Data::setVisible |
( |
bool |
visible | ) |
|
|
slot |
void Data::setWidth |
( |
double |
w | ) |
|
|
slot |
void Data::updateDynamicProperty |
( |
const QString & |
property | ) |
|
|
slot |
void Data::updatePointerList |
( |
| ) |
|
|
slot |
FIXME proof of concept implementation: since each Pointer emits a changed direction signal, there are unnecessary many updates.
Update pointer e
in inPointerList and outPointerList, depending on how the direction changed This method is a condidate for optimizations, but it happens only seldom.
Definition at line 277 of file Data.cpp.
void Data::useColorChanged |
( |
bool |
b | ) |
|
|
signal |
void Data::visibilityChanged |
( |
bool |
visible | ) |
|
|
signal |
qreal Data::width |
( |
| ) |
const |
void Data::widthChanged |
( |
double |
w | ) |
|
|
signal |
- Returns
- x-position of data element
- Returns
- y-position of data element
The documentation for this class was generated from the following files:
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
KDE's Doxygen guidelines are available online.