• 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
  • Graph
GraphNode.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 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef GRAPHNODE_H
20 #define GRAPHNODE_H
21 
22 #include <Data.h>
23 
24 class GraphNode : public Data
25 {
26  Q_OBJECT
27 
28  using Data::remove;
29 
30 public:
31  static DataPtr create(DataStructurePtr parent, int uniqueIdentifier, int dataType);
32  GraphNode(DataStructurePtr parent, int uniqueIdentifier, int dataType);
33 
34  virtual void setEngine(QScriptEngine* _engine);
35  virtual ~GraphNode();
36 
37  Q_INVOKABLE QScriptValue neighbors();
38  Q_INVOKABLE QScriptValue edges();
39  Q_INVOKABLE QScriptValue outEdges();
40  Q_INVOKABLE QScriptValue inEdges();
41  Q_INVOKABLE QScriptValue edges(int type);
42  Q_INVOKABLE QScriptValue outEdges(int type);
43  Q_INVOKABLE QScriptValue inEdges(int type);
44  Q_INVOKABLE QScriptValue edgesTo(Data *node);
45 
46 signals:
47  void scriptError(const QString &message);
48 
49 public slots:
53  QScriptValue adj_nodes();
57  QScriptValue adj_edges();
61  QScriptValue input_edges();
65  QScriptValue output_edges();
69  QScriptValue connected_edges(Data* n);
70 
79  QScriptValue overlay_edges(int overlay);
80 };
81 
82 #endif // GRAPHNODE_H
GraphNode::outEdges
Q_INVOKABLE QScriptValue outEdges()
Definition: GraphNode.cpp:60
DataStructurePtr
boost::shared_ptr< DataStructure > DataStructurePtr
Definition: CoreTypes.h:38
GraphNode::output_edges
QScriptValue output_edges()
Definition: GraphNode.cpp:124
GraphNode::overlay_edges
QScriptValue overlay_edges(int overlay)
Gives array of edges at specified overlay if present.
Definition: GraphNode.cpp:132
Data::dataType
int dataType() const
Definition: Data.cpp:387
Data.h
GraphNode::edgesTo
Q_INVOKABLE QScriptValue edgesTo(Data *node)
Definition: GraphNode.cpp:81
GraphNode::setEngine
virtual void setEngine(QScriptEngine *_engine)
Set script engine.
Definition: GraphNode.cpp:36
GraphNode::adj_edges
QScriptValue adj_edges()
Definition: GraphNode.cpp:97
GraphNode::create
static DataPtr create(DataStructurePtr parent, int uniqueIdentifier, int dataType)
Definition: GraphNode.cpp:26
GraphNode::~GraphNode
virtual ~GraphNode()
Definition: GraphNode.cpp:41
GraphNode::GraphNode
GraphNode(DataStructurePtr parent, int uniqueIdentifier, int dataType)
Definition: GraphNode.cpp:31
GraphNode::neighbors
Q_INVOKABLE QScriptValue neighbors()
Definition: GraphNode.cpp:75
Data::remove
void remove()
Definition: Data.cpp:319
GraphNode::connected_edges
QScriptValue connected_edges(Data *n)
Definition: GraphNode.cpp:105
GraphNode::scriptError
void scriptError(const QString &message)
GraphNode::input_edges
QScriptValue input_edges()
Definition: GraphNode.cpp:116
DataPtr
boost::shared_ptr< Data > DataPtr
Definition: CoreTypes.h:34
GraphNode::inEdges
Q_INVOKABLE QScriptValue inEdges()
Definition: GraphNode.cpp:55
GraphNode::edges
Q_INVOKABLE QScriptValue edges()
Definition: GraphNode.cpp:45
Data
Definition: Data.h:40
GraphNode
Definition: GraphNode.h:24
GraphNode::adj_nodes
QScriptValue adj_nodes()
Definition: GraphNode.cpp:89
Data::type
QScriptValue type()
Definition: Data.cpp:498
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