gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
decorator.hh
Go to the documentation of this file.
1// Copyright (c) 2018, Joseph Mirabel
2// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3//
4// This file is part of gepetto-viewer.
5// gepetto-viewer is free software: you can redistribute it
6// and/or modify it under the terms of the GNU Lesser General Public
7// License as published by the Free Software Foundation, either version
8// 3 of the License, or (at your option) any later version.
9//
10// gepetto-viewer is distributed in the hope that it will be
11// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// General Lesser Public License for more details. You should have
14// received a copy of the GNU Lesser General Public License along with
15// gepetto-viewer. If not, see <http://www.gnu.org/licenses/>.
16
17#include <QObject>
18
19#include "qgv.h"
20
21class QGVScene;
22class QGVSubGraph;
23class QGVNode;
24class QGVEdge;
25
26namespace PyQgv {
27class QGVCORE_EXPORT QGVDecorator : public QObject {
28 Q_OBJECT
29
30 public slots:
31
32 // ------- QGVScene ------------------------------------------- //
33 QGVScene* new_QGVScene(const QString& name, QObject* parent = NULL);
34 void delete_QGVScene(QGVScene* s);
35
36 void setGraphAttribute(QGVScene* s, const QString& name,
37 const QString& value);
38 void setNodeAttribute(QGVScene* s, const QString& name, const QString& value);
39 void setEdgeAttribute(QGVScene* s, const QString& name, const QString& value);
40
41 QGVNode* addNode(QGVScene* s, const QString& label);
42 QGVEdge* addEdge(QGVScene* s, QGVNode* source, QGVNode* target,
43 const QString label = QString());
44 QGVSubGraph* addSubGraph(QGVScene* s, const QString& name,
45 bool cluster = true);
46
47 void setRootNode(QGVScene* s, QGVNode* node);
48 void setNodePositionAttribute(QGVScene* s);
49
50 void loadLayout(QGVScene* s, const QString& text);
51 void applyLayout(QGVScene* s, const QString& algorithm = "dot");
52 void render(QGVScene* s, const QString& algorithm);
53 void render(QGVScene* s, const QString& algorithm, const QString file);
54 bool writeGraph(QGVScene* s, const QString& filename);
55 void freeLayout(QGVScene* s);
56 void clear(QGVScene* s);
57 // ------- QGVScene ------------------------------------------- //
58
59 // ------- QGVSubGraph ---------------------------------------- //
60 void setAttribute(QGVSubGraph* n, const QString& name, const QString& value);
61 QString getAttribute(QGVSubGraph* n, const QString& name);
62
63 QGVNode* addNode(QGVSubGraph* s, const QString& label);
64 QGVSubGraph* addSubGraph(QGVSubGraph* s, const QString& name,
65 bool cluster = true);
66 // ------- QGVSubGraph ---------------------------------------- //
67
68 // ------- QGVNode ------------------------------------------- //
69 void setAttribute(QGVNode* n, const QString& name, const QString& value);
70 QString getAttribute(QGVNode* n, const QString& name);
71 // ------- QGVNode ------------------------------------------- //
72
73 // ------- QGVEdge ------------------------------------------- //
74 void setAttribute(QGVEdge* e, const QString& name, const QString& value);
75 QString getAttribute(QGVEdge* e, const QString& name);
76 // ------- QGVEdge ------------------------------------------- //
77};
78
81} // namespace PyQgv
Definition decorator.hh:27
void setAttribute(QGVEdge *e, const QString &name, const QString &value)
QString getAttribute(QGVEdge *e, const QString &name)
QString getAttribute(QGVNode *n, const QString &name)
void applyLayout(QGVScene *s, const QString &algorithm="dot")
void clear(QGVScene *s)
void setRootNode(QGVScene *s, QGVNode *node)
void setNodePositionAttribute(QGVScene *s)
void render(QGVScene *s, const QString &algorithm, const QString file)
QGVSubGraph * addSubGraph(QGVScene *s, const QString &name, bool cluster=true)
void setEdgeAttribute(QGVScene *s, const QString &name, const QString &value)
void setAttribute(QGVSubGraph *n, const QString &name, const QString &value)
void render(QGVScene *s, const QString &algorithm)
void freeLayout(QGVScene *s)
QGVSubGraph * addSubGraph(QGVSubGraph *s, const QString &name, bool cluster=true)
bool writeGraph(QGVScene *s, const QString &filename)
void delete_QGVScene(QGVScene *s)
void setGraphAttribute(QGVScene *s, const QString &name, const QString &value)
QGVEdge * addEdge(QGVScene *s, QGVNode *source, QGVNode *target, const QString label=QString())
void setAttribute(QGVNode *n, const QString &name, const QString &value)
QString getAttribute(QGVSubGraph *n, const QString &name)
void setNodeAttribute(QGVScene *s, const QString &name, const QString &value)
QGVNode * addNode(QGVSubGraph *s, const QString &label)
void loadLayout(QGVScene *s, const QString &text)
QGVNode * addNode(QGVScene *s, const QString &label)
QGVScene * new_QGVScene(const QString &name, QObject *parent=NULL)
Definition decorator.hh:26
void registerQGV()
Register QGV to PythonQt.