umbrello  2.32.2
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  SPDX-License-Identifier: GPL-2.0-or-later
3  SPDX-FileCopyrightText: 2012-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4 */
5 
6 #ifndef LAYOUTGENERATOR_H
7 
8 #include "dotgenerator.h"
9 #include "optionstate.h"
10 
12 #include <QRectF>
13 
34 {
35 public:
36  typedef QHash<QString,QRectF> NodeType;
37  typedef QList<QPointF> EdgePoints;
38  typedef QHash<QString,EdgePoints> EdgeType;
39  typedef QMap<QString,QStringList> ParameterList;
40 
42 
43  bool isEnabled() const;
44  bool generate(UMLScene *scene, const QString &variant = QString());
45  bool apply(UMLScene *scene);
46  static bool availableConfigFiles(UMLScene *scene, QHash<QString,QString> &configFiles);
47  QPointF origin(const QString &id);
48  bool readGeneratedDotFile(const QString &fileName);
49  bool parseLine(const QString &line);
50  bool splitParameters(QMap<QString,QStringList> &map, const QString &s);
51  QPointF mapToScene(const QPointF &p);
52 
53 protected:
57  QHash<QString, QPointF> m_edgeLabelPosition;
58 
59  friend QDebug operator<<(QDebug out, LayoutGenerator &c);
60 };
61 
62 #if 0
63 static QDebug operator<<(QDebug out, LayoutGenerator &c);
64 #endif
65 
66 #endif
UMLWidget::height
qreal height() const
Definition: umlwidget.h:112
associationline.h
LayoutGenerator
Definition: layoutgenerator.h:33
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:46
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:35
UMLScene::associationList
const AssociationWidgetList associationList() const
Definition: umlscene.cpp:585
WidgetBase::isPinWidget
bool isPinWidget() const
Definition: widgetbase.h:258
DotGenerator::m_version
int m_version
version of graphviz generator
Definition: dotgenerator.h:54
DotGenerator::setUseFullNodeLabels
void setUseFullNodeLabels(bool state)
Definition: dotgenerator.cpp:231
AssociationLine::count
int count() const
Definition: associationline.cpp:148
DotGenerator
Definition: dotgenerator.h:19
AssociationWidget::associationLine
AssociationLine * associationLine() const
Definition: associationwidget.cpp:657
DotGenerator::createDotFile
bool createDotFile(UMLScene *scene, const QString &fileName, const QString &variant=QLatin1String("default"))
Definition: dotgenerator.cpp:372
LayoutGenerator::mapToScene
QPointF mapToScene(const QPointF &p)
Definition: layoutgenerator.cpp:597
WidgetBase::localID
Uml::ID::Type localID() const
Definition: widgetbase.cpp:245
AssociationLine::removePoint
void removePoint(int index)
Definition: associationline.cpp:134
LayoutGenerator::ParameterList
QMap< QString, QStringList > ParameterList
Definition: layoutgenerator.h:39
Uml::RoleType::A
@ A
Definition: basictypes.h:237
DotGenerator::m_dotPath
QString m_dotPath
contains path to generator executable
Definition: dotgenerator.h:53
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1300
cmds.h
Uml::AssociationType::toString
QString toString(Enum item)
Definition: basictypes.cpp:269
pngViewer
static QString pngViewer()
Definition: layoutgenerator.cpp:48
DotGenerator::m_scale
double m_scale
scale factor
Definition: dotgenerator.h:44
optionstate.h
Settings::optionState
OptionState & optionState()
Definition: optionstate.cpp:357
AssociationWidget::associationType
Uml::AssociationType::Enum associationType() const
Definition: associationwidget.cpp:1400
floatingtextwidget.h
LayoutGenerator::origin
QPointF origin(const QString &id)
Definition: layoutgenerator.cpp:341
AssociationWidget::widgetLocalIDForRole
Uml::ID::Type widgetLocalIDForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1468
UMLWidget::setStartMovePosition
void setStartMovePosition(const QPointF &position)
Definition: umlwidget.cpp:615
UMLWidget::setX
virtual void setX(qreal x)
Definition: umlwidget.cpp:1726
Uml::LayoutType::Spline
@ Spline
Definition: basictypes.h:135
Uml::LayoutType::Polyline
@ Polyline
Definition: basictypes.h:134
number
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Library General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: LGPL-2.0-only.txt:368
a
QString a
Definition: petalnode.cpp:13
umlwidget.h
uWarning
#define uWarning()
Definition: debug_utils.h:110
LayoutGenerator::LayoutGenerator
LayoutGenerator()
Definition: layoutgenerator.cpp:83
LayoutGenerator::EdgePoints
QList< QPointF > EdgePoints
Definition: layoutgenerator.h:37
Uml::LayoutType::Direct
@ Direct
Definition: basictypes.h:132
UMLScene::type
Uml::DiagramType::Enum type() const
Definition: umlscene.cpp:422
LayoutGenerator::m_edges
EdgeType m_edges
list of edges found in parsed dot file
Definition: layoutgenerator.h:56
Uml::CmdMoveWidget
Definition: cmdmovewidget.h:17
LayoutGenerator::EdgeType
QHash< QString, EdgePoints > EdgeType
Definition: layoutgenerator.h:38
AssociationLine
Definition: associationline.h:100
i18n
#define i18n
Definition: main.cpp:34
LayoutGenerator::isEnabled
bool isEnabled() const
Definition: layoutgenerator.cpp:94
LayoutGenerator::NodeType
QHash< QString, QRectF > NodeType
Definition: layoutgenerator.h:36
executable
if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified valid for at least three to give the same user the materials specified in for a charge no more than the cost of performing this distribution c If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place d Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an executable
Definition: LGPL-2.0-only.txt:274
UMLApp::beginMacro
void beginMacro(const QString &text)
Definition: uml.cpp:3469
uDebug
#define uDebug()
Definition: debug_utils.h:108
AssociationLine::cleanup
void cleanup()
Definition: associationline.cpp:156
UMLScene::widgetList
const UMLWidgetList widgetList() const
Definition: umlscene.cpp:599
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:31
Uml::RoleType::B
@ B
Definition: basictypes.h:238
LayoutGenerator::parseLine
bool parseLine(const QString &line)
Definition: layoutgenerator.cpp:393
Uml::DiagramType::toString
QString toString(Enum item)
Definition: basictypes.cpp:154
UMLApp::endMacro
void endMacro()
Definition: uml.cpp:3488
c
type show c for details The hypothetical commands show w and show c should show the appropriate parts of the General Public License Of the commands you use may be called something other than show w and show c
Definition: GPL-2.0-only.txt:301
DotGenerator::m_edgeParameters
QHash< QString, QString > m_edgeParameters
contains global edge parameters
Definition: dotgenerator.h:47
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:275
AssociationLine::setLayout
void setLayout(Uml::LayoutType::Enum layout)
Definition: associationline.cpp:848
LayoutGenerator::splitParameters
bool splitParameters(QMap< QString, QStringList > &map, const QString &s)
UMLWidget::setY
virtual void setY(qreal y)
Definition: umlwidget.cpp:1738
operator<<
QDebug operator<<(QDebug out, const QXmlStreamAttribute &a)
Definition: shared.cpp:17
UMLWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1318
DotGenerator::generatorFullPath
QString generatorFullPath() const
Definition: dotgenerator.cpp:189
associationwidget.h
LayoutGenerator::m_edgeLabelPosition
QHash< QString, QPointF > m_edgeLabelPosition
contains global node parameters
Definition: layoutgenerator.h:57
LayoutGenerator::m_boundingRect
QRectF m_boundingRect
Definition: layoutgenerator.h:54
WidgetBase::isPortWidget
bool isPortWidget() const
Definition: widgetbase.h:259
AssociationWidget::resetTextPositions
virtual void resetTextPositions()
Definition: associationwidget.cpp:339
LayoutGenerator::m_nodes
NodeType m_nodes
list of nodes found in parsed dot file
Definition: layoutgenerator.h:55
uml.h
DotGenerator::m_origin
QPointF m_origin
Definition: dotgenerator.h:49
LayoutGenerator::operator<<
friend QDebug operator<<(QDebug out, LayoutGenerator &c)
debug_utils.h
AssociationWidget::saveIdealTextPositions
void saveIdealTextPositions()
Definition: associationwidget.cpp:1852
UMLScene
Definition: umlscene.h:64
DotGenerator::fixID
QString fixID(const QString &_id)
Definition: dotgenerator.cpp:572
AssociationLine::setEndPoints
bool setEndPoints(const QPointF &start, const QPointF &end)
Definition: associationline.cpp:287
AssociationLine::addPoint
void addPoint(const QPointF &point)
Definition: associationline.cpp:114
LayoutGenerator::generate
bool generate(UMLScene *scene, const QString &variant=QString())
Definition: layoutgenerator.cpp:104
LayoutGenerator::availableConfigFiles
static bool availableConfigFiles(UMLScene *scene, QHash< QString, QString > &configFiles)
Definition: layoutgenerator.cpp:304
Uml::LayoutType::Orthogonal
@ Orthogonal
Definition: basictypes.h:133
b
bool b
Definition: cxx11-null-pointer-constant.h:6
LayoutGenerator::readGeneratedDotFile
bool readGeneratedDotFile(const QString &fileName)
Definition: layoutgenerator.cpp:364
AssociationWidget::nameWidget
FloatingTextWidget * nameWidget() const
Definition: associationwidget.cpp:812
LayoutGenerator::apply
bool apply(UMLScene *scene)
Definition: layoutgenerator.cpp:190
UMLApp::executeCommand
void executeCommand(QUndoCommand *cmd)
Definition: uml.cpp:3447
textViewer
static QString textViewer()
Definition: layoutgenerator.cpp:61
dotgenerator.h
Import_Rose::diagramType
Uml::DiagramType::Enum diagramType(QString objType)
Definition: petaltree2uml.cpp:604
AssociationWidget::calculateEndingPoints
void calculateEndingPoints()
Definition: associationwidget.cpp:1610
layoutgenerator.h