umbrello: umbrello/dialogs/umlfiledialog.h Source File

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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

umlfiledialog.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2003-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef UMLFILEDIALOG_H
7#define UMLFILEDIALOG_H
8
9#include <QtGlobal>
10
11#if QT_VERSION >= 0x050000
12#include <QFileDialog>
13#else
14#include <kfiledialog.h>
15#endif
16
26 class UMLFileDialog : public QObject
27{
28 Q_OBJECT
29public:
30#if QT_VERSION >= 0x050000
31 UMLFileDialog(const QUrl &startDir, const QString &filter, QWidget *parent, QWidget *widget=0);
32#else
33 UMLFileDialog(const KUrl &startDir, const QString &filter, QWidget *parent, QWidget *widget=0);
34#endif
35 ~UMLFileDialog();
36
37 int exec();
38 void setCaption(const QString &caption);
39#if QT_VERSION >= 0x050000
40 void setAcceptMode(QFileDialog::AcceptMode mode);
41 void setMimeTypeFilters(const QStringList &filters);
42
43 void selectUrl(const QUrl &url);
44 void setUrl(const QUrl &url);
45 QUrl selectedUrl();
46#else
47 void setOperationMode(KFileDialog::OperationMode mode);
48 void setUrl(const KUrl &url, bool clearforward=true);
49 KUrl selectedUrl();
50#endif
51 void setSelection(const QString &name);
52
53#if QT_VERSION < 0x050000
54 void setMimeFilter(const QStringList &types, const QString &defaultType=QString());
55 QString currentMimeFilter();
56#endif
57
58protected:
59#if QT_VERSION >= 0x050000
60 QFileDialog *m_dialog;
61#else
62 KFileDialog *m_dialog;
63#endif
64};
65
66#endif
UMLFileDialog
Definition: umlfiledialog.h:27
UMLFileDialog::currentMimeFilter
QString currentMimeFilter()
return the mime type of the selected file
Definition: umlfiledialog.cpp:143
UMLFileDialog::m_dialog
KFileDialog * m_dialog
Definition: umlfiledialog.h:62
UMLFileDialog::setMimeFilter
void setMimeFilter(const QStringList &types, const QString &defaultType=QString())
Definition: umlfiledialog.cpp:129
UMLFileDialog::setOperationMode
void setOperationMode(KFileDialog::OperationMode mode)
Definition: umlfiledialog.cpp:109
UMLFileDialog::setSelection
void setSelection(const QString &name)
Definition: umlfiledialog.cpp:124
UMLFileDialog::~UMLFileDialog
~UMLFileDialog()
Definition: umlfiledialog.cpp:53
UMLFileDialog::setUrl
void setUrl(const KUrl &url, bool clearforward=true)
Definition: umlfiledialog.cpp:114
UMLFileDialog::setCaption
void setCaption(const QString &caption)
Definition: umlfiledialog.cpp:104
UMLFileDialog::exec
int exec()
Definition: umlfiledialog.cpp:58
UMLFileDialog::selectedUrl
KUrl selectedUrl()
Definition: umlfiledialog.cpp:119
types
Definition: types.py:1