The QKnxUtf8String class is a datapoint type for a UTF-8 string. 更多...
| 頭: | #include <QKnxUtf8String> |
| qmake: | QT += knx |
| Since: | Qt 5.11 |
| 繼承: | QKnxVariableSizeDatapointType |
| 繼承者: |
該類在 Qt 5.11 引入。
| QKnxUtf8String (const char * string , int size = -1) | |
| QKnxUtf8String (const QString & string ) | |
| QKnxUtf8String () | |
| bool | setString (const QString & string ) |
| bool | setString (const char * string , int size = -1) |
| QString | string () const |
| virtual bool | isValid () const override |
| QKnxUtf8String (int subType , const char * string , int size ) |
This datapoint type stores a UTF-8 (Unicode Transformation Format-8) string. The data length for one character can vary from 1 to 4 octets. Each character is encoded according to UTF-8.
This is a variable sized datapoint type.
另請參閱 QKnxDatapointType , QKnxUtf8 ,和 Qt KNX Datapoint Type Classes .
[protected]
QKnxUtf8String::
QKnxUtf8String
(
int
subType
, const
char
*
string
,
int
size
)
Creates a variable sized datapoint type with the sub type subType that stores the string string with the length size .
Creates a variable sized datapoint type that stores the string string with the length size .
Creates a variable sized datapoint type that stores the string string .
Creates a variable sized datapoint type.
[override virtual]
bool
QKnxUtf8String::
isValid
() const
重實現: QKnxDatapointType::isValid () const.
Sets the string stored in the datapoint type to string .
If the value is outside the allowed range, returns
false
and does not set the string.
另請參閱 string ().
Sets the string stored in the datapoint type to string with the length size .
若
size
is
-1
, the full
string
被使用。
If the string contains invalid UTF-8 sequences, returns
false
and does not set the string.
Returns the string stored in the datapoint type.
另請參閱 setString ().