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
qlocalfileapi_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 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
QLOCALFILEAPI_P_H
6
#
define
QLOCALFILEAPI_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
<
private
/
qglobal_p
.
h
>
20
#
include
<
qstringview
.
h
>
21
#
include
<
emscripten
/
val
.
h
>
22
#
include
<
cstdint
>
23
#
include
<
functional
>
24
25
QT_BEGIN_NAMESPACE
26
27
namespace
LocalFileApi
{
28
class
Q_AUTOTEST_EXPORT
Type
29
{
30
public
:
31
class
Accept
{
32
public
:
33
class
MimeType
{
34
public
:
35
class
Extension
{
36
public
:
37
static
std
::
optional
<
Extension
>
fromQt
(
QStringView
extension
);
38
39
~
Extension
();
40
41
const
QStringView
&
value
()
const
{
return
m_value
; }
42
43
private
:
44
explicit
Extension
(
QStringView
extension
);
45
46
QStringView
m_value
;
47
};
48
49
MimeType
();
50
~
MimeType
();
51
52
void
addExtension
(
Extension
type
);
53
54
const
std
::
vector
<
Extension
> &
extensions
()
const
{
return
m_extensions
; }
55
56
private
:
57
std
::
vector
<
Extension
>
m_extensions
;
58
};
59
60
static
std
::
optional
<
Accept
>
fromQt
(
QStringView
type
);
61
62
~
Accept
();
63
64
void
setMimeType
(
MimeType
mimeType
);
65
66
const
MimeType
&
mimeType
()
const
{
return
m_mimeType
; }
67
68
private
:
69
Accept
();
70
MimeType
m_mimeType
;
71
};
72
73
Type
(
QStringView
description
,
std
::
optional
<
Accept
>
accept
);
74
~
Type
();
75
76
static
std
::
optional
<
Type
>
fromQt
(
QStringView
type
);
77
const
QStringView
&
description
()
const
{
return
m_description
; }
78
const
std
::
optional
<
Accept
> &
accept
()
const
{
return
m_accept
; }
79
80
private
:
81
QStringView
m_description
;
82
std
::
optional
<
Accept
>
m_accept
;
83
};
84
85
Q_AUTOTEST_EXPORT
emscripten
::
val
makeOpenFileOptions
(
const
QStringList
&
filterList
,
86
bool
acceptMultiple
);
87
Q_AUTOTEST_EXPORT
emscripten
::
val
makeSaveFileOptions
(
const
QStringList
&
filterList
,
88
const
std
::
string
&
suggestedName
);
89
90
Q_AUTOTEST_EXPORT
std
::string
makeFileInputAccept
(
const
QStringList
&
filterList
);
91
92
}
// namespace LocalFileApi
93
QT_END_NAMESPACE
94
95
#
endif
// QLOCALFILEAPI_P_H
LocalFileApi::Type
Definition
qlocalfileapi_p.h:29
LocalFileApi
Definition
qlocalfileapi.cpp:10
LocalFileApi::makeFileInputAccept
std::string makeFileInputAccept(const QStringList &filterList)
Definition
qlocalfileapi.cpp:205
LocalFileApi::makeOpenFileOptions
emscripten::val makeOpenFileOptions(const QStringList &filterList, bool acceptMultiple)
Definition
qlocalfileapi.cpp:179
LocalFileApi::makeSaveFileOptions
emscripten::val makeSaveFileOptions(const QStringList &filterList, const std::string &suggestedName)
Definition
qlocalfileapi.cpp:192
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtbase
src
gui
platform
wasm
qlocalfileapi_p.h
Generated on
for Qt by
1.18.0