KProperty
KProperty.cpp
83 bool KProperty::Private::valueDiffersInternal(const QVariant &otherValue, KProperty::ValueOptions options)
86 kprWarning() << "INCOMPATIBLE TYPES! old=" << value << "new=" << otherValue << "in property" << q->name();
106 const double factor = pow(10.0, option("precision", KPROPERTY_DEFAULT_DOUBLE_VALUE_PRECISION).toDouble());
108 // << "factor:" << factor << "precision:" << option("precision", KPROPERTY_DEFAULT_DOUBLE_VALUE_STEP)
110 // << ":" << static_cast<qlonglong>(value.toDouble() * factor) << static_cast<qlonglong>(otherValue.toDouble() * factor);
111 return static_cast<qlonglong>(value.toDouble() * factor) != static_cast<qlonglong>(otherValue.toDouble() * factor);
122 bool KProperty::Private::setValueInternal(const QVariant &newValue, KProperty::ValueOptions valueOptions)
175 if (!children || qFind(children->begin(), children->end(), prop) == children->end()) { // not in our list
410 void KProperty::setValue(const QVariant &value, bool doNotUseThisOverload, bool doNotUseThisOverload2)
431 KPropertySetPrivate::d(d->set)->informAboutClearing(&cleared); //inform me about possibly clearing the property sets
625 for (QList<KProperty*>::ConstIterator it = property.d->children->constBegin(); it != endIt; ++it) {
Type
QString caption()
QString name(const QVariant &location)
Do not remember the old value before setting a new one.
friend KPROPERTYCORE_EXPORT QDebug operator<<(QDebug dbg, const KProperty &p)
qDebug() stream operator. Writes property p to the debug output in a nicely formatted way...
Definition: KProperty.cpp:706
const QObjectList & children() const const
QString simplified() const const
QDebug & nospace()
QVariant option(const char *name, const QVariant &defaultValue=QVariant()) const
Returns value of given option Option is set if returned value is not null. If there is no option for ...
Definition: KProperty.cpp:564
void setDescription(const QString &description)
Definition: KProperty.cpp:360
void clear()
void append(const T &value)
An interface for for composed property handlers.
Definition: KPropertyFactory.h:32
QVariant property(const char *name) const const
bool isNull() const const
Type type(const QSqlDatabase &db)
bool isNull() const const
void clearModifiedFlag()
Clears the "modified" flag for this property and all its child properties.
Definition: KProperty.cpp:497
bool isEmpty() const const
bool hasOptions() const
Returns true if at least one option is specified for this property If there are no options defined tr...
Definition: KProperty.cpp:570
const char * constData() const const
bool valueEqualsTo(const QVariant &value, ValueOptions valueOptions=ValueOptions()) const
Definition: KProperty.cpp:417
KComposedPropertyInterface * composedProperty() const
Definition: KProperty.cpp:678
QDebug & space()
Do not use composed property when comparing values.
void setValue(const T &value)
void setOption(const char *name, const QVariant &val)
Definition: KProperty.cpp:555
if(recurs()&&!first)
bool isModified() const
Return true if value of this property or value of any child property is modified. ...
Definition: KProperty.cpp:481
bool isValid() const const
double toDouble(bool *ok) const const
void setValueSyncPolicy(ValueSyncPolicy policy)
Sets synchronization policy for property values of this property See ValueSyncPolicy for details...
Definition: KProperty.cpp:537
QList::const_iterator constEnd() const const
QVariant::Type type() const const
QObject * parent() const const
bool setValue(const QVariant &value, ValueOptions options=ValueOptions())
Sets value of the property.
Definition: KProperty.cpp:405
void setComposedProperty(KComposedPropertyInterface *prop)
Definition: KProperty.cpp:684
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 04:11:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 04:11:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.