CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxUIVariant.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
22
24#include "FxUIGlobalDefines.h"
25#include "FxUIByteArray.h"
26
27class QVariant;
28class CFxUIVariantImpl;
29
31{
32public:
33
36
38 CFxUIVariant( int val );
40 CFxUIVariant( bool val );
41 CFxUIVariant( double val );
42 CFxUIVariant( float val );
45
47 CFxUIVariant( const CFxUIVariant& variant );
48 CFxUIVariant( const QVariant& variant );
49
52
55
56 operator const QVariant&() const;
57
63 bool isValid() const;
64
70 bool toBool() const;
71
78
86 double toDouble( bool* ok = nullptr ) const;
87
95 float toFloat( bool* ok = nullptr ) const;
96
104 int toInt( bool* ok = nullptr ) const;
105
112
118 uint toUInt( bool* ok = nullptr ) const;
119
120protected:
121 CFxUIVariantImpl* m_pImpl = nullptr;
122};
#define COMMONUI_API
long long qlonglong
unsigned int uint
CFxString CFxUIString
CFxUIVariant(const CFxUIVariant &variant)
uint toUInt(bool *ok=nullptr) const
CFxUIVariantImpl * m_pImpl
CFxUIVariant(const QVariant &variant)
bool isValid() const
CFxUIVariant & operator=(const CFxUIVariant &variant)
CFxUIVariant(double val)
double toDouble(bool *ok=nullptr) const
CFxUIVariant(const CFxUIByteArray &val)
CFxUIVariant(bool val)
CFxUIVariant(const CFxUIString &val)
bool toBool() const
CFxUIVariant(float val)
CFxUIByteArray toByteArray() const
CFxUIVariant(int val)
CFxUIVariant(qlonglong val)
float toFloat(bool *ok=nullptr) const
CFxUIString toString() const
int toInt(bool *ok=nullptr) const