class Variant |
|
\class Variant variant.h Nepomuk/Variant
The %Nepomuk Variant extends over QVariant by introducing direct support for Resource embedding, automatic list conversion and a restricted set of supported types. Important differences are:
Author Sebastian Trueg |
|
|
|
Will create an invalid Variant if other has an unsupported type. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Append i to this variant. If the variant already contains an int it will be converted to a list of int. |
|
|
|
|
|
|
|
|
|
|
|
|
Appends the value stored in v to the list in this Variant. If this Variant contains a value with the same simple type as v they are merged into a list. Otherwise this Variant will contain one list of simple type v.simpleType() |
|
Create a Variant object by parsing string value based on type. If type is unknown a simple string Variant object is returned containing the plain string value. |
|
|
|
|
|
|
|
|
|
|
|
|
|
This methods does not handle all list types.
It checks the following:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inverse of operator== |
|
Does compare two Variant objects. single-valued lists are treated as the single value itself. For example a QStringList variant with one element "x" equals a QString variant with value "x". |
|
Returns the type of the simple value, i.e. with the list stripped. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The toString() method is a little more powerful than other
toXXX methods since it actually converts all values to string.
Thus, toString should work always (even list variants are converted
to a comma-separated list)
Resources are converted to a string representation of their URI. |
|
Just like the toString method toStringList is able to convert all supported types into a list of strings. |
|
|
|
|
|
|
|
|
|
Returns the QT Meta type id of the type |
|