Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKFILENAMEFILTER_P_H
6
#
define
QQUICKFILENAMEFILTER_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qobject
.
h
>
20
#
include
<
QtCore
/
qsharedpointer
.
h
>
21
#
include
<
QtCore
/
qstringlist
.
h
>
22
#
include
<
QtGui
/
qpa
/
qplatformdialoghelper
.
h
>
23
24
#
include
"qtquickdialogs2utilsglobal_p.h"
25
26
QT_BEGIN_NAMESPACE
27
28
class
Q_QUICKDIALOGS2UTILS_EXPORT
QQuickFileNameFilter
:
public
QObject
29
{
30
Q_OBJECT
31
Q_PROPERTY(
int
index READ index WRITE setIndex NOTIFY indexChanged FINAL)
32
Q_PROPERTY(QString name READ name NOTIFY nameChanged FINAL)
33
Q_PROPERTY(QStringList extensions READ extensions NOTIFY extensionsChanged FINAL)
34
Q_PROPERTY(QStringList globs READ globs NOTIFY globsChanged FINAL)
35
36
public
:
37
explicit
QQuickFileNameFilter(QObject *parent =
nullptr
);
38
39
int
index()
const
;
40
void
setIndex(
int
index);
41
42
QString name()
const
;
43
QStringList extensions()
const
;
44
QStringList globs()
const
;
45
46
QSharedPointer<QFileDialogOptions> options()
const
;
47
void
setOptions(
const
QSharedPointer<QFileDialogOptions> &options);
48
49
void
update(
const
QString &filter);
50
51
Q_SIGNALS:
52
void
indexChanged(
int
index);
53
void
nameChanged(
const
QString &name);
54
void
extensionsChanged(
const
QStringList &extensions);
55
void
globsChanged(
const
QStringList &globs);
56
57
private
:
58
QStringList nameFilters()
const
;
59
QString nameFilter(
int
index)
const
;
60
61
int
m_index;
62
QString m_name;
63
QStringList m_extensions;
64
QStringList m_globs;
65
QSharedPointer<QFileDialogOptions> m_options;
66
};
67
68
QT_END_NAMESPACE
69
70
#
endif
// QQUICKFILENAMEFILTER_P_H
QQuickFileNameFilter
Definition
qquickfilenamefilter_p.h:29
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
extractName
static QString extractName(const QString &filter)
Definition
qquickfilenamefilter.cpp:57
extractExtension
static QString extractExtension(QStringView filter)
Definition
qquickfilenamefilter.cpp:62
extractExtensionsAndGlobs
static void extractExtensionsAndGlobs(QStringView filter, QStringList &extensions, QStringList &globs)
Definition
qquickfilenamefilter.cpp:67
qtdeclarative
src
quickdialogs
quickdialogsutils
qquickfilenamefilter_p.h
Generated on
for Qt by
1.18.0