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  * 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 
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 
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 
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
Definition: umlfiledialog.h:32
Definition: umlscene.h:70
Definition: umlviewimageexporter.h:34
virtual ~UMLViewImageExporter()
Definition: umlviewimageexporter.cpp:58
QString getImageMimeType() const
Definition: umlviewimageexporter.h:46
bool prepareExport()
Definition: umlviewimageexporter.cpp:105
bool getParametersFromUser()
Definition: umlviewimageexporter.cpp:149
KUrl m_imageURL
The URL used to save the image.
Definition: umlviewimageexporter.h:54
void prepareFileDialog(UMLFileDialog *fileDialog)
Definition: umlviewimageexporter.cpp:190
UMLViewImageExporter(UMLScene *scene)
Definition: umlviewimageexporter.cpp:49
KUrl getImageURL() const
Definition: umlviewimageexporter.h:44
void exportView()
Definition: umlviewimageexporter.cpp:76
UMLScene * m_scene
The scene to export.
Definition: umlviewimageexporter.h:50
QString m_imageMimeType
The mime type used to save the image.
Definition: umlviewimageexporter.h:56