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
utils.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4
#
ifndef
UTILS_H
5
#
define
UTILS_H
6
7
#
include
"ui4.h"
8
#
include
<
qstring
.
h
>
9
#
include
<
qlist
.
h
>
10
#
include
<
qhash
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
inline
bool
toBool
(
const
QString &str)
15
{
return
QString::compare(str, QLatin1StringView(
"true"
), Qt::CaseInsensitive) == 0; }
16
17
inline
QString
toString
(
const
DomString *str)
18
{
return
str ? str->text() : QString(); }
19
20
inline
QHash
<QString, DomProperty *>
propertyMap
(
const
QList
<DomProperty *> &properties)
21
{
22
QHash
<QString, DomProperty *> map;
23
for
(DomProperty *p : properties)
24
map.insert(p->attributeName(), p);
25
return
map;
26
}
27
28
QT_END_NAMESPACE
29
30
#
endif
// UTILS_H
CustomWidgetsInfo
Definition
customwidgetsinfo.h:18
CustomWidgetsInfo::acceptUI
void acceptUI(DomUI *node) override
Definition
customwidgetsinfo.cpp:17
CustomWidgetsInfo::CustomWidgetsInfo
CustomWidgetsInfo()
CustomWidgetsInfo::acceptCustomWidgets
void acceptCustomWidgets(DomCustomWidgets *node) override
Definition
customwidgetsinfo.cpp:25
CustomWidgetsInfo::acceptCustomWidget
void acceptCustomWidget(DomCustomWidget *node) override
Definition
customwidgetsinfo.cpp:30
QHash
\inmodule QtCore
Definition
qhash.h:837
QList
Definition
qlist.h:80
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
TreeWalker
Definition
treewalker.h:54
TreeWalker::acceptCustomWidgets
virtual void acceptCustomWidgets(DomCustomWidgets *customWidgets)
Definition
treewalker.cpp:193
toString
QString toString(const DomString *str)
Definition
utils.h:17
toBool
QT_BEGIN_NAMESPACE bool toBool(const QString &str)
Definition
utils.h:14
propertyMap
QHash< QString, DomProperty * > propertyMap(const QList< DomProperty * > &properties)
Definition
utils.h:20
qtbase
src
tools
uic
utils.h
Generated on
for Qt by
1.14.0