Nepomuk-Core
rcgen/property.cpp
Go to the documentation of this file.
166 // for properties with cardinality == 1 we use a little hack since there will always be duplication of
178 return m_isList ? QLatin1String("toUnsignedIntList())") : QLatin1String("toUnsignedIntList() << 0 ).first()");
181 return m_isList ? QLatin1String("toInt64List())") : QLatin1String("toInt64List() << 0 ).first()");
184 return m_isList ? QLatin1String("toUnsignedInt64List())") : QLatin1String("toUnsignedInt64List() << 0 ).first()");
187 return m_isList ? QLatin1String("toBoolList())") : QLatin1String("toBoolList() << false ).first()");
190 return m_isList ? QLatin1String("toDoubleList())") : QLatin1String("toDoubleList() << 0.0 ).first()");
193 return m_isList ? QLatin1String("toDateTimeList())") : QLatin1String("toDateTimeList() << QDateTime() ).first()");
196 return m_isList ? QLatin1String("toDateList())") : QLatin1String("toDateList() << QDate() ).first()");
199 return m_isList ? QLatin1String("toTimeList())") : QLatin1String("toTimeList() << QTime() ).first()");
bool isList() const
Returns whether the property is a list of values.
Definition: rcgen/property.cpp:88
QString literalRange() const
Returns the literal range of the property (the name of the Qt type to be used.)
Definition: rcgen/property.cpp:68
bool generateClass() const
Returns true if this class should be generated.
Definition: resourceclass.cpp:117
ResourceClass * parentClass(bool considerGenerateClass=true) const
Returns the parent resource of the resource.
Definition: resourceclass.cpp:63
void setUri(const QUrl &uri)
Creates a new property of a given type and with a given uri.
Definition: rcgen/property.cpp:43
void setComment(const QString &comment)
Sets the comment of the property.
Definition: rcgen/property.cpp:73
bool hasSimpleType() const
Returns whether the property is of simple type.
Definition: rcgen/property.cpp:159
void setInverseProperty(Property *property)
Sets the inverse property of this property.
Definition: rcgen/property.cpp:109
void setLiteralRange(const QString &range)
Set the literal range of the property.
Definition: rcgen/property.cpp:58
QString literalTypeConversionMethod() const
Returns the conversion method of the property.
Definition: rcgen/property.cpp:164
void setIsList(bool isList)
Sets whether the property is a list of values.
Definition: rcgen/property.cpp:83
ResourceClass * domain(bool onlyReturnGeneratedClass=false) const
Returns the domain resource the property belongs to.
Definition: rcgen/property.cpp:98
QString name(const QString &nameSpace=QString()) const
Returns the name of the resource.
Definition: resourceclass.cpp:122
void setDomain(ResourceClass *domain)
Sets the domain the property belongs to.
Definition: rcgen/property.cpp:93
Property * inverseProperty() const
Returns the inverse property of this property.
Definition: rcgen/property.cpp:114
QString typeString(bool simple=false, const QString &nameSpace=QString()) const
Retrieve a string representation of the range.
Definition: rcgen/property.cpp:132
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.