umbrello: UMLViewImageExporter Class Reference

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

Public Member Functions | Private Member Functions | Private Attributes | List of all members
UMLViewImageExporter Class Reference

`#include <umlviewimageexporter.h>`

## Public Member Functions
| UMLViewImageExporter (UMLScene *scene)
virtual | ~UMLViewImageExporter ()
void | exportView ()
KUrl | getImageURL () const
QString | getImageMimeType () const

## Private Member Functions
bool | getParametersFromUser ()
bool | prepareExport ()
void | prepareFileDialog (UMLFileDialog *fileDialog)

## Private Attributes
UMLScene * | m_scene
| The scene to export. More...
KUrl | m_imageURL
| The URL used to save the image. More...
QString | m_imageMimeType
| The mime type used to save the image. More...

## Detailed Description

Exports the scene as an image. This class takes care of asking the user the needed parameters and then exports the scene.

## Constructor & Destructor Documentation

## ◆ UMLViewImageExporter()

UMLViewImageExporter::UMLViewImageExporter | ( | UMLScene * | scene | ) |
| explicit

Constructor for UMLViewImageExporter.

## ◆ ~UMLViewImageExporter()

UMLViewImageExporter::~UMLViewImageExporter | ( |  | ) |
| virtual

Destructor for UMLViewImageExporter

## Member Function Documentation

## ◆ exportView()

void UMLViewImageExporter::exportView | ( |  | ) |

Shows a save dialog to the user to get the needed parameters and then exports the view. If the selected file already exists, an overwrite confirmation dialog is shown. If the user doesn't want to overwrite the file, the save dialog is shown again. The dialog remembers values between calls (in the same application instance, although it's not persistent between Umbrello executions).

The status bar shows an information message until the export finishes.

If something went wrong while exporting, an error dialog is shown to the user with the error message explaining the problem that happened.

## ◆ getImageMimeType()

QString UMLViewImageExporter::getImageMimeType | ( |  | ) | const
| inline

## ◆ getImageURL()

KUrl UMLViewImageExporter::getImageURL | ( |  | ) | const
| inline

## ◆ getParametersFromUser()

bool UMLViewImageExporter::getParametersFromUser | ( |  | ) |
| private

Shows a save file dialog to the user to get the parameters used to export the view and updates the attributes with the parameters got.

Returns
  True if the user wants to save the image, false if the operation is cancelled.

## ◆ prepareExport()

bool UMLViewImageExporter::prepareExport | ( |  | ) |
| private

Shows a save file dialog to the user to get the parameters used to export the scene. If the selected file already exists, an overwrite confirmation dialog is shown. If the user doesn't want to overwrite the file, the save dialog is shown again.

Returns
  True if the user wants to save the image, false if the operation is cancelled.

## ◆ prepareFileDialog()

void UMLViewImageExporter::prepareFileDialog | ( | UMLFileDialog * | fileDialog | ) |
| private

Prepares the save file dialog. Sets the mime type filter, sensible default values...

Parameters

  fileDialog | The dialog to prepare.

## Member Data Documentation

## ◆ m_imageMimeType

QString UMLViewImageExporter::m_imageMimeType
| private

The mime type used to save the image.

## ◆ m_imageURL

KUrl UMLViewImageExporter::m_imageURL
| private

The URL used to save the image.

## ◆ m_scene

UMLScene* UMLViewImageExporter::m_scene
| private

The scene to export.

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

- umbrello/umlviewimageexporter.h
- umbrello/umlviewimageexporter.cpp