![]() |
Qt 6.x
The Qt SDK
|
Attached info creates a tree to attach extra info to DomItems. More...
#include <qqmldomattachedinfo_p.h>
Public Types | |
enum class | PathType { Relative , Canonical } |
enum class | FindOption { None = 0 , SetRootTreePath = 0x1 , SetFoundTreePath = 0x2 , Default = 0x3 } |
using | Ptr = std::shared_ptr< AttachedInfo > |
![]() | |
using | FilterT = function_ref< bool(DomItem &, const PathEls::PathComponent &, DomItem &)> |
Static Public Member Functions | |
static Ptr | ensure (Ptr self, Path path, PathType pType=PathType::Relative) |
Returns that the AttachedInfo corresponding to the given path, creating it if it does not exists. | |
static Ptr | find (Ptr self, Path p, PathType pType=PathType::Relative) |
static AttachedInfoLookupResult< Ptr > | findAttachedInfo (DomItem &item, QStringView treeFieldName, FindOptions options=AttachedInfo::FindOption::None) |
static Ptr | treePtr (DomItem &item, QStringView fieldName) |
![]() | |
static int | nextRevision () |
Static Public Attributes | |
static constexpr DomType | kindValue = DomType::AttachedInfo |
Protected Attributes | |
Path | m_path |
std::weak_ptr< AttachedInfo > | m_parent |
QMap< Path, Ptr > | m_subItems |
Additional Inherited Members | |
![]() | |
virtual std::shared_ptr< OwningItem > | doCopy (DomItem &self) const =0 |
Attached info creates a tree to attach extra info to DomItems.
Normally one uses the template AttachedInfoT<SpecificInfoToAttach>
static methods Attributes: \list
Definition at line 48 of file qqmldomattachedinfo_p.h.
using QQmlJS::Dom::AttachedInfo::Ptr = std::shared_ptr<AttachedInfo> |
Definition at line 66 of file qqmldomattachedinfo_p.h.
|
strong |
Enumerator | |
---|---|
None | |
SetRootTreePath | |
SetFoundTreePath | |
Default |
Definition at line 56 of file qqmldomattachedinfo_p.h.
|
strong |
Enumerator | |
---|---|
Relative | |
Canonical |
Definition at line 51 of file qqmldomattachedinfo_p.h.
Definition at line 81 of file qqmldomattachedinfo_p.h.
QQmlJS::Dom::AttachedInfo::AttachedInfo | ( | const AttachedInfo & | o | ) |
Definition at line 201 of file qqmldomattachedinfo.cpp.
Implements QQmlJS::Dom::OwningItem.
Definition at line 69 of file qqmldomattachedinfo_p.h.
|
static |
Returns that the AttachedInfo corresponding to the given path, creating it if it does not exists.
The path might be either a relative path or a canonical path, as specified by the PathType
Definition at line 213 of file qqmldomattachedinfo.cpp.
References Canonical, QString::insert(), QString::length(), QQmlJS::Dom::Path::mid(), path(), Q_ASSERT, and Relative.
|
inline |
Definition at line 128 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::MutableDomItem::field().
|
inline |
Definition at line 113 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::Path::field(), and QQmlJS::Dom::Path::key().
|
static |
Definition at line 240 of file qqmldomattachedinfo.cpp.
References Canonical, QQmlJS::Dom::Path::dropFront(), QQmlJS::Dom::Path::head(), QString::length(), and QQmlJS::Dom::Path::mid().
Referenced by findAttachedInfo().
|
static |
Definition at line 260 of file qqmldomattachedinfo.cpp.
References QQmlJS::Dom::DomItem::canonicalPath(), QQmlJS::Dom::Path::field(), find(), item, QQmlJS::Dom::Path::key(), o, QQmlJS::Dom::DomItem::ownerAs(), Relative, SetFoundTreePath, and SetRootTreePath.
|
inline |
Definition at line 108 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::DomItem::field().
Definition at line 136 of file qqmldomattachedinfo_p.h.
Implemented in QQmlJS::Dom::AttachedInfoT< Info >.
|
pure virtual |
Implemented in QQmlJS::Dom::AttachedInfoT< Info >.
|
inline |
Definition at line 94 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::Path::field(), and QQmlJS::Dom::Path::key().
|
overridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 171 of file qqmldomattachedinfo.cpp.
References QMap< Key, T >::key(), map, and parent.
|
inlineoverridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 68 of file qqmldomattachedinfo_p.h.
|
inline |
Definition at line 72 of file qqmldomattachedinfo_p.h.
|
inline |
Definition at line 77 of file qqmldomattachedinfo_p.h.
|
inline |
Definition at line 78 of file qqmldomattachedinfo_p.h.
Referenced by ensure().
Definition at line 79 of file qqmldomattachedinfo_p.h.
Definition at line 143 of file qqmldomattachedinfo_p.h.
Definition at line 140 of file qqmldomattachedinfo_p.h.
|
inlinestatic |
Definition at line 89 of file qqmldomattachedinfo_p.h.
References item.
|
staticconstexpr |
Definition at line 65 of file qqmldomattachedinfo_p.h.
|
protected |
Definition at line 148 of file qqmldomattachedinfo_p.h.
|
protected |
Definition at line 147 of file qqmldomattachedinfo_p.h.
Definition at line 149 of file qqmldomattachedinfo_p.h.