umbrello: umbrello/layoutgenerator.h Source File

umbrello 2.32.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

layoutgenerator.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2012-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef LAYOUTGENERATOR_H
12
13 #include "dotgenerator.h"
14 #include "optionstate.h"
15
17 #include <QRectF>
18
38 class LayoutGenerator : public DotGenerator
39 {
40 public:
41 typedef QHash<QString,QRectF> NodeType;
42 typedef QList<QPointF> EdgePoints;
43 typedef QHash<QString,EdgePoints> EdgeType;
44 typedef QMap<QString,QStringList> ParameterList;
45
46 LayoutGenerator();
47
48 bool isEnabled();
49 bool generate(UMLScene *scene, const QString &variant = QString());
50 bool apply(UMLScene *scene);
51 static bool availableConfigFiles(UMLScene *scene, QHash<QString,QString> &configFiles);
52 QPointF origin(const QString &id);
53 bool readGeneratedDotFile(const QString &fileName);
54 bool parseLine(const QString &line);
55 bool splitParameters(QMap<QString,QStringList> &map, const QString &s);
56 QPointF mapToScene(const QPointF &p);
57
58 protected:
59 QRectF m_boundingRect;
60 NodeType m_nodes;
61 EdgeType m_edges;
62 QHash<QString, QPointF> m_edgeLabelPosition;
63
64 friend QDebug operator<<(QDebug out, LayoutGenerator &c);
65 };
66
67 #if 0
68 static QDebug operator<<(QDebug out, LayoutGenerator &c);
69 #endif
70
71 #endif
DotGenerator
Definition: dotgenerator.h:25
LayoutGenerator
Definition: layoutgenerator.h:39
LayoutGenerator::m_edges
EdgeType m_edges
list of edges found in parsed dot file
Definition: layoutgenerator.h:61
LayoutGenerator::EdgeType
QHash< QString, EdgePoints > EdgeType
Definition: layoutgenerator.h:43
LayoutGenerator::m_edgeLabelPosition
QHash< QString, QPointF > m_edgeLabelPosition
contains global node parameters
Definition: layoutgenerator.h:62
LayoutGenerator::isEnabled
bool isEnabled()
Definition: layoutgenerator.cpp:99
LayoutGenerator::splitParameters
bool splitParameters(QMap< QString, QStringList > &map, const QString &s)
LayoutGenerator::NodeType
QHash< QString, QRectF > NodeType
Definition: layoutgenerator.h:41
LayoutGenerator::apply
bool apply(UMLScene *scene)
Definition: layoutgenerator.cpp:195
LayoutGenerator::m_boundingRect
QRectF m_boundingRect
Definition: layoutgenerator.h:59
LayoutGenerator::ParameterList
QMap< QString, QStringList > ParameterList
Definition: layoutgenerator.h:44
LayoutGenerator::parseLine
bool parseLine(const QString &line)
Definition: layoutgenerator.cpp:398
LayoutGenerator::generate
bool generate(UMLScene *scene, const QString &variant=QString())
Definition: layoutgenerator.cpp:109
LayoutGenerator::LayoutGenerator
LayoutGenerator()
Definition: layoutgenerator.cpp:88
LayoutGenerator::availableConfigFiles
static bool availableConfigFiles(UMLScene *scene, QHash< QString, QString > &configFiles)
Definition: layoutgenerator.cpp:309
LayoutGenerator::EdgePoints
QList< QPointF > EdgePoints
Definition: layoutgenerator.h:42
LayoutGenerator::m_nodes
NodeType m_nodes
list of nodes found in parsed dot file
Definition: layoutgenerator.h:60
LayoutGenerator::origin
QPointF origin(const QString &id)
Definition: layoutgenerator.cpp:346
LayoutGenerator::operator<<
friend QDebug operator<<(QDebug out, LayoutGenerator &c)
LayoutGenerator::readGeneratedDotFile
bool readGeneratedDotFile(const QString &fileName)
Definition: layoutgenerator.cpp:369
LayoutGenerator::mapToScene
QPointF mapToScene(const QPointF &p)
Definition: layoutgenerator.cpp:602
UMLScene
Definition: umlscene.h:70
dotgenerator.h
optionstate.h
operator<<
QDebug operator<<(QDebug out, const QXmlStreamAttribute &a)
Definition: shared.cpp:24