CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxUIByteArray.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 "../UI/FxUIEnum.h"
26
27#include <vector>
28
29class QByteArray;
30class CFxUIByteArrayImpl;
31class QString;
32
34{
35public:
36
39
41 CFxUIByteArray( const char* data, qsizetype size = -1 );
42
45 CFxUIByteArray( const QByteArray& pixmap );
46
49
52
53 operator const QByteArray&() const;
54
62 QByteArray& append( const char* str );
63
67 void clear();
68
74 const char* constData() const;
75
81 const char* data() const;
82
88 bool isEmpty() const;
89
95 bool isNull() const;
96
102 int length() const;
103
110
118 double toDouble( bool* ok = nullptr ) const;
119
129 int toInt( bool* ok = nullptr, int base = 10 ) const;
130
140 long toLong( bool* ok = nullptr, int base = 10 ) const;
141
151 qlonglong toLongLong( bool* ok = nullptr, int base = 10 ) const;
152
159
169 short toShort( bool* ok = nullptr, int base = 10 ) const;
170
176 std::string toStdString() const;
177
185 bool startsWith( const char* c ) const;
186
187protected:
188 CFxUIByteArrayImpl* m_pImpl = nullptr;
189};
190
191using CFxUIByteArrayList = std::vector<CFxUIByteArray>;
#define COMMONUI_API
std::vector< CFxUIByteArray > CFxUIByteArrayList
long long qlonglong
IntegerForSizeof< std::size_t >::Signed qsizetype
qsizetype size() const
int toInt(bool *ok=nullptr, int base=10) const
QByteArray & append(const char *str)
const char * data() const
CFxUIByteArray(const QByteArray &pixmap)
CFxUIByteArray toLower() const
int length() const
CFxUIByteArray(const char *data, qsizetype size=-1)
long toLong(bool *ok=nullptr, int base=10) const
qlonglong toLongLong(bool *ok=nullptr, int base=10) const
CFxUIByteArrayImpl * m_pImpl
CFxUIByteArray(const CFxUIByteArray &pixmap)
CFxUIByteArray & operator=(const CFxUIByteArray &pixmap)
short toShort(bool *ok=nullptr, int base=10) const
const char * constData() const
std::string toStdString() const
double toDouble(bool *ok=nullptr) const
bool isNull() const
bool isEmpty() const
bool startsWith(const char *c) const