Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickfilenamefilter_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKFILENAMEFILTER_P_H
5#define QQUICKFILENAMEFILTER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qobject.h>
19#include <QtCore/qsharedpointer.h>
20#include <QtCore/qstringlist.h>
21#include <QtGui/qpa/qplatformdialoghelper.h>
22
24
26
27class Q_QUICKDIALOGS2UTILS_EXPORT QQuickFileNameFilter : public QObject
28{
30 Q_PROPERTY(int index READ index WRITE setIndex NOTIFY indexChanged FINAL)
31 Q_PROPERTY(QString name READ name NOTIFY nameChanged FINAL)
32 Q_PROPERTY(QStringList extensions READ extensions NOTIFY extensionsChanged FINAL)
33 Q_PROPERTY(QStringList globs READ globs NOTIFY globsChanged FINAL)
34
35public:
36 explicit QQuickFileNameFilter(QObject *parent = nullptr);
37
38 int index() const;
39 void setIndex(int index);
40
41 QString name() const;
42 QStringList extensions() const;
43 QStringList globs() const;
44
45 QSharedPointer<QFileDialogOptions> options() const;
46 void setOptions(const QSharedPointer<QFileDialogOptions> &options);
47
48 void update(const QString &filter);
49
51 void indexChanged(int index);
52 void nameChanged(const QString &name);
53 void extensionsChanged(const QStringList &extensions);
54 void globsChanged(const QStringList &globs);
55
57 QStringList nameFilters() const;
58 QString nameFilter(int index) const;
59
60 int m_index;
61 QString m_name;
62 QStringList m_extensions;
63 QStringList m_globs;
65};
66
68
69#endif // QQUICKFILENAMEFILTER_P_H
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
SharedPointerFileDialogOptions m_options
static void setIndex(int *index, int candidate, int min, int max, bool isIncreasing)
Definition qmdiarea.cpp:175
GLuint index
[2]
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint name
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
#define explicit