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
qstandardpaths.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QSTANDARDPATHS_H
5#define QSTANDARDPATHS_H
6
7#include <QtCore/qstringlist.h>
8#include <QtCore/qobjectdefs.h>
9
11
12
13#ifndef QT_NO_STANDARDPATHS
14
15class Q_CORE_EXPORT QStandardPaths
16{
18
19public:
45 Q_ENUM(StandardLocation)
46
47 static QString writableLocation(StandardLocation type);
48 static QStringList standardLocations(StandardLocation type);
49
51 LocateFile = 0x0,
52 LocateDirectory = 0x1
53 };
54 Q_DECLARE_FLAGS(LocateOptions, LocateOption)
55 Q_FLAG(LocateOptions)
56
57 static QString locate(StandardLocation type, const QString &fileName, LocateOptions options = LocateFile);
58 static QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options = LocateFile);
59#ifndef QT_BOOTSTRAPPED
60 static QString displayName(StandardLocation type);
61#endif
62
63 static QString findExecutable(const QString &executableName, const QStringList &paths = QStringList());
64
65 static void setTestModeEnabled(bool testMode);
66 static bool isTestModeEnabled();
67
68private:
69 // prevent construction
72};
73
74Q_DECLARE_OPERATORS_FOR_FLAGS(QStandardPaths::LocateOptions)
75
76#endif // QT_NO_STANDARDPATHS
77
79
80#endif // QSTANDARDPATHS_H
\inmodule QtCore
LocateOption
This enum describes the different flags that can be used for controlling the behavior of QStandardPat...
StandardLocation
This enum describes the different locations that can be queried using methods such as QStandardPaths:...
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
static QString displayName(CGDirectDisplayID displayID)
QList< QString > QStringList
Constructs a string list that contains the given string, str.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
GLenum type
GLsizei const GLuint * paths
#define Q_ENUM(x)
#define Q_FLAG(x)
#define Q_GADGET