• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

rocs/RocsCore

Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Properties | List of all members
DataStructure Class Reference

#include <DataStructure.h>

Inheritance diagram for DataStructure:
Inheritance graph
[legend]

Public Slots

void add_property (const QString &name, const QVariant &value)
 
virtual DataList addDataList (DataList dataList)
 
virtual DataList addDataList (QList< QPair< QString, QPointF > > dataList, int dataType)
 
void addDynamicProperty (const QString &property, const QVariant &value=QVariant(0))
 
virtual GroupPtr addGroup (const QString &name)
 
virtual DataPtr createData (const QString &name, int dataType)
 
virtual DataPtr createData (const QString &name, const QPointF &point, int dataType)
 
virtual PointerPtr createPointer (DataPtr from, DataPtr to, int pointerType)
 
DataPtr getData (int uniqueIdentifier)
 
virtual void remove (DataPtr data)
 
virtual void remove (PointerPtr pointer)
 
virtual void remove (GroupPtr group)
 
void remove ()
 
void remove_property (const QString &name)
 
void removeDynamicProperty (const QString &property)
 
void renameDynamicProperty (const QString &oldName, const QString &newName)
 
void setName (const QString &s)
 

Signals

void changed ()
 
void dataCreated (DataPtr n)
 
void dataPositionChanged (const QPointF)
 
void nameChanged (const QString &name)
 
void pointerCreated (PointerPtr e)
 
void scriptError (const QString &message)
 

Public Member Functions

virtual void cleanUpBeforeConvert ()
 
const DataList dataList (int dataType) const
 
DataList dataListAll () const
 
Document * document () const
 
QScriptEngine * engine () const
 
virtual DataStructurePtr getDataStructure () const
 
const QList< GroupPtr > groups () const
 
bool isDataVisible (int dataType) const
 
bool isPointerVisible (int pointerType) const
 
QString name () const
 
virtual QMap< QString, QString > pluginProperties () const
 
PointerList pointerListAll () const
 
const PointerList pointers (int pointerType) const
 
bool readOnly () const
 
QScriptValue scriptValue () const
 
virtual void setEngine (QScriptEngine *engine)
 
virtual void setPluginProperty (const QString &, const QString &)
 
void setReadOnly (bool r)
 
void updateData (DataPtr data)
 
void updatePointer (PointerPtr pointer)
 

Static Public Member Functions

static DataStructurePtr create (Document *parent=0)
 
static DataStructurePtr create (DataStructurePtr other, Document *parent=0)
 

Protected Member Functions

 DataStructure (Document *parent=0)
 
virtual ~DataStructure ()
 
DataPtr addData (DataPtr data)
 
PointerPtr addPointer (PointerPtr pointer)
 
int generateUniqueIdentifier ()
 
virtual void importStructure (DataStructurePtr other)
 
void initialize ()
 

Static Protected Member Functions

template<typename T >
static DataStructurePtr create (Document *parent=0)
 
template<typename T >
static DataStructurePtr create (DataStructurePtr other, Document *parent=0)
 

Properties

QString name
 

Detailed Description

Definition at line 43 of file DataStructure.h.

Constructor & Destructor Documentation

DataStructure::DataStructure ( Document *  parent = 0)
protected

Default constructor.

Parameters
parentthe parent document of the data structure

Definition at line 109 of file DataStructure.cpp.

DataStructure::~DataStructure ( )
protectedvirtual

Default destructor.

Definition at line 144 of file DataStructure.cpp.

Member Function Documentation

void DataStructure::add_property ( const QString &  name,
const QVariant &  value 
)
slot

add the property named name to this Data structure.

Parameters
nameis an identifier to property.
valueis the initial value of property.

Definition at line 505 of file DataStructure.cpp.

DataPtr DataStructure::addData ( DataPtr  data)
protected

Definition at line 311 of file DataStructure.cpp.

DataList DataStructure::addDataList ( DataList  dataList)
virtualslot
Deprecated:
This method only calls addData for each element

Definition at line 348 of file DataStructure.cpp.

DataList DataStructure::addDataList ( QList< QPair< QString, QPointF > >  dataList,
int  dataType 
)
virtualslot

Definition at line 358 of file DataStructure.cpp.

void DataStructure::addDynamicProperty ( const QString &  property,
const QVariant &  value = QVariant(0) 
)
slot

Definition at line 481 of file DataStructure.cpp.

GroupPtr DataStructure::addGroup ( const QString &  name)
virtualslot

Definition at line 468 of file DataStructure.cpp.

PointerPtr DataStructure::addPointer ( PointerPtr  pointer)
protected

Definition at line 372 of file DataStructure.cpp.

void DataStructure::changed ( )
signal
void DataStructure::cleanUpBeforeConvert ( )
virtual

clear data that only is useful for a type of data structure and that cannot be converted to others

Definition at line 580 of file DataStructure.cpp.

DataStructurePtr DataStructure::create ( Document *  parent = 0)
static

Definition at line 68 of file DataStructure.cpp.

DataStructurePtr DataStructure::create ( DataStructurePtr  other,
Document *  parent = 0 
)
static

Definition at line 73 of file DataStructure.cpp.

template<typename T >
static DataStructurePtr DataStructure::create ( Document *  parent = 0)
inlinestaticprotected

Definition at line 282 of file DataStructure.h.

template<typename T >
static DataStructurePtr DataStructure::create ( DataStructurePtr  other,
Document *  parent = 0 
)
inlinestaticprotected

Definition at line 288 of file DataStructure.h.

DataPtr DataStructure::createData ( const QString &  name,
int  dataType 
)
virtualslot

Reimplemented in Rocs::GraphStructure, Rocs::ListStructure, and RootedTreeStructure.

Definition at line 300 of file DataStructure.cpp.

DataPtr DataStructure::createData ( const QString &  name,
const QPointF &  point,
int  dataType 
)
virtualslot

Definition at line 339 of file DataStructure.cpp.

PointerPtr DataStructure::createPointer ( DataPtr  from,
DataPtr  to,
int  pointerType 
)
virtualslot

Creates new pointer from data element "from" to data element "to" of given type "pointerType".

The pointer type must exist.

Parameters
fromdata element where the pointer starts
todata element where the pointer ends
pointerTypeis the type of this pointer

Reimplemented in Rocs::GraphStructure, Rocs::ListStructure, and RootedTreeStructure.

Definition at line 393 of file DataStructure.cpp.

void DataStructure::dataCreated ( DataPtr  n)
signal
const DataList DataStructure::dataList ( int  dataType) const

Gives list of data elements of specified type if type exists.

If dataType does not exists, returns empty list.

Parameters
dataTypeis type of data elements to be returned
Returns
DataList of data elements of specified type

Definition at line 149 of file DataStructure.cpp.

DataList DataStructure::dataListAll ( ) const

Gives list of all data elements of all existing types.

Returns
DataList of data elements

Definition at line 159 of file DataStructure.cpp.

void DataStructure::dataPositionChanged ( const QPointF  )
signal
Document * DataStructure::document ( ) const

Definition at line 570 of file DataStructure.cpp.

QScriptEngine * DataStructure::engine ( ) const

Definition at line 565 of file DataStructure.cpp.

int DataStructure::generateUniqueIdentifier ( )
protected

Definition at line 295 of file DataStructure.cpp.

DataPtr DataStructure::getData ( int  uniqueIdentifier)
slot

Access data element by its unique identifier.

Operation has amortized access time of O(1) (worst case O(n)).

Parameters
uniqueIdentifierthe unique identifier of the data element

Definition at line 411 of file DataStructure.cpp.

DataStructurePtr DataStructure::getDataStructure ( ) const
virtual

Definition at line 103 of file DataStructure.cpp.

const QList< GroupPtr > DataStructure::groups ( ) const

Definition at line 575 of file DataStructure.cpp.

void DataStructure::importStructure ( DataStructurePtr  other)
protectedvirtual

overwrites the current DataStructure with all values (Data and Pointer) from the given datastructure object.

Parameters
otherthe data structure that shall be imported
Returns
void

Reimplemented in Rocs::GraphStructure, RootedTreeStructure, and Rocs::ListStructure.

Definition at line 116 of file DataStructure.cpp.

void DataStructure::initialize ( )
protected

Definition at line 83 of file DataStructure.cpp.

bool DataStructure::isDataVisible ( int  dataType) const

Returns true if data elements of specified data type are visible, otherwise false.

Parameters
dataTypefor that visibility information are returned
bool DataStructure::isPointerVisible ( int  pointerType) const

Returns true if pointers of specified pointer type are visible, otherwise false.

Parameters
pointerTypefor that visibility information are returned
QString DataStructure::name ( ) const
void DataStructure::nameChanged ( const QString &  name)
signal
QMap< QString, QString > DataStructure::pluginProperties ( ) const
virtual

Gives a map with plugin specific properties of the data structure.

Returns
map keys are property names, values are property values.

Reimplemented in Rocs::GraphStructure.

Definition at line 546 of file DataStructure.cpp.

void DataStructure::pointerCreated ( PointerPtr  e)
signal
PointerList DataStructure::pointerListAll ( ) const

Gives list all pointers of all existing types.

Returns
PointerList of pointers

Definition at line 179 of file DataStructure.cpp.

const PointerList DataStructure::pointers ( int  pointerType) const

Gives list of pointers of specified type if type exists.

If pointerType does not exists, returns empty list.

Parameters
pointerTypeis type of pointers to be returned
Returns
PointerList of pointers of specified type

Definition at line 169 of file DataStructure.cpp.

bool DataStructure::readOnly ( ) const

Definition at line 551 of file DataStructure.cpp.

void DataStructure::remove ( DataPtr  data)
virtualslot

Remove data from data structure and (if necessary) destroys the data object.

It is valid to call this method more than once for the same data object.

Parameters
datathe data element that shall be removed

Reimplemented in Rocs::ListStructure.

Definition at line 428 of file DataStructure.cpp.

void DataStructure::remove ( PointerPtr  pointer)
virtualslot

Remove pointer from data structure and (if necessary) destroys the pointer object.

It is valid to call this method more than once for the same pointer object.

Parameters
pointerthe pointer that shall be removed

Reimplemented in Rocs::ListStructure.

Definition at line 447 of file DataStructure.cpp.

void DataStructure::remove ( GroupPtr  group)
virtualslot

Remove group from data structure and (if necessary) destroys the group object.

It is valid to call this method more than once for the same group object.

Parameters
groupthe group that shall be removed

Definition at line 461 of file DataStructure.cpp.

void DataStructure::remove ( )
slot

if this datastructure shall be deleted, call ONLY this function

Definition at line 271 of file DataStructure.cpp.

void DataStructure::remove_property ( const QString &  name)
slot

remove the string named name from this data structure.

Parameters
nameis the name of property to be removed.

Definition at line 510 of file DataStructure.cpp.

void DataStructure::removeDynamicProperty ( const QString &  property)
slot

Definition at line 490 of file DataStructure.cpp.

void DataStructure::renameDynamicProperty ( const QString &  oldName,
const QString &  newName 
)
slot

Definition at line 495 of file DataStructure.cpp.

void DataStructure::scriptError ( const QString &  message)
signal
QScriptValue DataStructure::scriptValue ( ) const

Definition at line 561 of file DataStructure.cpp.

void DataStructure::setEngine ( QScriptEngine *  engine)
virtual

Reimplemented in RootedTreeStructure.

Definition at line 515 of file DataStructure.cpp.

void DataStructure::setName ( const QString &  s)
slot

Definition at line 475 of file DataStructure.cpp.

void DataStructure::setPluginProperty ( const QString &  ,
const QString &   
)
virtual

Set plugin specific properties of data structure.

Parameters
identifieris the unique identifier for this property
valueis the to be set value for the property

Reimplemented in Rocs::GraphStructure.

Definition at line 585 of file DataStructure.cpp.

void DataStructure::setReadOnly ( bool  r)

Definition at line 265 of file DataStructure.cpp.

void DataStructure::updateData ( DataPtr  data)

Updates registration of data in internal reference list.

Parameters
datathat is set with new type

Definition at line 247 of file DataStructure.cpp.

void DataStructure::updatePointer ( PointerPtr  pointer)

Updates registration of pointer in internal reference list.

Parameters
pointerthat is set with new type

Definition at line 256 of file DataStructure.cpp.

Property Documentation

QString DataStructure::name
readwrite

Definition at line 46 of file DataStructure.h.


The documentation for this class was generated from the following files:
  • DataStructure.h
  • DataStructure.cpp
This file is part of the KDE documentation.
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.

rocs/RocsCore

Skip menu "rocs/RocsCore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal