umbrello: umbrello/umlviewimageexportermodel.h Source File

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

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
16class KUrl;
17
28 class UMLViewImageExporterModel
29{
30public:
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 QString exportView(UMLScene* scene, const QString &imageType, const QUrl &url) const;
41
42 QStringList exportViews(const UMLViewList &views, const QString &imageType, const QUrl &directory, bool useFolders) const;
43private:
44
45 QString getDiagramFileName(UMLScene* scene, const QString &imageType, bool useFolders = false) const;
46
47 bool prepareDirectory(const QUrl &url) const;
48
49 bool exportViewTo(UMLScene* scene, const QString &imageType, const QString &fileName) const;
50 bool exportViewToDot(UMLScene* scene, const QString &fileName) const;
51 bool exportViewToEps(UMLScene* scene, const QString &fileName) const;
52 bool exportViewToSvg(UMLScene* scene, const QString &fileName) const;
53 bool exportViewToPixmap(UMLScene* scene, const QString &imageType, const QString &fileName) const;
54
55 static QStringList *s_supportedImageTypesList;
56 static QStringList *s_supportedMimeTypesList;
57 float m_resolution;
58};
59
60#endif
UMLScene
Definition umlscene.h:65
UMLViewImageExporterModel::getDiagramFileName
QString getDiagramFileName(UMLScene *scene, const QString &imageType, bool useFolders=false) const
Definition umlviewimageexportermodel.cpp:282
UMLViewImageExporterModel::m_resolution
float m_resolution
Definition umlviewimageexportermodel.h:57
UMLViewImageExporterModel::~UMLViewImageExporterModel
virtual ~UMLViewImageExporterModel()
Definition umlviewimageexportermodel.cpp:173
UMLViewImageExporterModel::supportedImageTypes
static QStringList supportedImageTypes()
Definition umlviewimageexportermodel.cpp:51
UMLViewImageExporterModel::exportViewToPixmap
bool exportViewToPixmap(UMLScene *scene, const QString &imageType, const QString &fileName) const
Definition umlviewimageexportermodel.cpp:506
UMLViewImageExporterModel::exportViewToDot
bool exportViewToDot(UMLScene *scene, const QString &fileName) const
Definition umlviewimageexportermodel.cpp:377
UMLViewImageExporterModel::prepareDirectory
bool prepareDirectory(const QUrl &url) const
Definition umlviewimageexportermodel.cpp:303
UMLViewImageExporterModel::UMLViewImageExporterModel
UMLViewImageExporterModel(float resolution=0.0)
Definition umlviewimageexportermodel.cpp:165
UMLViewImageExporterModel::exportViewToSvg
bool exportViewToSvg(UMLScene *scene, const QString &fileName) const
Definition umlviewimageexportermodel.cpp:452
UMLViewImageExporterModel::s_supportedImageTypesList
static QStringList * s_supportedImageTypesList
Definition umlviewimageexportermodel.h:55
UMLViewImageExporterModel::s_supportedMimeTypesList
static QStringList * s_supportedMimeTypesList
Definition umlviewimageexportermodel.h:56
UMLViewImageExporterModel::exportViews
QStringList exportViews(const UMLViewList &views, const QString &imageType, const QUrl &directory, bool useFolders) const
Definition umlviewimageexportermodel.cpp:200
UMLViewImageExporterModel::mimeTypeToImageType
static QString mimeTypeToImageType(const QString &mimeType)
Definition umlviewimageexportermodel.cpp:137
UMLViewImageExporterModel::exportView
QString exportView(UMLScene *scene, const QString &imageType, const QUrl &url) const
Definition umlviewimageexportermodel.cpp:234
UMLViewImageExporterModel::imageTypeToMimeType
static QString imageTypeToMimeType(const QString &imageType)
Definition umlviewimageexportermodel.cpp:104
UMLViewImageExporterModel::supportedMimeTypes
static QStringList supportedMimeTypes()
Definition umlviewimageexportermodel.cpp:81
UMLViewImageExporterModel::exportViewTo
bool exportViewTo(UMLScene *scene, const QString &imageType, const QString &fileName) const
Definition umlviewimageexportermodel.cpp:337
UMLViewImageExporterModel::exportViewToEps
bool exportViewToEps(UMLScene *scene, const QString &fileName) const
Definition umlviewimageexportermodel.cpp:400
umlscene.h
umlviewlist.h
UMLViewList
QList< QPointer< UMLView > > UMLViewList
Definition umlviewlist.h:16