23 #ifndef _TelepathyQt_generic_property_filter_h_HEADER_GUARD_
24 #define _TelepathyQt_generic_property_filter_h_HEADER_GUARD_
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
30 #include <TelepathyQt/Filter>
31 #include <TelepathyQt/Types>
42 inline virtual bool isValid()
const {
return true; }
46 for (QVariantMap::const_iterator i = mFilter.constBegin();
47 i != mFilter.constEnd(); ++i) {
48 QString propertyName = i.key();
49 QVariant propertyValue = i.value();
51 if (t->property(propertyName.toLatin1().constData()) != propertyValue) {
59 inline QVariantMap
filter()
const {
return mFilter; }
61 inline void addProperty(
const QString &propertyName,
const QVariant &propertyValue)
63 mFilter.insert(propertyName, propertyValue);
GenericPropertyFilter()
Definition: generic-property-filter.h:69
virtual ~GenericPropertyFilter()
Definition: generic-property-filter.h:40
The Filter class provides a base class to be used by specialized filters such as GenericCapabilityFil...
Definition: filter.h:37
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
void addProperty(const QString &propertyName, const QVariant &propertyValue)
Definition: generic-property-filter.h:61
void setProperties(const QVariantMap &filter)
Definition: generic-property-filter.h:66
virtual bool matches(const SharedPtr< T > &t) const
Definition: generic-property-filter.h:44
The GenericPropertyFilter class provides a generic filter object to be used to filter objects by prop...
Definition: generic-property-filter.h:37
virtual bool isValid() const
Definition: generic-property-filter.h:42
QVariantMap filter() const
Definition: generic-property-filter.h:59