• 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
  • DataStructures
  • LinkedList
ListStructure.h
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2011 Wagner Reck <wagner.reck@gmail.com>
4  Copyright 2011 Tomaz Canabrava <tomaz.canabrava@gmail.com>
5  Copyright 2013 Andreas Cord-Landwehr <cordlandwehr@kde.org>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program 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
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef LISTSTRUCTURE_H
22 #define LISTSTRUCTURE_H
23 
24 #include "rocs_liststructure_export.h"
25 #include <DataStructure.h>
26 #include <boost/shared_ptr.hpp>
27 
28 class ListNode;
29 namespace Rocs
30 {
31 class ROCS_LISTSTRUCTURE_EXPORT ListStructure : public DataStructure
32 {
33  Q_OBJECT
34  Q_PROPERTY(QString name READ name WRITE setName)
35 
36 public:
37  using DataStructure::remove;
38  using DataStructure::createPointer;
39  using DataStructure::createData;
40 
41  static DataStructurePtr create(Document *parent);
42  static DataStructurePtr create(DataStructurePtr other, Document *parent);
43 
44  explicit ListStructure(Document* parent = 0);
45  virtual ~ListStructure();
46  void importStructure(DataStructurePtr other);
47 
48  void remove(DataPtr n);
49  void remove(PointerPtr e);
50 
59  PointerPtr createPointer(DataPtr from, DataPtr to, int pointerType);
60 
68  DataPtr createData(const QString& name, int dataType);
69 
73  Q_INVOKABLE QScriptValue head();
74 
79  Q_INVOKABLE void setHead(Data *headNode);
80 
87  Q_INVOKABLE QScriptValue createNode(int type);
88 
93  Q_INVOKABLE QScriptValue createNode();
94 
99  Q_INVOKABLE QScriptValue begin();
100 
105  Q_INVOKABLE void setBegin(Data* node);
106 
107 private slots:
108  void arrangeNodes();
109 
110 private:
111  void init();
112 
113  boost::shared_ptr<ListNode> m_begin;
114  QParallelAnimationGroup* m_animationGroup;
115 
116  bool m_building;
117 };
118 }
119 
120 #endif // LISTSTRUCTURE_H
ListNode
Definition: ListNode.h:29
DataStructure
Definition: DataStructure.h:43
DataStructurePtr
boost::shared_ptr< DataStructure > DataStructurePtr
Definition: CoreTypes.h:38
rocs_liststructure_export.h
DotParser::createData
void createData(const std::string &str)
Definition: DotGrammar.cpp:372
PointerPtr
boost::shared_ptr< Pointer > PointerPtr
Definition: CoreTypes.h:35
DataStructure.h
DataStructure::createData
virtual DataPtr createData(const QString &name, int dataType)
Definition: DataStructure.cpp:300
ROCS_LISTSTRUCTURE_EXPORT
#define ROCS_LISTSTRUCTURE_EXPORT
Definition: rocs_liststructure_export.h:33
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::remove
void remove()
if this datastructure shall be deleted, call ONLY this function
Definition: DataStructure.cpp:271
DataPtr
boost::shared_ptr< Data > DataPtr
Definition: CoreTypes.h:34
Rocs::ListStructure
Definition: ListStructure.h:31
Data
Definition: Data.h:40
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