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
qquickplatformtheme.cpp
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
4
#include "
qquickplatformtheme_p.h
"
5
6
#include <QtGui/private/qguiapplication_p.h>
7
8
QT_BEGIN_NAMESPACE
9
16
QQuickPlatformTheme::QQuickPlatformTheme
(
QObject
*parent) :
17
QObject
(parent)
18
{
19
}
20
21
QVariant
QQuickPlatformTheme::themeHint
(
QPlatformTheme::ThemeHint
themeHint)
const
22
{
23
return
getThemeHint
(
themeHint
);
24
}
25
31
QVariant
QQuickPlatformTheme::getThemeHint
(
QPlatformTheme::ThemeHint
themeHint)
32
{
33
// Allow tests to force some theme hint values, otherwise they get very messy and difficult to understand.
34
switch
(
themeHint
) {
35
case
QPlatformTheme::ShowDirectoriesFirst
: {
36
bool
isInt =
false
;
37
const
int
showDirsFirst =
qEnvironmentVariableIntValue
(
"QT_QUICK_DIALOGS_SHOW_DIRS_FIRST"
, &isInt);
38
if
(isInt)
39
return
showDirsFirst != 0;
40
break
;
41
}
42
default
:
43
break
;
44
}
45
return
QGuiApplicationPrivate::platformTheme
()->themeHint(
themeHint
);
46
}
47
48
QT_END_NAMESPACE
49
50
#include "moc_qquickplatformtheme_p.cpp"
QGuiApplicationPrivate::platformTheme
static QPlatformTheme * platformTheme()
Definition
qguiapplication_p.h:95
QObject
\inmodule QtCore
Definition
qobject.h:103
QPlatformTheme::ThemeHint
ThemeHint
This enum describes the available theme hints.
Definition
qplatformtheme.h:50
QPlatformTheme::ShowDirectoriesFirst
@ ShowDirectoriesFirst
Definition
qplatformtheme.h:89
QQuickPlatformTheme::getThemeHint
static QVariant getThemeHint(QPlatformTheme::ThemeHint themeHint)
Definition
qquickplatformtheme.cpp:31
QQuickPlatformTheme::themeHint
Q_INVOKABLE QVariant themeHint(QPlatformTheme::ThemeHint themeHint) const
Definition
qquickplatformtheme.cpp:21
QQuickPlatformTheme::QQuickPlatformTheme
QQuickPlatformTheme(QObject *parent=nullptr)
Definition
qquickplatformtheme.cpp:16
QVariant
\inmodule QtCore
Definition
qvariant.h:65
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
qquickplatformtheme_p.h
qEnvironmentVariableIntValue
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
qtdeclarative
src
quickcontrolsimpl
qquickplatformtheme.cpp
Generated by
1.10.0