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

dotgenerator.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 DOTGENERATOR_H
12
13 class UMLScene;
14 #include <QHash>
15 #include <QPointF>
16 #include <QString>
17
18 #define DOTGENERATOR_DEBUG
19
24 class DotGenerator
25 {
26 public:
27 DotGenerator();
28
29 bool usePosition();
30 void setUsePosition(bool state);
31
32 bool useFullNodeLabels();
33 void setUseFullNodeLabels(bool state);
34
35 static bool availableConfigFiles(UMLScene *scene, QHash<QString, QString> &configFiles);
36 bool readConfigFile(QString diagramType, const QString &variant = QLatin1String("default"));
37
38 bool createDotFile(UMLScene *scene, const QString &fileName, const QString &variant = QLatin1String("default"));
39
40 static QString currentDotPath();
41 void setGeneratorName(const QString &name);
42 QString generatorFullPath();
43
44 protected:
45 bool findItem(QStringList &params, const QString &search);
46 QString fixID(const QString &_id);
47 int generatorVersion();
48
49 double m_scale;
50 QString m_configFileName;
51 QHash<QString, QString> m_dotParameters;
52 QHash<QString, QString> m_edgeParameters;
53 QHash<QString, QString> m_nodeParameters;
54 QPointF m_origin;
55 QString m_generator;
56 bool m_usePosition;
57 bool m_useFullNodeLabels;
58 QString m_dotPath;
59 int m_version{0};
60
61 friend QDebug operator<<(QDebug out, DotGenerator &c);
62 };
63
64 #endif
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
DotPaintEngine::m_data
QStringList m_data
Definition: dotgenerator.cpp:91
WidgetBase::isTextWidget
bool isTextWidget()
Definition: widgetbase.h:268
LayoutGenerator
Definition: layoutgenerator.h:39
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
DotPaintEngine::drawPolygon
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Definition: dotgenerator.cpp:71
statewidget.h
DotGenerator::generatorFullPath
QString generatorFullPath()
Definition: dotgenerator.cpp:194
DotPaintEngine::drawTiledPixmap
virtual void drawTiledPixmap(const QRectF &rect, const QPixmap &pixmap, const QPointF &p)
Definition: dotgenerator.cpp:80
activitywidget.h
DotGenerator::DotGenerator
DotGenerator()
Definition: dotgenerator.cpp:139
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UMLScene::associationList
const AssociationWidgetList associationList() const
Definition: umlscene.cpp:589
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
DotGenerator::m_version
int m_version
version of graphviz generator
Definition: dotgenerator.h:59
DotGenerator::m_nodeParameters
QHash< QString, QString > m_nodeParameters
contains global node parameters
Definition: dotgenerator.h:53
DotGenerator::setUseFullNodeLabels
void setUseFullNodeLabels(bool state)
Definition: dotgenerator.cpp:236
DotGenerator::readConfigFile
bool readConfigFile(QString diagramType, const QString &variant=QLatin1String("default"))
Definition: dotgenerator.cpp:280
DotGenerator
Definition: dotgenerator.h:25
DotGenerator::createDotFile
bool createDotFile(UMLScene *scene, const QString &fileName, const QString &variant=QLatin1String("default"))
Definition: dotgenerator.cpp:377
AssociationWidget::roleName
QString roleName(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:945
StateWidget
A graphical version of a UML State.
Definition: statewidget.h:39
ActivityWidget
A graphical version of a UML Activity.
Definition: activitywidget.h:34
classifierwidget.h
WidgetBase::localID
Uml::ID::Type localID() const
Definition: widgetbase.cpp:238
DotPaintDevice::data
QStringList & data()
Definition: dotgenerator.cpp:114
Uml::RoleType::A
@ A
Definition: basictypes.h:239
DotGenerator::m_dotPath
QString m_dotPath
contains path to generator executable
Definition: dotgenerator.h:58
DotPaintEngine::drawPoints
virtual void drawPoints(const QPointF *points, int pointCount)
Definition: dotgenerator.cpp:69
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
SignalWidget::signalTypeStr
QString signalTypeStr() const
Definition: signalwidget.cpp:217
DotPaintEngine::drawPolygon
virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)
Definition: dotgenerator.cpp:72
StateWidget::stateTypeStr
QString stateTypeStr() const
Definition: statewidget.cpp:401
DotPaintEngine::DotPaintEngine
DotPaintEngine(PaintEngineFeatures caps=0)
Definition: dotgenerator.cpp:55
DotGenerator::m_generator
QString m_generator
name of graphviz generator
Definition: dotgenerator.h:55
DotPaintEngine::drawPixmap
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
Definition: dotgenerator.cpp:68
Uml::AssociationType::toString
QString toString(Enum item)
Definition: basictypes.cpp:283
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
DotGenerator::usePosition
bool usePosition()
Definition: dotgenerator.cpp:204
DotPaintEngine::drawPoints
virtual void drawPoints(const QPoint *points, int pointCount)
Definition: dotgenerator.cpp:70
DotPaintEngine::type
virtual Type type() const
Definition: dotgenerator.cpp:85
DotGenerator::m_scale
double m_scale
scale factor
Definition: dotgenerator.h:49
DotGenerator::currentDotPath
static QString currentDotPath()
Definition: dotgenerator.cpp:159
DotPaintDevice::m_engine
DotPaintEngine * m_engine
Definition: dotgenerator.cpp:132
DotPaintEngine::drawPath
virtual void drawPath(const QPainterPath &path)
Definition: dotgenerator.cpp:67
SignalWidget
Definition: signalwidget.h:28
Settings::optionState
OptionState & optionState()
Definition: optionstate.cpp:362
AssociationWidget::associationType
Uml::AssociationType::Enum associationType() const
Definition: associationwidget.cpp:1401
DotGenerator::generatorVersion
int generatorVersion()
Definition: dotgenerator.cpp:585
Settings::AutoLayoutState::dotPath
QString dotPath
path to dot executable
Definition: optionstate.h:294
DotPaintEngine::drawImage
virtual void drawImage(const QRectF &rectangle, const QImage &image, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
Definition: dotgenerator.cpp:64
AssociationWidget::name
QString name() const
Definition: associationwidget.cpp:870
AssociationWidget::widgetLocalIDForRole
Uml::ID::Type widgetLocalIDForRole(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1469
AssociationWidget::multiplicity
QString multiplicity(Uml::RoleType::Enum role) const
Definition: associationwidget.cpp:1054
DotPaintEngine::drawTextItem
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem)
Definition: dotgenerator.cpp:75
Settings::OptionState::autoLayoutState
AutoLayoutState autoLayoutState
Definition: optionstate.h:333
DotPaintEngine
Definition: dotgenerator.cpp:53
a
QString a
Definition: petalnode.cpp:18
umlwidget.h
UMLScene::type
Uml::DiagramType::Enum type() const
Definition: umlscene.cpp:426
DotPaintEngine::end
virtual bool end()
Definition: dotgenerator.cpp:81
LayoutGenerator::m_edges
EdgeType m_edges
list of edges found in parsed dot file
Definition: layoutgenerator.h:61
DotGenerator::m_usePosition
bool m_usePosition
use position tag from dot (not used yet)
Definition: dotgenerator.h:56
DotPaintDevice::metric
virtual int metric(PaintDeviceMetric metric) const
Definition: dotgenerator.cpp:120
DotPaintDevice::~DotPaintDevice
~DotPaintDevice()
Definition: dotgenerator.cpp:104
Settings::AutoLayoutState::autoDotPath
bool autoDotPath
determine path to dot executable automatically
Definition: optionstate.h:293
uDebug
#define uDebug()
Definition: debug_utils.h:122
UMLScene::widgetList
const UMLWidgetList widgetList() const
Definition: umlscene.cpp:603
Uml::RoleType::B
@ B
Definition: basictypes.h:240
Uml::DiagramType::toString
QString toString(Enum item)
Definition: basictypes.cpp:168
DotGenerator::operator<<
friend QDebug operator<<(QDebug out, DotGenerator &c)
DotPaintEngine::drawRects
virtual void drawRects(const QRect *rects, int rectCount)
Definition: dotgenerator.cpp:74
DotGenerator::m_edgeParameters
QHash< QString, QString > m_edgeParameters
contains global edge parameters
Definition: dotgenerator.h:52
DotPaintDevice::DotPaintDevice
DotPaintDevice()
Definition: dotgenerator.cpp:100
DotGenerator::setGeneratorName
void setGeneratorName(const QString &name)
Definition: dotgenerator.cpp:187
DotPaintEngine::drawEllipse
virtual void drawEllipse(const QRect &rect)
Definition: dotgenerator.cpp:63
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:105
DotPaintDevice
Definition: dotgenerator.cpp:98
dotType
QString dotType(WidgetBase *widget)
Definition: dotgenerator.cpp:43
operator<<
QDebug operator<<(QDebug out, const QXmlStreamAttribute &a)
Definition: shared.cpp:24
DotPaintEngine::begin
virtual bool begin(QPaintDevice *pdev)
Definition: dotgenerator.cpp:57
DotPaintEngine::drawEllipse
virtual void drawEllipse(const QRectF &rect)
Definition: dotgenerator.cpp:62
associationwidget.h
DotGenerator::findItem
bool findItem(QStringList &params, const QString &search)
Definition: dotgenerator.cpp:561
DotPaintDevice::paintEngine
virtual QPaintEngine * paintEngine() const
Definition: dotgenerator.cpp:109
Settings::OptionState
Definition: optionstate.h:314
ActivityWidget::activityTypeStr
QString activityTypeStr() const
Definition: activitywidget.cpp:66
LayoutGenerator::m_boundingRect
QRectF m_boundingRect
Definition: layoutgenerator.h:59
uError
#define uError()
Definition: debug_utils.h:123
DotGenerator::m_dotParameters
QHash< QString, QString > m_dotParameters
contains global graph parameters
Definition: dotgenerator.h:51
LayoutGenerator::m_nodes
NodeType m_nodes
list of nodes found in parsed dot file
Definition: layoutgenerator.h:60
DotGenerator::availableConfigFiles
static bool availableConfigFiles(UMLScene *scene, QHash< QString, QString > &configFiles)
Definition: dotgenerator.cpp:248
DotGenerator::m_origin
QPointF m_origin
Definition: dotgenerator.h:54
signalwidget.h
debug_utils.h
DotGenerator::setUsePosition
void setUsePosition(bool state)
Definition: dotgenerator.cpp:214
WidgetBase::baseTypeStr
QLatin1String baseTypeStr() const
Definition: widgetbase.cpp:133
UMLScene
Definition: umlscene.h:69
DotGenerator::fixID
QString fixID(const QString &_id)
Definition: dotgenerator.cpp:573
DotPaintEngine::updateState
virtual void updateState(const QPaintEngineState &state)
Definition: dotgenerator.cpp:89
DotPaintEngine::drawRects
virtual void drawRects(const QRectF *rects, int rectCount)
Definition: dotgenerator.cpp:73
DotGenerator::m_useFullNodeLabels
bool m_useFullNodeLabels
use full node labels
Definition: dotgenerator.h:57
DotPaintEngine::drawLines
virtual void drawLines(const QLine *lines, int lineCount)
Definition: dotgenerator.cpp:66
Uml::LayoutType::toString
QString toString(Enum item)
Definition: basictypes.cpp:485
DotGenerator::useFullNodeLabels
bool useFullNodeLabels()
Definition: dotgenerator.cpp:224
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
DotPaintEngine::~DotPaintEngine
virtual ~DotPaintEngine()
Definition: dotgenerator.cpp:56
DotGenerator::m_configFileName
QString m_configFileName
template filename
Definition: dotgenerator.h:50
DotPaintEngine::drawLines
virtual void drawLines(const QLineF *lines, int lineCount)
Definition: dotgenerator.cpp:65
dotgenerator.h
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1869
Import_Rose::diagramType
Uml::DiagramType::Enum diagramType(QString objType)
Definition: petaltree2uml.cpp:543