rocs/RocsCore
#include <DataType.h>
Public Slots | |
void | remove () |
void | setDefaultColor (const QColor &color) |
void | setIcon (const QString &icon) |
void | setName (const QString &name) |
void | setVisible (bool visible) |
Signals | |
void | defaultColorChanged (const QColor &color) |
void | iconChanged (const QString &icon) |
void | nameChanged (const QString &name) |
void | propertyAdded (const QString &name, const QVariant &defaultValue) |
void | propertyDefaultValueChanged (const QString &name) |
void | propertyRemoved (const QString &name) |
void | propertyRenamed (const QString &oldName, const QString &newName) |
void | propertyVisibilityChanged (const QString &name) |
void | removed () |
void | visibilityChanged (bool visible) |
Public Member Functions | |
virtual | ~DataType () |
void | addProperty (const QString &name, const QString &defaultValue=QString()) |
QColor | defaultColor () const |
KIcon | icon () const |
QString | iconName () const |
int | identifier () const |
bool | isPropertyVisible (const QString &name) const |
bool | isVisible () const |
QString | name () const |
QStringList | properties () const |
QVariant | propertyDefaultValue (const QString &name) const |
void | removeProperty (const QString &name) |
void | renameProperty (const QString &oldName, const QString &newName) |
void | setPropertyDefaultValue (const QString &name, const QVariant &value) |
void | setPropertyVisible (const QString &name, bool visible) |
Public Member Functions inherited from QObject | |
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) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
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 Public Member Functions | |
static DataTypePtr | create (Document *document, int identifier) |
Static Public Member Functions inherited from QObject | |
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) |
Protected Member Functions | |
DataType (Document *document, int identifier) | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
A data type groups a set of data elements and gives them a common appearance.
Each data type is associated to a document and must get an unique identifier on creation. To create a data type, use the static
- See also
- create(document, identifier) method.
Definition at line 43 of file DataType.h.
Constructor & Destructor Documentation
|
virtual |
Default destructor.
DO NOT CALL IT, let the shared pointer take care for deletion.
Definition at line 80 of file DataType.cpp.
|
protected |
Default constructor. To create DataType elements use
- See also
- DataType::create(...).
- Parameters
-
document is graph document for that the data type is created identifier is unique identifier of the data type within the document
Definition at line 72 of file DataType.cpp.
Member Function Documentation
Add a new dynamic property to all data elements of this data type.
- Parameters
-
name is the unique name of the property defaultValue is the default value that is set initially
Definition at line 173 of file DataType.cpp.
|
static |
Create data type objects.
- Parameters
-
document is graph document for that the data type is created identifier is unique identifier of the data type within the document
- Returns
- the created data type
Definition at line 63 of file DataType.cpp.
QColor DataType::defaultColor | ( | ) | const |
- Returns
- default color for data elements of this data type
Definition at line 168 of file DataType.cpp.
|
signal |
Emitted when default color was changed.
KIcon DataType::icon | ( | ) | const |
Generates KIcon for data type at run time.
This icon is not cached.
- Returns
- icon according to current iconPackage and iconName
Definition at line 111 of file DataType.cpp.
|
signal |
Emitted when icon was changed.
QString DataType::iconName | ( | ) | const |
- Returns
- data type icon identifier for iconPackage
Definition at line 143 of file DataType.cpp.
int DataType::identifier | ( | ) | const |
- Returns
- unique identifier of data type
Definition at line 85 of file DataType.cpp.
bool DataType::isPropertyVisible | ( | const QString & | name | ) | const |
- Returns
- true if this property is visible, otherwise false.
Definition at line 231 of file DataType.cpp.
bool DataType::isVisible | ( | ) | const |
- Returns
- true if data type is visible, otherwise false.
Definition at line 156 of file DataType.cpp.
QString DataType::name | ( | ) | const |
- Returns
- name of data type
Definition at line 98 of file DataType.cpp.
|
signal |
Emitted when name was changed.
QStringList DataType::properties | ( | ) | const |
- Returns
- list of all properties, ordered in display order
Definition at line 207 of file DataType.cpp.
Emitted when new property was created.
- Returns
- default value for property
name
Definition at line 212 of file DataType.cpp.
|
signal |
Emitted when default value of property is changed.
|
signal |
Emitted when property was removed.
Emitted when a property was renamed.
|
signal |
Emitted when the visibility was changed.
|
slot |
Unregister data type from graph document.
Definition at line 248 of file DataType.cpp.
|
signal |
Emitted when data type is removed.
void DataType::removeProperty | ( | const QString & | name | ) |
Remove dynamic property from data type.
Definition at line 184 of file DataType.cpp.
Rename property from oldName
to newName
.
The old property name at all data elements is changed with this change. The property is not changed, if newName
already exists at this data type.
- Parameters
-
oldName is the current property name newName is the new property name
Definition at line 191 of file DataType.cpp.
|
slot |
Set default color value for this data type.
- Parameters
-
color is the default color to be set
Definition at line 162 of file DataType.cpp.
|
slot |
Set icon of data elements of this type.
"rocs_" prefix of icon identifier must be removed before setting this.
- Parameters
-
icon identifier in current icon package
Definition at line 104 of file DataType.cpp.
|
slot |
Set name of the data type.
- Parameters
-
name of the data type
Definition at line 91 of file DataType.cpp.
Set default value of property name
to value
.
Definition at line 221 of file DataType.cpp.
void DataType::setPropertyVisible | ( | const QString & | name, |
bool | visible | ||
) |
Set default value of property name
to visible
.
Definition at line 239 of file DataType.cpp.
|
slot |
Set visibility for all data elements of this type.
- Parameters
-
visible is the visibility value to be set
Definition at line 149 of file DataType.cpp.
|
signal |
Emitted when the visibility was changed.
The documentation for this class was generated from the following files:
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.