rocs/RocsCore
#include <PointerType.h>
Public Types | |
enum | Direction { Unidirectional, Bidirectional } |
Public Slots | |
void | remove () |
void | setDefaultColor (const QColor &color) |
void | setDirection (PointerType::Direction direction) |
void | setLineStyle (Qt::PenStyle lineStyle) |
void | setName (const QString &name) |
void | setVisible (bool visible) |
Signals | |
void | directionChanged (PointerType::Direction direction) |
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 | styleChanged () |
void | visibilityChanged (bool visible) |
Public Member Functions | |
virtual | ~PointerType () |
void | addProperty (const QString &name, const QString &defaultValue="") |
QColor | defaultColor () const |
Direction | direction () const |
int | identifier () const |
bool | isPropertyVisible (const QString &name) const |
bool | isVisible () const |
Qt::PenStyle | lineStyle () 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) |
Static Public Member Functions | |
static PointerTypePtr | create (Document *document, int identifier) |
Protected Member Functions | |
PointerType (Document *document, int identifier) | |
Detailed Description
A pointer type groups a set of pointers and gives them a common appearance.
Each pointer type is associated to a document and must get an unique identifier on creation. To create a pointer type, use the static
- See also
- create(document, identifier) method.
Definition at line 41 of file PointerType.h.
Member Enumeration Documentation
Enumerator | |
---|---|
Unidirectional | |
Bidirectional |
Definition at line 46 of file PointerType.h.
Constructor & Destructor Documentation
|
virtual |
Default destructor.
DO NOT CALL IT, let the shared pointer take care for deletion.
Definition at line 77 of file PointerType.cpp.
|
protected |
Default constructor. To create PointerType elements use
- See also
- PointerType::create(...).
- Parameters
-
document is graph document for that the pointer type is created identifier is unique identifier of the pointer type within the document
Definition at line 71 of file PointerType.cpp.
Member Function Documentation
void PointerType::addProperty | ( | const QString & | name, |
const QString & | defaultValue = "" |
||
) |
Add a new dynamic property to all data elements of this pointer type.
- Parameters
-
name is the unique name of the property defaultValue is the default value that is set initially
Definition at line 140 of file PointerType.cpp.
|
static |
Create pointer type objects.
- Parameters
-
document is graph document for that the pointer type is created identifier is unique identifier of the pointer type within the document
- Returns
- the created pointer type
Definition at line 62 of file PointerType.cpp.
QColor PointerType::defaultColor | ( | ) | const |
- Returns
- default color for pointers of this type
Definition at line 134 of file PointerType.cpp.
PointerType::Direction PointerType::direction | ( | ) | const |
- Returns
- direction for pointers of this type
Definition at line 101 of file PointerType.cpp.
|
signal |
Emitted when direction was changed.
int PointerType::identifier | ( | ) | const |
- Returns
- unique identifier of pointer type
Definition at line 95 of file PointerType.cpp.
bool PointerType::isPropertyVisible | ( | const QString & | name | ) | const |
- Returns
- true if this property is visible, otherwise false.
Definition at line 196 of file PointerType.cpp.
bool PointerType::isVisible | ( | ) | const |
- Returns
- true if pointer type is visible, otherwise false.
Definition at line 213 of file PointerType.cpp.
Qt::PenStyle PointerType::lineStyle | ( | ) | const |
- Returns
- line style for pointers of this type
Definition at line 114 of file PointerType.cpp.
QString PointerType::name | ( | ) | const |
- Returns
- name of pointer type
Definition at line 89 of file PointerType.cpp.
|
signal |
Emitted when name was changed.
QStringList PointerType::properties | ( | ) | const |
- Returns
- list of all properties, ordered in display order
Definition at line 174 of file PointerType.cpp.
|
signal |
Emitted when new property was created.
QVariant PointerType::propertyDefaultValue | ( | const QString & | name | ) | const |
- Returns
- default value for property
name
Definition at line 179 of file PointerType.cpp.
|
signal |
Emitted when default value of property is changed.
|
signal |
Emitted when property was removed.
|
signal |
Emitted when a property was renamed.
|
signal |
Emitted when the visibility was changed.
|
slot |
Unregister pointer type from graph document.
Definition at line 224 of file PointerType.cpp.
|
signal |
Emitted when data type is removed.
void PointerType::removeProperty | ( | const QString & | name | ) |
Remove dynamic property from pointer type.
Definition at line 151 of file PointerType.cpp.
void PointerType::renameProperty | ( | const QString & | oldName, |
const QString & | newName | ||
) |
Rename property from oldName
to newName
.
The old property name at all pointers 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 158 of file PointerType.cpp.
|
slot |
Set default color value for this pointer type.
- Parameters
-
color is the default color to be set
Definition at line 127 of file PointerType.cpp.
|
slot |
Set direction for all pointers of this type.
- Parameters
-
direction is the new direction for the pointers
Definition at line 107 of file PointerType.cpp.
|
slot |
Set line style for all pointers of this type.
- Parameters
-
lineStyle is the new line style
Definition at line 120 of file PointerType.cpp.
|
slot |
Set name of the pointer type.
- Parameters
-
name of the pointer type
Definition at line 82 of file PointerType.cpp.
void PointerType::setPropertyDefaultValue | ( | const QString & | name, |
const QVariant & | value | ||
) |
Set default value of property name
to value
.
Definition at line 187 of file PointerType.cpp.
void PointerType::setPropertyVisible | ( | const QString & | name, |
bool | visible | ||
) |
Set default value of property name
to visible
.
Definition at line 204 of file PointerType.cpp.
|
slot |
Set visibility for all pointers of this type.
- Parameters
-
visibile is the new visibility value
Definition at line 218 of file PointerType.cpp.
|
signal |
Emitted when settings for the visual representation changed.
|
signal |
Emitted when the visibility was changed.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.