umbrello/umbrello
#include <umlviewimageexportermodel.h>
Public Member Functions | |
UMLViewImageExporterModel () | |
virtual | ~UMLViewImageExporterModel () |
QStringList | exportAllViews (const QString &imageType, const KUrl &directory, bool useFolders) const |
QString | exportView (UMLScene *scene, const QString &imageType, const KUrl &url) const |
Static Public Member Functions | |
static QString | imageTypeToMimeType (const QString &imageType) |
static QString | mimeTypeToImageType (const QString &mimeType) |
static QStringList | supportedImageTypes () |
static QStringList | supportedMimeTypes () |
Detailed Description
Exports an UMLView in various image formats.
It can also export all the views in the current document.
The methods in this class don't communicate with the user, so asking the format to save the images in, checking if the target file exists and so on must be done before calling those methods, if needed. The only exception is asking passwords for example when KIO slaves are used, as this operation is made automatically by the KIO classes.
Definition at line 32 of file umlviewimageexportermodel.h.
Constructor & Destructor Documentation
UMLViewImageExporterModel::UMLViewImageExporterModel | ( | ) |
Constructor for UMLViewImageExporterModel.
Definition at line 151 of file umlviewimageexportermodel.cpp.
|
virtual |
Destructor for UMLViewImageExporterModel.
Definition at line 158 of file umlviewimageexportermodel.cpp.
Member Function Documentation
QStringList UMLViewImageExporterModel::exportAllViews | ( | const QString & | imageType, |
const KUrl & | directory, | ||
bool | useFolders | ||
) | const |
Exports all the views in the document to the directory specified in the url using the 'imageType' for the images.
The name of the exported images will be like their view's name and using the 'imageType' as extension.
The views are stored in folders in the document. The same tree structure used in the document to store the views can be created in the target directory with 'useFolders'. Only the folders made by the user are created in the target directory (Logical view, use case view and so on aren't created).
This method creates the specified target directory if needed. If there was an existing file with the same path as one to be created overwrites it without asking. The url used can be local or remote, using supported KIO slaves.
- Parameters
-
imageType The type of the images the views will be exported to. directory The url of the directory where the images will be saved. useFolders If the tree structure of the views in the document must be created in the target directory.
- Returns
- A QStringList with all the error messages that occurred during export. If the list is empty, all the views were exported successfully.
Definition at line 184 of file umlviewimageexportermodel.cpp.
QString UMLViewImageExporterModel::exportView | ( | UMLScene * | scene, |
const QString & | imageType, | ||
const KUrl & | url | ||
) | const |
Exports the view to the url using the 'imageType' for the image.
This method creates the needed directories, if any. If there was an existing file in the specified url overwrites it without asking. The url used can be local or remote, using supported KIO slaves.
If some problem occurs when exporting, an error message is returned.
- Parameters
-
view The view to export. imageType The type of the image the view will be exported to. url The url where the image will be saved.
- Returns
- The message error if some problem occurred when exporting, or QString() if all went fine.
Definition at line 221 of file umlviewimageexportermodel.cpp.
|
static |
Returns the mime type for an image type.
The supported image types are those that the diagrams can be exported to.
- Parameters
-
imageType The type of the image.
- Returns
- A QString with the equivalent mime type, or QString() if it's unknown.
Definition at line 107 of file umlviewimageexportermodel.cpp.
|
static |
Returns the image type for a mime type.
The supported image types are those that the diagrams can be exported to.
- Parameters
-
mimeType The mime type.
- Returns
- A lowercase QString with the equivalent image type, or QString() if it's unknown.
Definition at line 132 of file umlviewimageexportermodel.cpp.
|
static |
Returns a QStringList containing all the supported image types to use when exporting.
All the types will be lower case.
- Returns
- A QStringList containing all the supported image types to use when exporting.
Definition at line 56 of file umlviewimageexportermodel.cpp.
|
static |
Returns a QStringList containing all the supported mime types to use when exporting.
All the types will be lower case.
- Returns
- A QStringList containing all the supported mime types to use when exporting.
Definition at line 85 of file umlviewimageexportermodel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.