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

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

- File List
- File Members

umlviewimageexportermodel.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef UMLVIEWIMAGEEXPORTERMODEL_H
7#define UMLVIEWIMAGEEXPORTERMODEL_H
8
9#include "umlscene.h"
10#include "umlviewlist.h"
11
12#include <QStringList>
13#include <QRect>
14
15// forward declarations
16 class KUrl;
17
28 class UMLViewImageExporterModel
29{
30 public:
31
32 static QStringList supportedImageTypes();
33 static QStringList supportedMimeTypes();
34
35 static QString imageTypeToMimeType(const QString& imageType);
36 static QString mimeTypeToImageType(const QString& mimeType);
37
38 explicit UMLViewImageExporterModel(float resolution = 0.0);
39 virtual ~UMLViewImageExporterModel();
40#if QT_VERSION >= 0x050000
41 QString exportView(UMLScene* scene, const QString &imageType, const QUrl &url) const;
42#else
43 QString exportView(UMLScene* scene, const QString &imageType, const KUrl &url) const;
44#endif
45
46 QStringList exportViews(const UMLViewList &views, const QString &imageType, const QUrl &directory, bool useFolders) const;
47 private:
48
49 QString getDiagramFileName(UMLScene* scene, const QString &imageType, bool useFolders = false) const;
50
51#if QT_VERSION >= 0x050000
52 bool prepareDirectory(const QUrl &url) const;
53#else
54 bool prepareDirectory(const KUrl &url) const;
55#endif
56
57 bool exportViewTo(UMLScene* scene, const QString &imageType, const QString &fileName) const;
58 bool exportViewToDot(UMLScene* scene, const QString &fileName) const;
59 bool exportViewToEps(UMLScene* scene, const QString &fileName) const;
60 bool exportViewToSvg(UMLScene* scene, const QString &fileName) const;
61 bool exportViewToPixmap(UMLScene* scene, const QString &imageType, const QString &fileName) const;
62
63 static QStringList *s_supportedImageTypesList;
64 static QStringList *s_supportedMimeTypesList;
65 float m_resolution;
66};
67
68#endif
UMLScene
Definition: umlscene.h:65
UMLViewImageExporterModel
Definition: umlviewimageexportermodel.h:29
UMLViewImageExporterModel::getDiagramFileName
QString getDiagramFileName(UMLScene *scene, const QString &imageType, bool useFolders=false) const
Definition: umlviewimageexportermodel.cpp:314
UMLViewImageExporterModel::m_resolution
float m_resolution
Definition: umlviewimageexportermodel.h:65
UMLViewImageExporterModel::~UMLViewImageExporterModel
virtual ~UMLViewImageExporterModel()
Definition: umlviewimageexportermodel.cpp:184
UMLViewImageExporterModel::exportView
QString exportView(UMLScene *scene, const QString &imageType, const KUrl &url) const
Definition: umlviewimageexportermodel.cpp:253
UMLViewImageExporterModel::supportedImageTypes
static QStringList supportedImageTypes()
Definition: umlviewimageexportermodel.cpp:62
UMLViewImageExporterModel::exportViewToPixmap
bool exportViewToPixmap(UMLScene *scene, const QString &imageType, const QString &fileName) const
Definition: umlviewimageexportermodel.cpp:564
UMLViewImageExporterModel::exportViewToDot
bool exportViewToDot(UMLScene *scene, const QString &fileName) const
Definition: umlviewimageexportermodel.cpp:431
UMLViewImageExporterModel::exportViewToSvg
bool exportViewToSvg(UMLScene *scene, const QString &fileName) const
Definition: umlviewimageexportermodel.cpp:510
UMLViewImageExporterModel::s_supportedImageTypesList
static QStringList * s_supportedImageTypesList
Definition: umlviewimageexportermodel.h:63
UMLViewImageExporterModel::s_supportedMimeTypesList
static QStringList * s_supportedMimeTypesList
Definition: umlviewimageexportermodel.h:64
UMLViewImageExporterModel::exportViews
QStringList exportViews(const UMLViewList &views, const QString &imageType, const QUrl &directory, bool useFolders) const
Definition: umlviewimageexportermodel.cpp:211
UMLViewImageExporterModel::mimeTypeToImageType
static QString mimeTypeToImageType(const QString &mimeType)
Definition: umlviewimageexportermodel.cpp:148
UMLViewImageExporterModel::prepareDirectory
bool prepareDirectory(const KUrl &url) const
Definition: umlviewimageexportermodel.cpp:338
UMLViewImageExporterModel::imageTypeToMimeType
static QString imageTypeToMimeType(const QString &imageType)
Definition: umlviewimageexportermodel.cpp:115
UMLViewImageExporterModel::supportedMimeTypes
static QStringList supportedMimeTypes()
Definition: umlviewimageexportermodel.cpp:92
UMLViewImageExporterModel::exportViewTo
bool exportViewTo(UMLScene *scene, const QString &imageType, const QString &fileName) const
Definition: umlviewimageexportermodel.cpp:391
UMLViewImageExporterModel::exportViewToEps
bool exportViewToEps(UMLScene *scene, const QString &fileName) const
Definition: umlviewimageexportermodel.cpp:454
umlscene.h
umlviewlist.h
UMLViewList
QList< QPointer< UMLView > > UMLViewList
Definition: umlviewlist.h:16