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.h
UMLViewImageExporter::~UMLViewImageExporter
virtual ~UMLViewImageExporter()
Definition: umlviewimageexporter.cpp:58
UMLDoc::url
const KUrl & url() const
Definition: umldoc.cpp:331
UMLViewImageExporter::prepareFileDialog
void prepareFileDialog(UMLFileDialog *fileDialog)
Definition: umlviewimageexporter.cpp:190
UMLViewImageExporterModel::exportView
QString exportView(UMLScene *scene, const QString &imageType, const KUrl &url) const
Definition: umlviewimageexportermodel.cpp:256
UMLViewImageExporter::m_scene
UMLScene * m_scene
The scene to export.
Definition: umlviewimageexporter.h:50
umlviewimageexportermodel.h
UMLViewImageExporterModel
Definition: umlviewimageexportermodel.h:34
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
UMLApp::imageMimeType
QString imageMimeType() const
Definition: uml.cpp:3185
DBG_IE
#define DBG_IE
Definition: umlviewimageexporter.cpp:43
UMLViewImageExporter::getParametersFromUser
bool getParametersFromUser()
Definition: umlviewimageexporter.cpp:149
UMLViewImageExporter::getImageMimeType
QString getImageMimeType() const
Definition: umlviewimageexporter.h:46
UMLFileDialog::setUrl
void setUrl(const KUrl &url, bool clearforward=true)
Definition: umlfiledialog.cpp:119
UMLScene::clearSelected
void clearSelected()
Definition: umlscene.cpp:1456
UMLFileDialog::setCaption
void setCaption(const QString &caption)
Definition: umlfiledialog.cpp:109
UMLFileDialog
Definition: umlfiledialog.h:32
UMLFileDialog::setSelection
void setSelection(const QString &name)
Definition: umlfiledialog.cpp:129
UMLApp
Definition: uml.h:100
UMLViewImageExporterModel::mimeTypeToImageType
static QString mimeTypeToImageType(const QString &mimeType)
Definition: umlviewimageexportermodel.cpp:152
i18n
#define i18n
Definition: main.cpp:39
UMLApp::setImageMimeType
void setImageMimeType(const QString &mimeType)
Definition: uml.cpp:3175
UMLDoc::writeToStatusBar
void writeToStatusBar(const QString &text)
Definition: umldoc.cpp:1208
umlviewimageexporter.h
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLViewImageExporter::getImageURL
KUrl getImageURL() const
Definition: umlviewimageexporter.h:44
DEBUG
#define DEBUG(src)
Definition: debug_utils.h:129
umlscene.h
uml.h
DotGenerator::availableConfigFiles
static bool availableConfigFiles(UMLScene *scene, QHash< QString, QString > &configFiles)
Definition: dotgenerator.cpp:248
UMLViewImageExporterModel::imageTypeToMimeType
static QString imageTypeToMimeType(const QString &imageType)
Definition: umlviewimageexportermodel.cpp:119
UMLViewImageExporter::m_imageURL
KUrl m_imageURL
The URL used to save the image.
Definition: umlviewimageexporter.h:54
debug_utils.h
UMLViewImageExporter::exportView
void exportView()
Definition: umlviewimageexporter.cpp:76
UMLScene::name
QString name() const
Definition: umlscene.cpp:410
UMLViewImageExporter::m_imageMimeType
QString m_imageMimeType
The mime type used to save the image.
Definition: umlviewimageexporter.h:56
UMLScene
Definition: umlscene.h:69
UMLFileDialog::setOperationMode
void setOperationMode(KFileDialog::OperationMode mode)
Definition: umlfiledialog.cpp:114
UMLViewImageExporter
Definition: umlviewimageexporter.h:34
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
UMLViewImageExporter::prepareExport
bool prepareExport()
Definition: umlviewimageexporter.cpp:105
UMLViewImageExporterModel::supportedMimeTypes
static QStringList supportedMimeTypes()
Definition: umlviewimageexportermodel.cpp:97
UMLViewImageExporter::UMLViewImageExporter
UMLViewImageExporter(UMLScene *scene)
Definition: umlviewimageexporter.cpp:49
dotgenerator.h
UMLFileDialog::setMimeFilter
void setMimeFilter(const QStringList &types, const QString &defaultType=QString())
Definition: umlfiledialog.cpp:134