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
NativeEnum Class Reference

Encapsulates information about native (C++) enum values. More...

#include <nativeenum.h>

Collaboration diagram for NativeEnum:

Public Member Functions

bool resolve (const QString &path, const QString &registeredQmlName)
 Locates the node specified by path and sets it as the C++ enumeration associated with this property.
void setPrefix (const QString &prefix)
const EnumNodeenumNode () const
const QStringprefix () const

Detailed Description

Encapsulates information about native (C++) enum values.

The NativeEnum resolves a qualified path to a C++ enum into a EnumNode pointer. This information is used for replicating the enumerator documentation in QML API reference.

Definition at line 13 of file nativeenum.h.

Member Function Documentation

◆ enumNode()

const EnumNode * NativeEnum::enumNode ( ) const
inlinenodiscard

Definition at line 19 of file nativeenum.h.

Referenced by Generator::generateEnumValuesForQmlReference().

Here is the caller graph for this function:

◆ prefix()

const QString & NativeEnum::prefix ( ) const
inlinenodiscard

Definition at line 20 of file nativeenum.h.

◆ resolve()

bool NativeEnum::resolve ( const QString & path,
const QString & registeredQmlName )

Locates the node specified by path and sets it as the C++ enumeration associated with this property.

registeredQmlName is a prefix to use in the generated enum value documentation; each enumerator is prefixed with { <registeredQmlName>.}

Note
The target EnumNode is searched under the primary tree only.

Returns true on success.

Definition at line 43 of file nativeenum.cpp.

◆ setPrefix()

void NativeEnum::setPrefix ( const QString & prefix)
inline

Definition at line 17 of file nativeenum.h.


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