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

rocs/RocsCore

  • sources
  • kde-4.12
  • kdeedu
  • rocs
  • RocsCore
DataStructure.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2004-2011 Tomaz Canabrava <tomaz.canabrava@gmail.com>
4  Copyright 2010-2011 Wagner Reck <wagner.reck@gmail.com>
5  Copyright 2011-2012 Andreas Cord-Landwehr <cola@uni-paderborn.de>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #include "DataStructure.h"
22 #include "Data.h"
23 #include "Pointer.h"
24 #include "DataType.h"
25 #include "PointerType.h"
26 #include "QtScriptBackend.h"
27 #include "Group.h"
28 #include "Document.h"
29 #include "DocumentManager.h"
30 #include "ConcurrentHelpClasses.h"
31 
32 #include <boost/weak_ptr.hpp>
33 
34 #include <QColor>
35 #include <KDebug>
36 
37 class DataStructurePrivate
38 {
39 public:
40  DataStructurePrivate()
41  : _engine(0)
42  {
43  }
44 
48  boost::weak_ptr<DataStructure> q;
49 
50  int _identifierCount; // represents the next identifier that will be assigend to data/pointer
51 
52  QMap<int, DataList> _dataTypeLists; // list if data elements associated to specific type
53  QMap<int, PointerList> _pointerTypeLists; // list of pointers associated to specific type
54  QHash<int, DataPtr> _dataIdentifierMap;
55 
56  QList<GroupPtr> _groups;
57 
58  QPointF _relativeCenter;
59  QString _name;
60  Document *_document;
61  bool _readOnly;
62 
63  QScriptValue _value;
64  QScriptEngine *_engine;
65 };
66 
67 
68 DataStructurePtr DataStructure::create(Document *parent)
69 {
70  return create<DataStructure>(parent);
71 }
72 
73 DataStructurePtr DataStructure::create(DataStructurePtr other, Document *parent)
74 {
75  return create<DataStructure>(other, parent);
76 }
77 
78 void DataStructure::setQpointer(DataStructurePtr q)
79 {
80  d->q = q;
81 }
82 
83 void DataStructure::initialize()
84 {
85  d->_readOnly = false;
86  d->_identifierCount = 1;
87 
88  // create type lists
89  foreach (int identifier, d->_document->dataTypeList()) {
90  registerDataType(identifier);
91  }
92  foreach (int identifier, d->_document->pointerTypeList()) {
93  registerPointerType(identifier);
94  }
95  connect(document(), SIGNAL(dataTypeCreated(int)), this, SLOT(registerDataType(int)));
96  connect(document(), SIGNAL(pointerTypeCreated(int)), this, SLOT(registerPointerType(int)));
97  connect(document(), SIGNAL(dataTypeRemoved(int)), this, SLOT(removeDataType(int)));
98  connect(document(), SIGNAL(pointerTypeRemoved(int)), this, SLOT(removePointerType(int)));
99 
100  emit changed();
101 }
102 
103 DataStructurePtr DataStructure::getDataStructure() const
104 {
105  DataStructurePtr px(d->q);
106  return px;
107 }
108 
109 DataStructure::DataStructure(Document *parent)
110  : d(new DataStructurePrivate)
111 {
112  d->_document = parent;
113  // further initialization is done by separate call to initialize()
114 }
115 
116 void DataStructure::importStructure(DataStructurePtr other)
117 {
118  d->_readOnly = other->readOnly();
119  // FIXME set dynamic properties
120 
121  QHash <Data*, DataPtr> dataTodata;
122  //FIXME only reading default of elements
123  foreach(DataPtr n, other->dataList(0)) {
124  DataPtr newdata = createData(n->property("name").toString(), 0);
125  newdata->setColor(n->color());
126  //FIXME all dynamic properties must be set
127  newdata->setX(n->x());
128  newdata->setY(n->y());
129  newdata->setWidth(n->width());
130  dataTodata.insert(n.get(), newdata);
131  }
132  //FIXME only import of default elements
133  foreach(PointerPtr e, other->pointers(0)) {
134  DataPtr from = dataTodata.value(e->from().get());
135  DataPtr to = dataTodata.value(e->to().get());
136 
137  PointerPtr newPointer = createPointer(from, to, 0);
138  newPointer->setColor(e->color());
139  //FIXME all dynamic properties must be set
140  }
141 }
142 
143 
144 DataStructure::~DataStructure()
145 {
146 }
147 
148 
149 const DataList DataStructure::dataList(int dataType) const
150 {
151  if (d->_dataTypeLists.contains(dataType)) {
152  return d->_dataTypeLists[dataType];
153  }
154  kWarning() << "returning empty data list: data type not registered";
155  return DataList();
156 }
157 
158 
159 DataList DataStructure::dataListAll() const
160 {
161  DataList allData;
162  foreach(int type, document()->dataTypeList()) {
163  allData.append(dataList(type));
164  }
165  return allData;
166 }
167 
168 
169 const PointerList DataStructure::pointers(int pointerType) const
170 {
171  if (d->_pointerTypeLists.contains(pointerType)) {
172  return d->_pointerTypeLists[pointerType];
173  }
174  kWarning() << "returning empty pointer list: pointer type not registered";
175  return PointerList();
176 }
177 
178 
179 PointerList DataStructure::pointerListAll() const
180 {
181  PointerList allPointers;
182  foreach(int type, document()->pointerTypeList()) {
183  allPointers.append(pointers(type));
184  }
185  return allPointers;
186 }
187 
188 
189 void DataStructure::registerDataType(int identifier)
190 {
191  if (d->_dataTypeLists.contains(identifier)) {
192  kWarning() << "DataType already registered: aborting";
193  return;
194  }
195  if (!d->_document->dataType(identifier)) {
196  kError() << "DataType not registered at document: aborting";
197  return;
198  }
199  d->_dataTypeLists.insert(identifier, DataList());
200 }
201 
202 
203 void DataStructure::registerPointerType(int identifier)
204 {
205  if (d->_pointerTypeLists.contains(identifier)) {
206  kWarning() << "PointerType already registered: aborting";
207  return;
208  }
209  if (!d->_document->pointerType(identifier)) {
210  kError() << "PointerType not registered at document: aborting";
211  return;
212  }
213  d->_pointerTypeLists.insert(identifier, PointerList());
214 }
215 
216 
217 void DataStructure::removeDataType(int identifier)
218 {
219  if (identifier == 0) {
220  kWarning() << "Could not remove non-existing DataType";
221  return;
222  }
223 
224  foreach(DataPtr data, d->_dataTypeLists[identifier]) {
225  data->remove();
226  }
227  d->_dataTypeLists[identifier].clear();
228  d->_dataTypeLists.remove(identifier);
229 }
230 
231 
232 void DataStructure::removePointerType(int pointerType)
233 {
234  if (pointerType == 0 || !d->_pointerTypeLists.contains(pointerType)) {
235  kWarning() << "Could not remove non-existing PointerType";
236  return;
237  }
238 
239  foreach(PointerPtr pointer, d->_pointerTypeLists[pointerType]) {
240  pointer->remove();
241  }
242  d->_pointerTypeLists[pointerType].clear();
243  d->_pointerTypeLists.remove(pointerType);
244 }
245 
246 
247 void DataStructure::updateData(DataPtr data)
248 {
249  foreach(int dataType, d->_document->dataTypeList()) {
250  d->_dataTypeLists[dataType].removeAll(data);
251  }
252  d->_dataTypeLists[data->dataType()].append(data);
253 }
254 
255 
256 void DataStructure::updatePointer(PointerPtr pointer)
257 {
258  foreach(int pointerType, d->_document->pointerTypeList()) {
259  d->_pointerTypeLists[pointerType].removeAll(pointer);
260  }
261  d->_pointerTypeLists[pointer->pointerType()].append(pointer);
262 }
263 
264 
265 void DataStructure::setReadOnly(bool r)
266 {
267  d->_readOnly = r;
268  d->_document->setModified();
269 }
270 
271 void DataStructure::remove()
272 {
273  disconnect();
274  //remove pointers
275  foreach(const PointerList &pointerType, d->_pointerTypeLists) {
276  foreach(const PointerPtr &pointer, pointerType) {
277  pointer->remove();
278  }
279  }
280  d->_pointerTypeLists.clear();
281 
282 
283  //remove data elements
284  foreach(const DataList &dataType, d->_dataTypeLists) {
285  foreach(const DataPtr &data, dataType) {
286  data->remove();
287  }
288  }
289  d->_dataTypeLists.clear();
290  d->_dataIdentifierMap.clear();
291 
292  d->_document->remove(getDataStructure());
293 }
294 
295 int DataStructure::generateUniqueIdentifier()
296 {
297  return d->_identifierCount++;
298 }
299 
300 DataPtr DataStructure::createData(const QString& name, int dataType)
301 {
302  if (d->_readOnly) {
303  return DataPtr();
304  }
305  DataPtr n = Data::create(this->getDataStructure(), generateUniqueIdentifier(), dataType);
306  n->setProperty("name", name);
307 
308  return addData(n);
309 }
310 
311 DataPtr DataStructure::addData(DataPtr data)
312 {
313  Q_ASSERT(data->dataType() >= 0 && data->dataType() <= d->_dataTypeLists.size());
314 
315  // set data type properties
316  d->_dataTypeLists[data->dataType()].append(data);
317  DataTypePtr type = document()->dataType(data->dataType());
318  foreach(const QString &property, type->properties()) {
319  if (!data->property(property.toLatin1()).isValid()
320  || data->property(property.toLatin1()).isNull())
321  {
322  data->addDynamicProperty(property, type->propertyDefaultValue(property));
323  }
324  }
325 
326  // register data at fast access identifier hash
327  d->_dataIdentifierMap.insert(data->identifier(), data);
328 
329  emit dataCreated(data);
330  emit changed();
331 
332  connect(data.get(), SIGNAL(propertyChanged(QString)), this, SIGNAL(changed()));
333  connect(data.get(), SIGNAL(colorChanged(QColor)), this, SIGNAL(changed()));
334  connect(data.get(), SIGNAL(posChanged(QPointF)), this, SIGNAL(dataPositionChanged(QPointF)));
335  connect(data.get(), SIGNAL(useColorChanged(bool)), this, SIGNAL(changed()));
336  return data;
337 }
338 
339 DataPtr DataStructure::createData(const QString& name, const QPointF& pos, int dataType)
340 {
341  if (DataPtr data = createData(name, dataType)) {
342  data->setPos(pos.x(), pos.y());
343  return data;
344  }
345  return DataPtr();
346 }
347 
348 DataList DataStructure::addDataList(DataList dataList)
349 {
350  foreach(DataPtr n, dataList) {
351  addData(n);
352  }
353 
354  return dataList;
355 }
356 
357 
358 DataList DataStructure::addDataList(QList< QPair<QString, QPointF> > dataList, int dataType)
359 {
360  QList< DataPtr > dataCreateList;
361  QList< QPair<QString, QPointF> >::const_iterator dataDefinition = dataList.constBegin();
362  while (dataDefinition != dataList.constEnd()) {
363  if (DataPtr data = createData(dataDefinition->first, dataType)) {
364  data->setPos(dataDefinition->second.x(), dataDefinition->second.y());
365  dataCreateList << data;
366  }
367  ++dataDefinition;
368  }
369  return dataCreateList;
370 }
371 
372 PointerPtr DataStructure::addPointer(PointerPtr pointer)
373 {
374  Q_ASSERT(d->_pointerTypeLists.contains(pointer->pointerType()));
375 
376  // set pointer type properties
377  d->_pointerTypeLists[pointer->pointerType()].append(pointer);
378  PointerTypePtr type = document()->pointerType(pointer->pointerType());
379  foreach(const QString &property, type->properties()) {
380  if (!pointer->property(property.toLatin1()).isValid()
381  || pointer->property(property.toLatin1()).isNull())
382  {
383  pointer->addDynamicProperty(property, type->propertyDefaultValue(property));
384  }
385  }
386 
387  emit pointerCreated(pointer);
388  emit changed();
389  connect(pointer.get(), SIGNAL(changed()), this, SIGNAL(changed()));
390  return pointer;
391 }
392 
393 PointerPtr DataStructure::createPointer(DataPtr from, DataPtr to, int pointerType)
394 {
395  Q_ASSERT(d->_document->pointerTypeList().contains(pointerType));
396 
397  if (d->_readOnly) { // If the data structure is in read only mode, no new stuff should be added.
398  return PointerPtr();
399  }
400  if (!from || !to) { // If one of the two required data elements is 0, then do not add a pointer.
401  return PointerPtr();
402  }
403 
404  if (from->dataStructure() != to->dataStructure()) { // the user is trying to connect data elements from different graphs.
405  return PointerPtr();
406  }
407  PointerPtr pointer = Pointer::create(getDataStructure(), from, to, pointerType);
408  return addPointer(pointer);
409 }
410 
411 DataPtr DataStructure::getData(int uniqueIdentifier)
412 {
413  if (d->_dataIdentifierMap.contains(uniqueIdentifier)) {
414  return d->_dataIdentifierMap[uniqueIdentifier];
415  }
416 
417  foreach(const DataList &dataType, d->_dataTypeLists) {
418  foreach(DataPtr data, dataType) {
419  if (data->identifier() == uniqueIdentifier) {
420  kWarning() << "Access do data element that is not registered at data-identifier mapper.";
421  return data;
422  }
423  }
424  }
425  return DataPtr();
426 }
427 
428 void DataStructure::remove(DataPtr data)
429 {
430  if (!d->_dataTypeLists[data->dataType()].contains(data)) {
431  kWarning() << "Data element not registered, aborting removal.";
432  return;
433  }
434 
435  // remove from internal lists
436  if (d->_dataIdentifierMap.remove(data->identifier()) != 1) {
437  kWarning() << "Data identifier hash is dirty.";
438  }
439  if (d->_dataTypeLists[data->dataType()].removeOne(data)) {
440  // only remove data element if it is registered
441  emit dataPositionChanged(QPointF(data->x(), data->y()));
442  data->remove();
443  }
444  emit changed();
445 }
446 
447 void DataStructure::remove(PointerPtr pointer)
448 {
449  if (!d->_pointerTypeLists[pointer->pointerType()].contains(pointer)) {
450  kWarning() << "Pointer not registered, aborting removal.";
451  return;
452  }
453  // remove from internal list
454  if (d->_pointerTypeLists[pointer->pointerType()].removeOne(pointer)) {
455  // only remove pointer if it is registered
456  pointer->remove();
457  }
458  emit changed();
459 }
460 
461 void DataStructure::remove(GroupPtr group)
462 {
463  if (d->_groups.removeOne(group)) {
464  group->remove();
465  }
466 }
467 
468 GroupPtr DataStructure::addGroup(const QString& name)
469 {
470  GroupPtr group = Group::create(getDataStructure(), generateUniqueIdentifier(), document()->groupType());
471  group->setName(name);
472  return group;
473 }
474 
475 void DataStructure::setName(const QString& s)
476 {
477  d->_name = s;
478  emit nameChanged(d->_name);
479 }
480 
481 void DataStructure::addDynamicProperty(const QString& property, const QVariant& value)
482 {
483  if (!Document::isValidIdentifier(property)) {
484  kWarning() << "Property identifier \"" << property << "\" is not valid: aborting";
485  return;
486  }
487  setProperty(property.toAscii(), value);
488 }
489 
490 void DataStructure::removeDynamicProperty(const QString& property)
491 {
492  setProperty(property.toAscii(), QVariant::Invalid);
493 }
494 
495 void DataStructure::renameDynamicProperty(const QString& oldName, const QString& newName)
496 {
497  if (!Document::isValidIdentifier(newName)) {
498  kWarning() << "Property identifier \"" << newName << "\" is not valid: aborting";
499  return;
500  }
501  setProperty(newName.toLatin1(), property(oldName.toLatin1()));
502  setProperty(oldName.toLatin1(), QVariant::Invalid);
503 }
504 
505 void DataStructure::add_property(const QString& name, const QVariant& value)
506 {
507  addDynamicProperty(name, value);
508 }
509 
510 void DataStructure::remove_property (const QString& name)
511 {
512  removeDynamicProperty(name);
513 }
514 
515 void DataStructure::setEngine(QScriptEngine *engine)
516 {
517  d-> _engine = engine;
518  d->_value = d->_engine->newQObject(this);
519 
520  if (! d->_name.isEmpty()) {
521  d->_engine->globalObject().setProperty(d->_name, d->_value);
522  }
523 
524  foreach(const DataList& dataType, d->_dataTypeLists) {
525  for (int i = 0; i < dataType.size(); ++i) {
526  dataType.at(i)->setEngine(engine);
527  }
528  }
529 
530  foreach(const PointerList& pointerType, d->_pointerTypeLists) {
531  for (int i = 0; i < pointerType.size(); ++i) {
532  pointerType.at(i)->setEngine(engine);
533  }
534  }
535 
536  //FIXME groups are not available in engine
537 // foreach(Group * g, d->_groups) {
538 // QScriptValue array = d->_engine->newArray();
539 // // foreach(Data * n, (*g) ) {
540 // // array.property("push").call(array, QScriptValueList() << n->scriptValue());
541 // // }
542 // d->_engine->globalObject().setProperty(g->name(), array);
543 // }
544 }
545 
546 QMap<QString, QString> DataStructure::pluginProperties() const
547 {
548  return QMap<QString,QString>();
549 }
550 
551 bool DataStructure::readOnly() const
552 {
553  return d->_readOnly;
554 }
555 
556 QString DataStructure::name() const
557 {
558  return d->_name;
559 }
560 
561 QScriptValue DataStructure::scriptValue() const
562 {
563  return d->_value;
564 }
565 QScriptEngine *DataStructure::engine() const
566 {
567  return d->_engine;
568 }
569 
570 Document *DataStructure::document() const
571 {
572  return d->_document;
573 }
574 
575 const QList<GroupPtr> DataStructure::groups() const
576 {
577  return d->_groups;
578 }
579 
580 void DataStructure::cleanUpBeforeConvert()
581 {
582 
583 }
584 
585 void DataStructure::setPluginProperty(const QString&, const QString&)
586 {
587 
588 }
DataStructure::setPluginProperty
virtual void setPluginProperty(const QString &, const QString &)
Set plugin specific properties of data structure.
Definition: DataStructure.cpp:585
DataStructure::engine
QScriptEngine * engine() const
Definition: DataStructure.cpp:565
DataType.h
DataStructure::pointerCreated
void pointerCreated(PointerPtr e)
DataStructure::updatePointer
void updatePointer(PointerPtr pointer)
Updates registration of pointer in internal reference list.
Definition: DataStructure.cpp:256
DataStructure::dataCreated
void dataCreated(DataPtr n)
ConcurrentHelpClasses.h
DocumentManager.h
DataStructure::pointerListAll
PointerList pointerListAll() const
Gives list all pointers of all existing types.
Definition: DataStructure.cpp:179
PointerTypePtr
boost::shared_ptr< PointerType > PointerTypePtr
Definition: CoreTypes.h:37
DataStructurePtr
boost::shared_ptr< DataStructure > DataStructurePtr
Definition: CoreTypes.h:38
DataStructure::pointers
const PointerList pointers(int pointerType) const
Gives list of pointers of specified type if type exists.
Definition: DataStructure.cpp:169
Group.h
DataStructure::DataStructure
DataStructure(Document *parent=0)
Default constructor.
Definition: DataStructure.cpp:109
DataStructure::dataList
const DataList dataList(int dataType) const
Gives list of data elements of specified type if type exists.
Definition: DataStructure.cpp:149
DataStructure::getDataStructure
virtual DataStructurePtr getDataStructure() const
Definition: DataStructure.cpp:103
DataStructure::importStructure
virtual void importStructure(DataStructurePtr other)
overwrites the current DataStructure with all values (Data and Pointer) from the given datastructure ...
Definition: DataStructure.cpp:116
DataStructure::create
static DataStructurePtr create(Document *parent=0)
Definition: DataStructure.cpp:68
DataStructure::renameDynamicProperty
void renameDynamicProperty(const QString &oldName, const QString &newName)
Definition: DataStructure.cpp:495
DataList
QList< boost::shared_ptr< Data > > DataList
Definition: CoreTypes.h:30
DataStructure::groups
const QList< GroupPtr > groups() const
Definition: DataStructure.cpp:575
DataStructure::addPointer
PointerPtr addPointer(PointerPtr pointer)
Definition: DataStructure.cpp:372
DataStructure::changed
void changed()
QtScriptBackend.h
Group::create
static GroupPtr create(DataStructurePtr dataStructure, int uniqueIdentifier, int groupType)
Definition: Group.cpp:40
Data.h
DataStructure::dataListAll
DataList dataListAll() const
Gives list of all data elements of all existing types.
Definition: DataStructure.cpp:159
Document.h
DataStructure::dataPositionChanged
void dataPositionChanged(const QPointF)
DataStructure::remove_property
void remove_property(const QString &name)
remove the string named name from this data structure.
Definition: DataStructure.cpp:510
DataStructure::~DataStructure
virtual ~DataStructure()
Default destructor.
Definition: DataStructure.cpp:144
PointerPtr
boost::shared_ptr< Pointer > PointerPtr
Definition: CoreTypes.h:35
DataStructure::addData
DataPtr addData(DataPtr data)
Definition: DataStructure.cpp:311
DataStructure::pluginProperties
virtual QMap< QString, QString > pluginProperties() const
Gives a map with plugin specific properties of the data structure.
Definition: DataStructure.cpp:546
DataStructure::setEngine
virtual void setEngine(QScriptEngine *engine)
Definition: DataStructure.cpp:515
DataStructure.h
DataStructure::add_property
void add_property(const QString &name, const QVariant &value)
add the property named name to this Data structure.
Definition: DataStructure.cpp:505
DataStructure::addDataList
virtual DataList addDataList(DataList dataList)
Definition: DataStructure.cpp:348
DataStructure::setReadOnly
void setReadOnly(bool r)
Definition: DataStructure.cpp:265
DataStructure::addGroup
virtual GroupPtr addGroup(const QString &name)
Definition: DataStructure.cpp:468
DataStructure::updateData
void updateData(DataPtr data)
Updates registration of data in internal reference list.
Definition: DataStructure.cpp:247
DataStructure::createData
virtual DataPtr createData(const QString &name, int dataType)
Definition: DataStructure.cpp:300
DataStructure::document
Document * document() const
Definition: DataStructure.cpp:570
Pointer::create
static PointerPtr create(DataStructurePtr dataStructure, DataPtr from, DataPtr to, int pointerType)
Create pointer objects.
Definition: Pointer.cpp:53
DataStructure::setName
void setName(const QString &s)
Definition: DataStructure.cpp:475
DataStructure::createPointer
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
Document
Definition: Document.h:41
DataStructure::generateUniqueIdentifier
int generateUniqueIdentifier()
Definition: DataStructure.cpp:295
DataStructure::cleanUpBeforeConvert
virtual void cleanUpBeforeConvert()
clear data that only is useful for a type of data structure and that cannot be converted to others ...
Definition: DataStructure.cpp:580
DataStructure::remove
void remove()
if this datastructure shall be deleted, call ONLY this function
Definition: DataStructure.cpp:271
Document::pointerType
PointerTypePtr pointerType(int pointerType) const
Definition: Document.cpp:207
GroupPtr
boost::shared_ptr< Group > GroupPtr
Definition: CoreTypes.h:39
Pointer.h
DataPtr
boost::shared_ptr< Data > DataPtr
Definition: CoreTypes.h:34
DataStructure::readOnly
bool readOnly() const
Definition: DataStructure.cpp:551
Document::dataType
DataTypePtr dataType(int dataType) const
Definition: Document.cpp:197
PointerType.h
DataTypePtr
boost::shared_ptr< DataType > DataTypePtr
Definition: CoreTypes.h:36
DataStructure::removeDynamicProperty
void removeDynamicProperty(const QString &property)
Definition: DataStructure.cpp:490
Document::isValidIdentifier
static bool isValidIdentifier(const QString &identifier)
Evaluates given string and returns true if identifier is valid, otherwise returns false...
Definition: Document.cpp:232
DataStructure::nameChanged
void nameChanged(const QString &name)
DataStructure::getData
DataPtr getData(int uniqueIdentifier)
Access data element by its unique identifier.
Definition: DataStructure.cpp:411
DataStructure::initialize
void initialize()
Definition: DataStructure.cpp:83
DataStructure::name
QString name() const
DataStructure::scriptValue
QScriptValue scriptValue() const
Definition: DataStructure.cpp:561
Data::create
static DataPtr create(DataStructurePtr dataStructure, int uniqueIdentifier, int dataType)
Create data element objects.
Definition: Data.cpp:92
PointerList
QList< boost::shared_ptr< Pointer > > PointerList
Definition: CoreTypes.h:33
DataStructure::addDynamicProperty
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:25 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