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
qqmlstandardpaths_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 QQMLSTANDARDPATHS_P_H
6#define QQMLSTANDARDPATHS_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/qstandardpaths.h>
21#include <QtCore/qurl.h>
22#include <QtQml/qqml.h>
23#include <QtQmlCore/private/qqmlcoreglobal_p.h>
24
25QT_BEGIN_NAMESPACE
26
27class QQmlEngine;
28class QJSEngine;
29
30class Q_QMLCORE_EXPORT QQmlStandardPaths : public QObject
31{
32 Q_OBJECT
33 QML_SINGLETON
34 QML_NAMED_ELEMENT(StandardPaths)
35 QML_ADDED_IN_VERSION(6, 2)
36 QML_EXTENDED_NAMESPACE(QStandardPaths)
37
38public:
39 explicit QQmlStandardPaths(QObject *parent = nullptr);
40
41 Q_INVOKABLE QString displayName(QStandardPaths::StandardLocation type) const;
42 Q_INVOKABLE QUrl findExecutable(const QString &executableName, const QStringList &paths = QStringList()) const;
43 Q_INVOKABLE QUrl locate(QStandardPaths::StandardLocation type, const QString &fileName,
44 QStandardPaths::LocateOptions options = QStandardPaths::LocateFile) const;
45 Q_INVOKABLE QList<QUrl> locateAll(QStandardPaths::StandardLocation type, const QString &fileName,
46 QStandardPaths::LocateOptions options = QStandardPaths::LocateFile) const;
47 Q_INVOKABLE QList<QUrl> standardLocations(QStandardPaths::StandardLocation type) const;
48 Q_INVOKABLE QUrl writableLocation(QStandardPaths::StandardLocation type) const;
49};
50
51QT_END_NAMESPACE
52
53#endif // QQMLSTANDARDPATHS_P_H
friend class QJSEngine
static QT_BEGIN_NAMESPACE QList< QUrl > toUrlList(const QStringList &paths)
\qmltype StandardPaths \inherits QtObject \inqmlmodule QtCore