umbrello: umbrello/dialogs/umlfiledialog.h Source File

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

umlfiledialog.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) 2003-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLFILEDIALOG_H
12 #define UMLFILEDIALOG_H
13
14 #include <QtGlobal>
15
16 #if QT_VERSION >= 0x050000
17 #include <QFileDialog>
18 #else
19 #include <kfiledialog.h>
20 #endif
21
31 class UMLFileDialog : public QObject
32 {
33 Q_OBJECT
34 public:
35 #if QT_VERSION >= 0x050000
36 UMLFileDialog(const QUrl &startDir, const QString &filter, QWidget *parent, QWidget *widget=0);
37 #else
38 UMLFileDialog(const KUrl &startDir, const QString &filter, QWidget *parent, QWidget *widget=0);
39 #endif
40 ~UMLFileDialog();
41
42 int exec();
43 void setCaption(const QString &caption);
44 #if QT_VERSION >= 0x050000
45 void setAcceptMode(QFileDialog::AcceptMode mode);
46 void setMimeTypeFilters(const QStringList &filters);
47
48 void selectUrl(const QUrl &url);
49 void setUrl(const QUrl &url);
50 QUrl selectedUrl();
51 #else
52 void setOperationMode(KFileDialog::OperationMode mode);
53 void setUrl(const KUrl &url, bool clearforward=true);
54 KUrl selectedUrl();
55 #endif
56 void setSelection(const QString &name);
57
58 #if QT_VERSION < 0x050000
59 void setMimeFilter(const QStringList &types, const QString &defaultType=QString());
60 QString currentMimeFilter();
61 #endif
62
63 protected:
64 #if QT_VERSION >= 0x050000
65 QFileDialog *m_dialog;
66 #else
67 KFileDialog *m_dialog;
68 #endif
69 };
70
71 #endif
umlfiledialog.h
UMLFileDialog::currentMimeFilter
QString currentMimeFilter()
return the mime type of the selected file
Definition: umlfiledialog.cpp:148
UMLFileDialog::m_dialog
KFileDialog * m_dialog
Definition: umlfiledialog.h:75
UMLFileDialog::UMLFileDialog
UMLFileDialog(const KUrl &startDir, const QString &filter, QWidget *parent, QWidget *widget=0)
Definition: umlfiledialog.cpp:51
UMLFileDialog::exec
int exec()
Definition: umlfiledialog.cpp:63
umlviewimageexportermodel.h
UMLFileDialog::~UMLFileDialog
~UMLFileDialog()
Definition: umlfiledialog.cpp:58
UMLFileDialog::setUrl
void setUrl(const KUrl &url, bool clearforward=true)
Definition: umlfiledialog.cpp:119
UMLFileDialog::setCaption
void setCaption(const QString &caption)
Definition: umlfiledialog.cpp:109
UMLFileDialog
Definition: umlfiledialog.h:31
UMLFileDialog::setSelection
void setSelection(const QString &name)
Definition: umlfiledialog.cpp:129
UMLFileDialog::selectedUrl
KUrl selectedUrl()
Definition: umlfiledialog.cpp:124
i18n
#define i18n
Definition: main.cpp:39
types
Definition: types.py:1
UMLViewImageExporterModel::imageTypeToMimeType
static QString imageTypeToMimeType(const QString &imageType)
Definition: umlviewimageexportermodel.cpp:119
UMLFileDialog::setOperationMode
void setOperationMode(KFileDialog::OperationMode mode)
Definition: umlfiledialog.cpp:114
mime2KdeFilter
static QStringList mime2KdeFilter(const QStringList &mimeTypes, QString *allExtensions=0)
Definition: umlfiledialog.cpp:22
UMLFileDialog::setMimeFilter
void setMimeFilter(const QStringList &types, const QString &defaultType=QString())
Definition: umlfiledialog.cpp:134