umbrello 26.03.70-f7b1fd3 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

Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Private Attributes | List of all members
XhtmlGenerator Class Reference

`#include <xhtmlgenerator.h>`

Inheritance diagram for XhtmlGenerator:

## Signals

void | finished (bool status)

## Public Member Functions

| XhtmlGenerator ()
virtual | ~XhtmlGenerator ()
bool | generateXhtmlForProject ()
bool | generateXhtmlForProjectInto (const QUrl &destDir)

## Static Public Member Functions

static QString | customXslFile ()

## Protected Slots

void | slotDocbookToXhtml (bool status)
void | slotHtmlGenerated (const QString &tmpFileName)
void | threadFinished ()

## Private Attributes

Docbook2XhtmlGeneratorJob * | m_d2xg
bool | m_pStatus
bool | m_pThreadFinished
QUrl | m_destDir
| Destination directory where the final documentation will be written. More...
UMLDoc * | m_umlDoc

## Detailed Description

class XhtmlGenerator is a documentation generator for UML documents. It uses first DocbookGenerator to convert the XMI generated by UMLDoc::saveToXMI1 to docbook and next libxslt through the XSLT file stored in resources to convert the docbook file to XHTML. The latter uses the XSLT available on the Web at http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl

Todo:
  allow to specify the destination and ensure that it works with distant ones

## Constructor & Destructor Documentation

## ◆ XhtmlGenerator()

XhtmlGenerator::XhtmlGenerator | ( |  | ) |

Constructor.

## ◆ ~XhtmlGenerator()

XhtmlGenerator::~XhtmlGenerator | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## ◆ customXslFile()

QString XhtmlGenerator::customXslFile | ( |  | ) |

static

return custom xsl file for generating html

Returns
  filename with path

## ◆ finished

void XhtmlGenerator::finished | ( | bool | status | ) |

signal

## ◆ generateXhtmlForProject()

bool XhtmlGenerator::generateXhtmlForProject | ( |  | ) |

Exports the current model to XHTML in a directory named as the model with the .xmi suffix removed. The XHTML file will have the same name with the .html suffix. Figures will be named as the corresponding diagrams in the GUI

Todo:

  change file naming to avoid paths with spaces or non-ASCII chars

  better handling of error conditions

Returns
  true if saving is successful and false otherwise.

## ◆ generateXhtmlForProjectInto()

bool XhtmlGenerator::generateXhtmlForProjectInto | ( | const QUrl & | destDir | ) |

Exports the current model to XHTML in the given directory

Parameters

  destDir | the directory where the XHTML file and the figures will be written

Todo:
  better handling of error conditions

Returns
  true if saving is successful and false otherwise.

## ◆ slotDocbookToXhtml

void XhtmlGenerator::slotDocbookToXhtml | ( | bool | status | ) |

protected slot

This slot is triggered when the first part, xmi to docbook, is finished

Parameters

  status | status to continue with converting

## ◆ slotHtmlGenerated

void XhtmlGenerator::slotHtmlGenerated | ( | const QString & | tmpFileName | ) |

protected slot

Triggered when the copying of the HTML result file is finished. Emits the signal finished().

Parameters

  tmpFileName | temporary file name

## ◆ threadFinished

void XhtmlGenerator::threadFinished | ( |  | ) |

protected slot

Invoked when a thread is finished

## Member Data Documentation

## ◆ m_d2xg

Docbook2XhtmlGeneratorJob* XhtmlGenerator::m_d2xg

private

## ◆ m_destDir

QUrl XhtmlGenerator::m_destDir

private

Destination directory where the final documentation will be written.

## ◆ m_pStatus

bool XhtmlGenerator::m_pStatus

private

## ◆ m_pThreadFinished

bool XhtmlGenerator::m_pThreadFinished

private

## ◆ m_umlDoc

UMLDoc* XhtmlGenerator::m_umlDoc

private

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

- umbrello/docgenerators/xhtmlgenerator.h
- umbrello/docgenerators/xhtmlgenerator.cpp