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
qqmlsignalnames.cpp File Reference

(2fc19f2c627802d26bd385a6c9cc1f6412852ee2)

#include "qqmlsignalnames_p.h"
#include <iterator>
#include <algorithm>
#include <optional>
#include <string>
Include dependency graph for qqmlsignalnames.cpp:

Go to the source code of this file.

Enumerations

enum  ChangeCase { ToUpper , ToLower , ToUpper , ToLower }
enum  HandlerType { ChangedHandler , Handler , ChangedHandler , Handler }
enum  ChangeCase { ToUpper , ToLower , ToUpper , ToLower }
enum  HandlerType { ChangedHandler , Handler , ChangedHandler , Handler }

Functions

static constexpr const QLatin1String On ("on")
static constexpr const QLatin1String Changed ("Changed")
static std::optional< qsizetypefirstLetterIdx (QStringView name, qsizetype removePrefix=0, qsizetype removeSuffix=0)
static std::optional< QCharfirstLetter (QStringView name, qsizetype removePrefix=0, qsizetype removeSuffix=0)
static void changeCaseOfFirstLetter (QString &name, ChangeCase option, qsizetype removePrefix=0, qsizetype removeSuffix=0)
static std::optional< QStringtoQStringData (std::optional< QStringView > view)
static QByteArray toUtf8Data (QUtf8StringView view)
static std::optional< QByteArraytoUtf8Data (std::optional< QUtf8StringView > view)
template<typename View>
std::optional< ViewchangedSignalNameToPropertyNameTemplate (View changeSignal)
template<HandlerType type>
static std::optional< QStringhandlerNameToSignalNameHelper (QStringView handler)

Variables

static constexpr const qsizetype StrlenOn = On.length()
static constexpr const qsizetype StrlenChanged = Changed.length()

Enumeration Type Documentation

◆ ChangeCase [1/2]

enum ChangeCase
Enumerator
ToUpper 
ToLower 
ToUpper 
ToLower 

Definition at line 40 of file qqmlsignalnames.cpp.

◆ ChangeCase [2/2]

enum ChangeCase
Enumerator
ToUpper 
ToLower 
ToUpper 
ToLower 

Definition at line 40 of file qqmlsignalnames.cpp.

◆ HandlerType [1/2]

Enumerator
ChangedHandler 
Handler 
ChangedHandler 
Handler 

Definition at line 167 of file qqmlsignalnames.cpp.

◆ HandlerType [2/2]

Enumerator
ChangedHandler 
Handler 
ChangedHandler 
Handler 

Definition at line 167 of file qqmlsignalnames.cpp.

Function Documentation

◆ changeCaseOfFirstLetter()

void changeCaseOfFirstLetter ( QString & name,
ChangeCase option,
qsizetype removePrefix = 0,
qsizetype removeSuffix = 0 )
static

Definition at line 41 of file qqmlsignalnames.cpp.

References ToUpper.

◆ Changed()

constexpr const QLatin1String Changed ( "Changed" )
staticconstexpr

◆ changedSignalNameToPropertyNameTemplate()

template<typename View>
std::optional< View > changedSignalNameToPropertyNameTemplate ( View changeSignal)

Definition at line 107 of file qqmlsignalnames.cpp.

◆ firstLetter()

std::optional< QChar > firstLetter ( QStringView name,
qsizetype removePrefix = 0,
qsizetype removeSuffix = 0 )
static

Definition at line 32 of file qqmlsignalnames.cpp.

◆ firstLetterIdx()

std::optional< qsizetype > firstLetterIdx ( QStringView name,
qsizetype removePrefix = 0,
qsizetype removeSuffix = 0 )
static

Definition at line 20 of file qqmlsignalnames.cpp.

◆ handlerNameToSignalNameHelper()

template<HandlerType type>
std::optional< QString > handlerNameToSignalNameHelper ( QStringView handler)
static

Definition at line 170 of file qqmlsignalnames.cpp.

References ChangedHandler, and ToLower.

◆ On()

constexpr const QLatin1String On ( "on" )
staticconstexpr

◆ toQStringData()

std::optional< QString > toQStringData ( std::optional< QStringView > view)
static

Definition at line 52 of file qqmlsignalnames.cpp.

◆ toUtf8Data() [1/2]

QByteArray toUtf8Data ( QUtf8StringView view)
static

Definition at line 59 of file qqmlsignalnames.cpp.

◆ toUtf8Data() [2/2]

std::optional< QByteArray > toUtf8Data ( std::optional< QUtf8StringView > view)
static

Definition at line 64 of file qqmlsignalnames.cpp.

Variable Documentation

◆ StrlenChanged

constexpr const qsizetype StrlenChanged = Changed.length()
staticconstexpr

Definition at line 18 of file qqmlsignalnames.cpp.

◆ StrlenOn

constexpr const qsizetype StrlenOn = On.length()
staticconstexpr

Definition at line 17 of file qqmlsignalnames.cpp.