umbrello: umbrello/umlviewimageexporter.h Source File

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

umlviewimageexporter.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 UMLVIEWIMAGEEXPORTER_H
7 #define UMLVIEWIMAGEEXPORTER_H
8
9 #include "umlviewimageexportermodel.h"
10
11 #if QT_VERSION < 0x050000
12 #include <kurl.h>
13 #endif
14
15 #include <QString>
16 #if QT_VERSION >= 0x050000
17 #include <QUrl>
18 #endif
19
20 class UMLScene;
21 class UMLFileDialog;
22
28 class UMLViewImageExporter
29 {
30 public:
31
32 explicit UMLViewImageExporter(UMLScene* scene);
33 virtual ~UMLViewImageExporter();
34
35 void exportView();
36 #if QT_VERSION >= 0x050000
37 QUrl getImageURL() const { return m_imageURL; }
38 #else
39 KUrl getImageURL() const { return m_imageURL; }
40 #endif
41 QString getImageMimeType() const { return m_imageMimeType; }
42
43 private:
44
45 UMLScene* m_scene;
46 #if QT_VERSION >= 0x050000
47 QUrl m_imageURL;
48 #else
49 KUrl m_imageURL;
50 #endif
51 QString m_imageMimeType;
52
53 bool getParametersFromUser();
54
55 bool prepareExport();
56 void prepareFileDialog(UMLFileDialog *fileDialog);
57
58 };
59
60 #endif
UMLFileDialog
Definition: umlfiledialog.h:27
UMLScene
Definition: umlscene.h:65
UMLViewImageExporter
Definition: umlviewimageexporter.h:29
UMLViewImageExporter::~UMLViewImageExporter
virtual ~UMLViewImageExporter()
Definition: umlviewimageexporter.cpp:53
UMLViewImageExporter::getImageMimeType
QString getImageMimeType() const
Definition: umlviewimageexporter.h:41
UMLViewImageExporter::prepareExport
bool prepareExport()
Definition: umlviewimageexporter.cpp:100
UMLViewImageExporter::getParametersFromUser
bool getParametersFromUser()
Definition: umlviewimageexporter.cpp:144
UMLViewImageExporter::m_imageURL
KUrl m_imageURL
The URL used to save the image.
Definition: umlviewimageexporter.h:49
UMLViewImageExporter::prepareFileDialog
void prepareFileDialog(UMLFileDialog *fileDialog)
Definition: umlviewimageexporter.cpp:185
UMLViewImageExporter::UMLViewImageExporter
UMLViewImageExporter(UMLScene *scene)
Definition: umlviewimageexporter.cpp:44
UMLViewImageExporter::getImageURL
KUrl getImageURL() const
Definition: umlviewimageexporter.h:39
UMLViewImageExporter::exportView
void exportView()
Definition: umlviewimageexporter.cpp:71
UMLViewImageExporter::m_scene
UMLScene * m_scene
The scene to export.
Definition: umlviewimageexporter.h:45
UMLViewImageExporter::m_imageMimeType
QString m_imageMimeType
The mime type used to save the image.
Definition: umlviewimageexporter.h:51
umlviewimageexportermodel.h