umbrello: umbrello/umlviewimageexporter.h Source File

umbrello 2.32.3 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 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2006-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLVIEWIMAGEEXPORTER_H
12 #define UMLVIEWIMAGEEXPORTER_H
13
14 #include "umlviewimageexportermodel.h"
15
16 #if QT_VERSION < 0x050000
17 #include <kurl.h>
18 #endif
19
20 #include <QString>
21 #if QT_VERSION >= 0x050000
22 #include <QUrl>
23 #endif
24
25 class UMLScene;
26 class UMLFileDialog;
27
33 class UMLViewImageExporter
34 {
35 public:
36
37 explicit UMLViewImageExporter(UMLScene* scene);
38 virtual ~UMLViewImageExporter();
39
40 void exportView();
41 #if QT_VERSION >= 0x050000
42 QUrl getImageURL() const { return m_imageURL; }
43 #else
44 KUrl getImageURL() const { return m_imageURL; }
45 #endif
46 QString getImageMimeType() const { return m_imageMimeType; }
47
48 private:
49
50 UMLScene* m_scene;
51 #if QT_VERSION >= 0x050000
52 QUrl m_imageURL;
53 #else
54 KUrl m_imageURL;
55 #endif
56 QString m_imageMimeType;
57
58 bool getParametersFromUser();
59
60 bool prepareExport();
61 void prepareFileDialog(UMLFileDialog *fileDialog);
62
63 };
64
65 #endif
UMLFileDialog
Definition: umlfiledialog.h:32
UMLScene
Definition: umlscene.h:69
UMLViewImageExporter
Definition: umlviewimageexporter.h:34
UMLViewImageExporter::~UMLViewImageExporter
virtual ~UMLViewImageExporter()
Definition: umlviewimageexporter.cpp:58
UMLViewImageExporter::getImageMimeType
QString getImageMimeType() const
Definition: umlviewimageexporter.h:46
UMLViewImageExporter::prepareExport
bool prepareExport()
Definition: umlviewimageexporter.cpp:105
UMLViewImageExporter::getParametersFromUser
bool getParametersFromUser()
Definition: umlviewimageexporter.cpp:149
UMLViewImageExporter::m_imageURL
KUrl m_imageURL
The URL used to save the image.
Definition: umlviewimageexporter.h:54
UMLViewImageExporter::prepareFileDialog
void prepareFileDialog(UMLFileDialog *fileDialog)
Definition: umlviewimageexporter.cpp:190
UMLViewImageExporter::UMLViewImageExporter
UMLViewImageExporter(UMLScene *scene)
Definition: umlviewimageexporter.cpp:49
UMLViewImageExporter::getImageURL
KUrl getImageURL() const
Definition: umlviewimageexporter.h:44
UMLViewImageExporter::exportView
void exportView()
Definition: umlviewimageexporter.cpp:76
UMLViewImageExporter::m_scene
UMLScene * m_scene
The scene to export.
Definition: umlviewimageexporter.h:50
UMLViewImageExporter::m_imageMimeType
QString m_imageMimeType
The mime type used to save the image.
Definition: umlviewimageexporter.h:56
umlviewimageexportermodel.h