Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
25QT_BEGIN_NAMESPACE
26
27namespace LocalFileApi {
28class Q_AUTOTEST_EXPORT Type
29{
30public:
31 class Accept {
32 public:
33 class MimeType {
34 public:
35 class Extension {
36 public:
38
40
41 const QStringView &value() const { return m_value; }
42
43 private:
45
47 };
48
51
53
54 const std::vector<Extension> &extensions() const { return m_extensions; }
55
56 private:
58 };
59
61
63
65
66 const MimeType &mimeType() const { return m_mimeType; }
67
68 private:
69 Accept();
71 };
72
74 ~Type();
75
77 const QStringView &description() const { return m_description; }
78 const std::optional<Accept> &accept() const { return m_accept; }
79
80private:
83};
84
86 bool acceptMultiple);
88 const std::string &suggestedName);
89
90Q_AUTOTEST_EXPORT std::string makeFileInputAccept(const QStringList &filterList);
91
92} // namespace LocalFileApi
93QT_END_NAMESPACE
94
95#endif // QLOCALFILEAPI_P_H
std::string makeFileInputAccept(const QStringList &filterList)
emscripten::val makeOpenFileOptions(const QStringList &filterList, bool acceptMultiple)
emscripten::val makeSaveFileOptions(const QStringList &filterList, const std::string &suggestedName)
Combined button and popup list for selecting options.