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 || std::find(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) {
@ IgnoreComposedProperty
Do not use composed property when comparing values.
void append(const T &value)
bool isNull() const const
bool isValid() const const
KComposedPropertyInterface * composedProperty() const
Definition: KProperty.cpp:678
Type type(const QSqlDatabase &db)
QDebug & nospace()
void clear()
void clearModifiedFlag()
Clears the "modified" flag for this property and all its child properties.
Definition: KProperty.cpp:497
QDebug & space()
QDataStream & operator<<(QDataStream &out, const KDateTime &dateTime)
void setDescription(const QString &description)
Definition: KProperty.cpp:360
QString caption()
void setValue(const T &value)
QString simplified() const const
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
double toDouble(bool *ok) const const
bool isNull() const const
QVariant::Type type() const const
bool isEmpty() const const
bool isModified() const
Return true if value of this property or value of any child property is modified.
Definition: KProperty.cpp:481
void setValueSyncPolicy(ValueSyncPolicy policy)
Sets synchronization policy for property values of this property See ValueSyncPolicy for details.
Definition: KProperty.cpp:537
bool setValue(const QVariant &value, ValueOptions options=ValueOptions())
Sets value of the property.
Definition: KProperty.cpp:405
QList::const_iterator constEnd() const const
void setOption(const char *name, const QVariant &val)
Definition: KProperty.cpp:555
const char * constData() const const
bool valueEqualsTo(const QVariant &value, ValueOptions valueOptions=ValueOptions()) const
Definition: KProperty.cpp:417
QString name(StandardShortcut id)
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
QList::iterator begin()
QList::iterator end()
Type
An interface for for composed property handlers.
Definition: KPropertyFactory.h:32
QString toString() const const
void setComposedProperty(KComposedPropertyInterface *prop)
Definition: KProperty.cpp:684
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:48:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:48:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.