diff options
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.h')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h index 70e498a2cd..95209bceb5 100644 --- a/src/widgets/dialogs/qfiledialog.h +++ b/src/widgets/dialogs/qfiledialog.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtWidgets module of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -55,7 +55,6 @@ class QAbstractProxyModel; class Q_WIDGETS_EXPORT QFileDialog : public QDialog { Q_OBJECT - Q_ENUMS(ViewMode FileMode AcceptMode Option) Q_FLAGS(Options) Q_PROPERTY(ViewMode viewMode READ viewMode WRITE setViewMode) Q_PROPERTY(FileMode fileMode READ fileMode WRITE setFileMode) @@ -70,8 +69,11 @@ class Q_WIDGETS_EXPORT QFileDialog : public QDialog public: enum ViewMode { Detail, List }; + Q_ENUM(ViewMode) enum FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly }; + Q_ENUM(FileMode) enum AcceptMode { AcceptOpen, AcceptSave }; + Q_ENUM(AcceptMode) enum DialogLabel { LookIn, FileName, FileType, Accept, Reject }; enum Option @@ -85,6 +87,7 @@ public: HideNameFilterDetails = 0x00000040, DontUseCustomDirectoryIcons = 0x00000080 }; + Q_ENUM(Option) Q_DECLARE_FLAGS(Options, Option) QFileDialog(QWidget *parent, Qt::WindowFlags f); @@ -116,9 +119,11 @@ public: void selectNameFilter(const QString &filter); QString selectedNameFilter() const; +#ifndef QT_NO_MIMETYPE void setMimeTypeFilters(const QStringList &filters); QStringList mimeTypeFilters() const; void selectMimeTypeFilter(const QString &filter); +#endif QDir::Filters filter() const; void setFilter(QDir::Filters filters); @@ -172,15 +177,9 @@ public: void setOptions(Options options); Options options() const; -#ifdef Q_NO_USING_KEYWORD -#ifndef Q_QDOC - void open() { QDialog::open(); } -#endif -#else using QDialog::open; -#endif void open(QObject *receiver, const char *member); - void setVisible(bool visible); + void setVisible(bool visible) Q_DECL_OVERRIDE; Q_SIGNALS: void fileSelected(const QString &file); @@ -256,9 +255,9 @@ public: protected: QFileDialog(const QFileDialogArgs &args); - void done(int result); - void accept(); - void changeEvent(QEvent *e); + void done(int result) Q_DECL_OVERRIDE; + void accept() Q_DECL_OVERRIDE; + void changeEvent(QEvent *e) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(QFileDialog) @@ -292,7 +291,8 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_autoCompleteFileName(const QString &text)) Q_PRIVATE_SLOT(d_func(), void _q_rowsInserted(const QModelIndex & parent)) Q_PRIVATE_SLOT(d_func(), void _q_fileRenamed(const QString &path, - const QString oldName, const QString newName)) + const QString &oldName, + const QString &newName)) friend class QPlatformDialogHelper; }; |