CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
CFxUIVariant Class Reference

#include <FxUIVariant.h>

Public Member Functions

 CFxUIVariant ()
 
 CFxUIVariant (int val)
 
 CFxUIVariant (qlonglong val)
 
 CFxUIVariant (bool val)
 
 CFxUIVariant (double val)
 
 CFxUIVariant (float val)
 
 CFxUIVariant (const CFxUIByteArray &val)
 
 CFxUIVariant (const CFxUIString &val)
 
 CFxUIVariant (const CFxUIVariant &variant)
 
 CFxUIVariant (const QVariant &variant)
 
 ~CFxUIVariant ()
 
CFxUIVariantoperator= (const CFxUIVariant &variant)
 
 operator const QVariant & () const
 
bool isValid () const
 
bool toBool () const
 
CFxUIByteArray toByteArray () const
 
double toDouble (bool *ok=nullptr) const
 
float toFloat (bool *ok=nullptr) const
 
int toInt (bool *ok=nullptr) const
 
CFxUIString toString () const
 
uint toUInt (bool *ok=nullptr) const
 

Protected Attributes

CFxUIVariantImpl * m_pImpl = nullptr
 

Detailed Description

Definition at line 30 of file FxUIVariant.h.

Constructor & Destructor Documentation

◆ CFxUIVariant() [1/10]

CFxUIVariant::CFxUIVariant ( )

Constructor

◆ CFxUIVariant() [2/10]

CFxUIVariant::CFxUIVariant ( int val)

Parameterized Constructor

◆ CFxUIVariant() [3/10]

CFxUIVariant::CFxUIVariant ( qlonglong val)

◆ CFxUIVariant() [4/10]

CFxUIVariant::CFxUIVariant ( bool val)

◆ CFxUIVariant() [5/10]

CFxUIVariant::CFxUIVariant ( double val)

◆ CFxUIVariant() [6/10]

CFxUIVariant::CFxUIVariant ( float val)

◆ CFxUIVariant() [7/10]

CFxUIVariant::CFxUIVariant ( const CFxUIByteArray & val)

◆ CFxUIVariant() [8/10]

CFxUIVariant::CFxUIVariant ( const CFxUIString & val)

◆ CFxUIVariant() [9/10]

CFxUIVariant::CFxUIVariant ( const CFxUIVariant & variant)

Copy Constructor

◆ CFxUIVariant() [10/10]

CFxUIVariant::CFxUIVariant ( const QVariant & variant)

◆ ~CFxUIVariant()

CFxUIVariant::~CFxUIVariant ( )

Destructor

Member Function Documentation

◆ isValid()

bool CFxUIVariant::isValid ( ) const

Returns true if the storage type of this variant is not UnknownType, otherwise returns false.

Returns
bool

◆ operator const QVariant &()

CFxUIVariant::operator const QVariant & ( ) const

◆ operator=()

CFxUIVariant & CFxUIVariant::operator= ( const CFxUIVariant & variant)

Assignment operator

◆ toBool()

bool CFxUIVariant::toBool ( ) const

Returns true if the variant has userType() Bool, otherwise returns false.

Returns
bool

◆ toByteArray()

CFxUIByteArray CFxUIVariant::toByteArray ( ) const

Returns the variant as a CFxUIByteArray for a supported userType(), otherwise returns an empty byte array.

Returns
CFxUIByteArray

◆ toDouble()

double CFxUIVariant::toDouble ( bool * ok = nullptr) const

Returns the variant as a double for a supported userType(), otherwise returns 0.0.

Parameters
isBool *ok which sets to true if the value could be converted to a double, otherwise *ok is set to false.
Returns
double

◆ toFloat()

float CFxUIVariant::toFloat ( bool * ok = nullptr) const

Returns the variant as a float for a supported userType(), otherwise returns 0.0.

Parameters
isBool *ok which sets to true if the value could be converted to a float, otherwise *ok is set to false.
Returns
float

◆ toInt()

int CFxUIVariant::toInt ( bool * ok = nullptr) const

Returns the variant as an int for a supported userType(), otherwise returns 0.

Parameters
isBool *ok which sets to true if the value could be converted to an int, otherwise *ok is set to false.
Returns
int

◆ toString()

CFxUIString CFxUIVariant::toString ( ) const

Returns the variant as a CFxUIString for a supported userType(), and for an unsupported variant returns an empty string.

Returns
CFxUIString

◆ toUInt()

uint CFxUIVariant::toUInt ( bool * ok = nullptr) const

Returns the variant as an unsigned int for a supported userType(), otherwise returns 0.

Returns
uint

Member Data Documentation

◆ m_pImpl

CFxUIVariantImpl* CFxUIVariant::m_pImpl = nullptr
protected

Definition at line 121 of file FxUIVariant.h.


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