Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/kdeplatformfiledialoghelper.h
Show All 27 Lines | |||||
28 | class QDialogButtonBox; | 28 | class QDialogButtonBox; | ||
29 | class KDEPlatformFileDialog : public KDEPlatformFileDialogBase | 29 | class KDEPlatformFileDialog : public KDEPlatformFileDialogBase | ||
30 | { | 30 | { | ||
31 | Q_OBJECT | 31 | Q_OBJECT | ||
32 | public: | 32 | public: | ||
33 | friend class KDEPlatformFileDialogHelper; | 33 | friend class KDEPlatformFileDialogHelper; | ||
34 | 34 | | |||
35 | explicit KDEPlatformFileDialog(); | 35 | explicit KDEPlatformFileDialog(); | ||
36 | QUrl directory() Q_DECL_OVERRIDE; | 36 | QUrl directory() override; | ||
37 | void selectMimeTypeFilter(const QString &filter) Q_DECL_OVERRIDE; | 37 | void selectMimeTypeFilter(const QString &filter) override; | ||
38 | void selectNameFilter(const QString &filter) Q_DECL_OVERRIDE; | 38 | void selectNameFilter(const QString &filter) override; | ||
39 | void setDirectory(const QUrl &directory) Q_DECL_OVERRIDE; | 39 | void setDirectory(const QUrl &directory) override; | ||
40 | void selectFile(const QUrl &filename) Q_DECL_OVERRIDE; | 40 | void selectFile(const QUrl &filename) override; | ||
41 | void setViewMode(QFileDialogOptions::ViewMode view); | 41 | void setViewMode(QFileDialogOptions::ViewMode view); | ||
42 | void setFileMode(QFileDialogOptions::FileMode mode); | 42 | void setFileMode(QFileDialogOptions::FileMode mode); | ||
43 | void setCustomLabel(QFileDialogOptions::DialogLabel label, const QString & text); | 43 | void setCustomLabel(QFileDialogOptions::DialogLabel label, const QString & text); | ||
44 | QString selectedMimeTypeFilter() Q_DECL_OVERRIDE; | 44 | QString selectedMimeTypeFilter() override; | ||
45 | QString selectedNameFilter() Q_DECL_OVERRIDE; | 45 | QString selectedNameFilter() override; | ||
46 | QList<QUrl> selectedFiles() Q_DECL_OVERRIDE; | 46 | QList<QUrl> selectedFiles() override; | ||
47 | 47 | | |||
48 | protected: | 48 | protected: | ||
49 | KFileWidget *m_fileWidget; | 49 | KFileWidget *m_fileWidget; | ||
50 | }; | 50 | }; | ||
51 | 51 | | |||
52 | class KDEPlatformFileDialogHelper : public QPlatformFileDialogHelper | 52 | class KDEPlatformFileDialogHelper : public QPlatformFileDialogHelper | ||
53 | { | 53 | { | ||
54 | Q_OBJECT | 54 | Q_OBJECT | ||
55 | public: | 55 | public: | ||
56 | KDEPlatformFileDialogHelper(); | 56 | KDEPlatformFileDialogHelper(); | ||
57 | virtual ~KDEPlatformFileDialogHelper(); | 57 | virtual ~KDEPlatformFileDialogHelper(); | ||
58 | 58 | | |||
59 | void initializeDialog(); | 59 | void initializeDialog(); | ||
60 | 60 | | |||
61 | bool defaultNameFilterDisables() const Q_DECL_OVERRIDE; | 61 | bool defaultNameFilterDisables() const override; | ||
62 | QUrl directory() const Q_DECL_OVERRIDE; | 62 | QUrl directory() const override; | ||
63 | QList<QUrl> selectedFiles() const Q_DECL_OVERRIDE; | 63 | QList<QUrl> selectedFiles() const override; | ||
64 | #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) | 64 | #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) | ||
65 | QString selectedMimeTypeFilter() const Q_DECL_OVERRIDE; | 65 | QString selectedMimeTypeFilter() const override; | ||
66 | void selectMimeTypeFilter(const QString &filter) Q_DECL_OVERRIDE; | 66 | void selectMimeTypeFilter(const QString &filter) override; | ||
67 | #endif | 67 | #endif | ||
68 | QString selectedNameFilter() const Q_DECL_OVERRIDE; | 68 | QString selectedNameFilter() const override; | ||
69 | void selectNameFilter(const QString &filter) Q_DECL_OVERRIDE; | 69 | void selectNameFilter(const QString &filter) override; | ||
70 | void selectFile(const QUrl &filename) Q_DECL_OVERRIDE; | 70 | void selectFile(const QUrl &filename) override; | ||
71 | void setFilter() Q_DECL_OVERRIDE; | 71 | void setFilter() override; | ||
72 | void setDirectory(const QUrl &directory) Q_DECL_OVERRIDE; | 72 | void setDirectory(const QUrl &directory) override; | ||
73 | bool isSupportedUrl(const QUrl& url) const Q_DECL_OVERRIDE; | 73 | bool isSupportedUrl(const QUrl& url) const override; | ||
74 | 74 | | |||
75 | void exec() Q_DECL_OVERRIDE; | 75 | void exec() override; | ||
76 | void hide() Q_DECL_OVERRIDE; | 76 | void hide() override; | ||
77 | bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) Q_DECL_OVERRIDE; | 77 | bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override; | ||
78 | 78 | | |||
79 | private Q_SLOTS: | 79 | private Q_SLOTS: | ||
80 | void saveSize(); | 80 | void saveSize(); | ||
81 | 81 | | |||
82 | private: | 82 | private: | ||
83 | void restoreSize(); | 83 | void restoreSize(); | ||
84 | KDEPlatformFileDialogBase *m_dialog; | 84 | KDEPlatformFileDialogBase *m_dialog; | ||
85 | }; | 85 | }; | ||
86 | 86 | | |||
87 | #endif // KDEPLATFORMFILEDIALOGHELPER_H | 87 | #endif // KDEPLATFORMFILEDIALOGHELPER_H |