[Uml-devel] KDE/kdesdk/umbrello/umbrello
Ralf Habacker
ralf.habacker at gmail.com
Mon Mar 12 02:05:49 UTC 2012
SVN commit 1285084 by habacker:
Made graphviz generator configurable.
M +3 -0 dotgenerator.h
M +12 -3 layoutgenerator.h
M +1 -0 layouts/state-export.desktop
--- trunk/KDE/kdesdk/umbrello/umbrello/dotgenerator.h #1285083:1285084
@@ -166,6 +166,8 @@
else
uError() << "illegal format of entry 'origin'" << value;
+ m_generator = settings.readEntry("generator","dot");
+
#ifdef LAYOUTGENERATOR_DATA_DEBUG
uDebug() << m_edgeParameters;
uDebug() << m_nodeParameters;
@@ -307,6 +309,7 @@
QHash<QString, QString> m_edgeParameters; ///< contains global edge parameters
QHash<QString, QString> m_nodeParameters; ///< contains global node parameters
QPointF m_origin;
+ QString m_generator; ///< name of graphviz generator
bool m_usePosition;
friend QDebug operator<<(QDebug out, DotGenerator &c);
--- trunk/KDE/kdesdk/umbrello/umbrello/layoutgenerator.h #1285083:1285084
@@ -147,15 +147,24 @@
if (!createDotFile(scene, in.fileName(), variant))
return false;
+ QString executable;
+ if (!m_generator.isEmpty()) {
+ QFileInfo fi(m_executable);
+ QString path = fi.absolutePath();
+ executable = path + "/" + m_generator;
+ }
+ else
+ executable = m_executable;
+
QProcess p;
QStringList args;
args << "-o" << out.fileName() << "-Tplain-ext" << in.fileName();
- p.start(m_executable, args);
+ p.start(executable, args);
p.waitForFinished();
args.clear();
args << "-o" << xdotOut.fileName() << "-Txdot" << in.fileName();
- p.start(m_executable, args);
+ p.start(executable, args);
p.waitForFinished();
#ifdef LAYOUTGENERATOR_DEBUG
@@ -167,7 +176,7 @@
qDebug() << pngViewer() << pngFile.fileName();
args.clear();
args << "-o" << pngFile.fileName() << "-Tpng" << in.fileName();
- p.start(m_executable, args);
+ p.start(executable, args);
p.waitForFinished();
#endif
#ifndef USE_XDOT
--- trunk/KDE/kdesdk/umbrello/umbrello/layouts/state-export.desktop #1285083:1285084
@@ -44,3 +44,4 @@
[X-UMBRELLO-Dot-Settings]
origin=50,50
+generator=neato
More information about the umbrello-devel
mailing list