umbrello: DotGenerator Class Reference

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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
DotGenerator Class Reference

`#include <dotgenerator.h>`

Inheritance diagram for DotGenerator:

## Public Member Functions
| DotGenerator ()
bool | usePosition () const
void | setUsePosition (bool state)
bool | useFullNodeLabels () const
void | setUseFullNodeLabels (bool state)
bool | readConfigFile (QString diagramType, const QString &variant=QStringLiteral("default"))
bool | createDotFile (UMLScene *scene, const QString &fileName, const QString &variant=QStringLiteral("default"))
void | setGeneratorName (const QString &name)
QString | generatorFullPath () const

## Static Public Member Functions
static bool | availableConfigFiles (UMLScene *scene, QHash< QString, QString > &configFiles)
static QString | currentDotPath ()

## Protected Member Functions
bool | findItem (QStringList &params, const QString &search)
QString | fixID (const QString &_id)
int | generatorVersion () const

## Protected Attributes
double | m_scale
| scale factor
QString | m_configFileName
| template filename
QHash< QString, QString > | m_dotParameters
| contains global graph parameters
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
| use position tag from dot (not used yet)
bool | m_useFullNodeLabels
| use full node labels
QString | m_dotPath
| contains path to generator executable
int | m_version {0}
| version of graphviz generator

## Friends
QDebug | operator<< (QDebug out, DotGenerator &c)

## Detailed Description

The class DotGenerator provides export of diagrams as dot files.

Author
  Ralf Habacker ralf..nosp@m.haba.nosp@m.cker@.nosp@m.free.nosp@m.net.d.nosp@m.e

## Constructor & Destructor Documentation

## ◆ DotGenerator()

DotGenerator::DotGenerator | ( |  | ) |

constructor

## Member Function Documentation

## ◆ availableConfigFiles()

bool DotGenerator::availableConfigFiles | ( | UMLScene * | scene,
|  | QHash< QString, QString > & | configFiles
| ) |  |
| static

Return a list of available templates for a given scene type

Parameters

  scene | The diagram
  configFiles | will contain the collected list of config files

Returns
  true if collecting succeeds

## ◆ createDotFile()

bool DotGenerator::createDotFile | ( | UMLScene * | scene,
|  | const QString & | fileName,
|  | const QString & | variant = `QStringLiteral("default")`
| ) |  |

Create dot file using displayed widgets and associations of the provided scene

Note
  This method could also be used as a base to export diagrams as dot file

Parameters

  scene | The diagram from which the widget information is fetched
  fileName | Filename where to create the dot file
  variant | Variant string passed to readConfigFile()

Returns
  true if generating finished successfully

## ◆ currentDotPath()

QString DotGenerator::currentDotPath | ( |  | ) |
| static

Return the path where dot is installed.

Returns
  string with dot path

## ◆ findItem()

bool DotGenerator::findItem | ( | QStringList & | params,
|  | const QString & | search
| ) |  |
| protected

Find string starting with the search string in string list

Parameters

  params | string list to search in
  search | string

Returns
  true when search string has been found

## ◆ fixID()

QString DotGenerator::fixID | ( | const QString & | _id | ) |
| protected

There are id wrapped with '"', remove it.

## ◆ generatorFullPath()

QString DotGenerator::generatorFullPath | ( |  | ) | const

## ◆ generatorVersion()

int DotGenerator::generatorVersion | ( |  | ) | const
| protected

get generator version

Returns
  version for example 20130928

## ◆ readConfigFile()

bool DotGenerator::readConfigFile | ( | QString | diagramType,
|  | const QString & | variant = `QStringLiteral("default")`
| ) |  |

Read a layout config file

Parameters

  diagramType | String identifying the diagram
  variant | String identifying the variant

Returns
  true on success

## ◆ setGeneratorName()

void DotGenerator::setGeneratorName | ( | const QString & | name | ) |

## ◆ setUseFullNodeLabels()

void DotGenerator::setUseFullNodeLabels | ( | bool | state | ) |

Set usage of full node labels. When set to true labels are extracted from the text output generated by the widget's paint method.

Parameters

  state | The new state

## ◆ setUsePosition()

void DotGenerator::setUsePosition | ( | bool | state | ) |

set usage of position attribute in dot file

Parameters

  state | The new state

## ◆ useFullNodeLabels()

bool DotGenerator::useFullNodeLabels | ( |  | ) | const

return usage of full node labels

Returns
  true if position are used

## ◆ usePosition()

bool DotGenerator::usePosition | ( |  | ) | const

return usage of position attribute

Returns
  true if position are used

## Friends And Related Function Documentation

## ◆ operator<<

QDebug operator<< | ( | QDebug | out,
|  | DotGenerator & | c
| ) |  |
| friend

## Member Data Documentation

## ◆ m_configFileName

QString DotGenerator::m_configFileName
| protected

template filename

## ◆ m_dotParameters

QHash<QString, QString> DotGenerator::m_dotParameters
| protected

contains global graph parameters

## ◆ m_dotPath

QString DotGenerator::m_dotPath
| protected

contains path to generator executable

## ◆ m_edgeParameters

QHash<QString, QString> DotGenerator::m_edgeParameters
| protected

contains global edge parameters

## ◆ m_generator

QString DotGenerator::m_generator
| protected

name of graphviz generator

## ◆ m_nodeParameters

QHash<QString, QString> DotGenerator::m_nodeParameters
| protected

contains global node parameters

## ◆ m_origin

QPointF DotGenerator::m_origin
| protected

## ◆ m_scale

double DotGenerator::m_scale
| protected

scale factor

## ◆ m_useFullNodeLabels

bool DotGenerator::m_useFullNodeLabels
| protected

use full node labels

## ◆ m_usePosition

bool DotGenerator::m_usePosition
| protected

use position tag from dot (not used yet)

## ◆ m_version

int DotGenerator::m_version {0}
| protected

version of graphviz generator

The documentation for this class was generated from the following files:

- umbrello/dotgenerator.h
- umbrello/dotgenerator.cpp