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
QQmlJS::Dom::QmlComponent Class Referencefinal

#include <qqmldomelements_p.h>

+ Inheritance diagram for QQmlJS::Dom::QmlComponent:
+ Collaboration diagram for QQmlJS::Dom::QmlComponent:

Public Member Functions

DomType kind () const override
 
 QmlComponent (const QString &name=QString())
 
bool iterateDirectSubpaths (const DomItem &self, DirectVisitor) const override
 
const QMultiMap< QString, Id > & ids () const &
 
Path nextComponentPath () const
 
void setIds (QMultiMap< QString, Id > ids)
 
void setNextComponentPath (const Path &p)
 
void updatePathFromOwner (const Path &newPath) override
 
Path addId (const Id &id, AddOption option=AddOption::Overwrite, Id **idPtr=nullptr)
 
void writeOut (const DomItem &self, OutWriter &) const override
 
QList< QStringsubComponentsNames (const DomItem &self) const
 
QList< DomItemsubComponents (const DomItem &self) const
 
void setSemanticScope (const QQmlJSScope::ConstPtr &scope)
 
QQmlJSScope::ConstPtr semanticScope () const
 
ScriptElementVariant nameIdentifiers () const
 
void setNameIdentifiers (const ScriptElementVariant &name)
 
- Public Member Functions inherited from QQmlJS::Dom::Component
 Component (const QString &name)
 
 Component (const Path &pathFromOwner=Path())
 
 Component (const Component &o)=default
 
Componentoperator= (const Component &)=default
 
DomItem field (const DomItem &self, QStringView name) const override
 
QString name () const
 
const QMultiMap< QString, EnumDecl > & enumerations () const &
 
const QList< QmlObject > & objects () const &
 
bool isSingleton () const
 
bool isCreatable () const
 
bool isComposite () const
 
QString attachedTypeName () const
 
Path attachedTypePath (const DomItem &) const
 
void setName (const QString &name)
 
void setEnumerations (QMultiMap< QString, EnumDecl > enumerations)
 
Path addEnumeration (const EnumDecl &enumeration, AddOption option=AddOption::Overwrite, EnumDecl **ePtr=nullptr)
 
void setObjects (const QList< QmlObject > &objects)
 
Path addObject (const QmlObject &object, QmlObject **oPtr=nullptr)
 
void setIsSingleton (bool isSingleton)
 
void setIsCreatable (bool isCreatable)
 
void setIsComposite (bool isComposite)
 
void setAttachedTypeName (const QString &name)
 
void setAttachedTypePath (const Path &p)
 
- Public Member Functions inherited from QQmlJS::Dom::CommentableDomElement
 CommentableDomElement (const Path &pathFromOwner=Path())
 
 CommentableDomElement (const CommentableDomElement &o)
 
CommentableDomElementoperator= (const CommentableDomElement &o)=default
 
RegionCommentscomments ()
 
const RegionCommentscomments () const
 
- Public Member Functions inherited from QQmlJS::Dom::DomElement
 DomElement (const Path &pathFromOwner=Path())
 
 DomElement (const DomElement &o)=default
 
Path pathFromOwner (const DomItem &self) const override
 
Path pathFromOwner () const
 
Path canonicalPath (const DomItem &self) const override
 
DomItem containingObject (const DomItem &self) const override
 
- Public Member Functions inherited from QQmlJS::Dom::DomBase
virtual ~DomBase ()=default
 
DomBasedomBase ()
 
const DomBasedomBase () const
 
virtual DomKind domKind () const
 
bool iterateDirectSubpathsConst (const DomItem &self, DirectVisitor) const
 
virtual void dump (const DomItem &, const Sink &sink, int indent, FilterT filter) const
 
virtual quintptr id () const
 
QString typeName () const
 
virtual QList< QStringfields (const DomItem &self) const
 
virtual index_type indexes (const DomItem &self) const
 
virtual DomItem index (const DomItem &self, index_type index) const
 
virtual QSet< QString > const keys (const DomItem &self) const
 
virtual DomItem key (const DomItem &self, const QString &name) const
 
virtual QString canonicalFilePath (const DomItem &self) const
 
virtual QCborValue value () const
 

Static Public Attributes

static constexpr DomType kindValue = DomType::QmlComponent
 

Friends

class QQmlDomAstCreator
 

Additional Inherited Members

- Public Types inherited from QQmlJS::Dom::DomBase
using FilterT = function_ref<bool(const DomItem &, const PathEls::PathComponent &, const DomItem &)>
 
- Protected Member Functions inherited from QQmlJS::Dom::DomElement
DomElementoperator= (const DomElement &)=default
 

Detailed Description

Definition at line 1113 of file qqmldomelements_p.h.

Constructor & Destructor Documentation

◆ QmlComponent()

QQmlJS::Dom::QmlComponent::QmlComponent ( const QString & name = QString())
inline

Definition at line 1119 of file qqmldomelements_p.h.

Member Function Documentation

◆ addId()

Path QQmlJS::Dom::QmlComponent::addId ( const Id & id,
AddOption option = AddOption::Overwrite,
Id ** idPtr = nullptr )
inline

Definition at line 1132 of file qqmldomelements_p.h.

References QQmlJS::Dom::insertUpdatableElementInMultiMap().

+ Here is the call graph for this function:

◆ ids()

const QMultiMap< QString, Id > & QQmlJS::Dom::QmlComponent::ids ( ) const &
inline

Definition at line 1127 of file qqmldomelements_p.h.

◆ iterateDirectSubpaths()

bool QQmlJS::Dom::QmlComponent::iterateDirectSubpaths ( const DomItem & self,
DirectVisitor visitor ) const
overridevirtual

Reimplemented from QQmlJS::Dom::Component.

Definition at line 138 of file qqmldomelements.cpp.

References QQmlJS::Dom::Component::iterateDirectSubpaths(), and subComponents().

+ Here is the call graph for this function:

◆ kind()

DomType QQmlJS::Dom::QmlComponent::kind ( ) const
inlineoverridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 1117 of file qqmldomelements_p.h.

◆ nameIdentifiers()

ScriptElementVariant QQmlJS::Dom::QmlComponent::nameIdentifiers ( ) const
inline

Definition at line 1144 of file qqmldomelements_p.h.

◆ nextComponentPath()

Path QQmlJS::Dom::QmlComponent::nextComponentPath ( ) const
inline

Definition at line 1128 of file qqmldomelements_p.h.

◆ semanticScope()

QQmlJSScope::ConstPtr QQmlJS::Dom::QmlComponent::semanticScope ( ) const
inline

Definition at line 1143 of file qqmldomelements_p.h.

◆ setIds()

void QQmlJS::Dom::QmlComponent::setIds ( QMultiMap< QString, Id > ids)
inline

Definition at line 1129 of file qqmldomelements_p.h.

◆ setNameIdentifiers()

void QQmlJS::Dom::QmlComponent::setNameIdentifiers ( const ScriptElementVariant & name)
inline

Definition at line 1145 of file qqmldomelements_p.h.

◆ setNextComponentPath()

void QQmlJS::Dom::QmlComponent::setNextComponentPath ( const Path & p)
inline

Definition at line 1130 of file qqmldomelements_p.h.

◆ setSemanticScope()

void QQmlJS::Dom::QmlComponent::setSemanticScope ( const QQmlJSScope::ConstPtr & scope)
inline

Definition at line 1142 of file qqmldomelements_p.h.

◆ subComponents()

QList< DomItem > QQmlJS::Dom::QmlComponent::subComponents ( const DomItem & self) const

Definition at line 190 of file qqmldomelements.cpp.

References QString::append(), and subComponentsNames().

Referenced by iterateDirectSubpaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subComponentsNames()

QList< QString > QQmlJS::Dom::QmlComponent::subComponentsNames ( const DomItem & self) const

Definition at line 173 of file qqmldomelements.cpp.

References QStringView::mid().

Referenced by subComponents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePathFromOwner()

void QQmlJS::Dom::QmlComponent::updatePathFromOwner ( const Path & newPath)
overridevirtual

Reimplemented from QQmlJS::Dom::Component.

Definition at line 153 of file qqmldomelements.cpp.

References QQmlJS::Dom::Component::updatePathFromOwner(), and QQmlJS::Dom::updatePathFromOwnerMultiMap().

+ Here is the call graph for this function:

◆ writeOut()

void QQmlJS::Dom::QmlComponent::writeOut ( const DomItem & self,
OutWriter & lw ) const
overridevirtual

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 159 of file qqmldomelements.cpp.

References QQmlJS::Dom::ColonTokenRegion, QQmlJS::Dom::ComponentKeywordRegion, contains(), QQmlJS::Dom::OutWriter::ensureNewline(), QQmlJS::Dom::IdentifierRegion, QQmlJS::Dom::Component::name(), QQmlJS::Dom::OutWriter::space(), split(), and QQmlJS::Dom::OutWriter::writeRegion().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QQmlDomAstCreator

friend class QQmlDomAstCreator
friend

Definition at line 1148 of file qqmldomelements_p.h.

Member Data Documentation

◆ kindValue

constexpr DomType QQmlJS::Dom::QmlComponent::kindValue = DomType::QmlComponent
staticconstexpr

Definition at line 1116 of file qqmldomelements_p.h.


The documentation for this class was generated from the following files: