Detailed Description
The QGalleryMetaDataFilter class provides a filter which accepts items with meta-data properties matching a specific value.
A meta-data filter represents a comparison between the value of an item's meta-data property() and a fixed value(). A filter can be constructed by passing the property name, value, and comparator to the filter contructor or by using one of the operator overloads or constructor functions on QGalleryProperty.
Meta-data filters can also be combined to create union or intersection filters using the || and && operators respectively.
Member Function Documentation
QGalleryMetaDataFilter::QGalleryMetaDataFilter ()
Constructs an empty meta-data filter.
QGalleryMetaDataFilter::QGalleryMetaDataFilter ( const QString & property, const QVariant & value, QGalleryFilter::Comparator comparison = QGalleryFilter::Equals )
Constructs a meta-data filter which tests if a meta-data property matches a value according to a comparison operator.
QGalleryMetaDataFilter::QGalleryMetaDataFilter ( const QGalleryMetaDataFilter & filter )
Constructs a copy of a meta-data filter.
QGalleryMetaDataFilter::~QGalleryMetaDataFilter ()
Destroys a meta-data filter.
Returns the comparator used by a meta-data filter.
See also setComparator().
bool QGalleryMetaDataFilter::isNegated () const
Returns whether the result of a meta-data filter should be negated.
bool QGalleryMetaDataFilter::isValid () const
Returns true if the filter is a valid meta-data filter.
An invalid filter can be obtained by casting a non QGalleryFilter::MetaData type QGalleryFilter to QGalleryMetaDataFilter.
QString QGalleryMetaDataFilter::propertyName () const
Returns the name of the property the value of a meta-data filter is compared against.
See also setPropertyName().
void QGalleryMetaDataFilter::setComparator ( QGalleryFilter::Comparator comparator )
Sets the comparator used by a meta-data filter.
See also comparator().
void QGalleryMetaDataFilter::setNegated ( bool negated )
Sets whether the result of a meta-data filter should be negated.
See also isNegated().
void QGalleryMetaDataFilter::setPropertyName ( const QString & name )
Sets the name of the property the value of meta-data filter is compared against.
See also propertyName().
void QGalleryMetaDataFilter::setValue ( const QVariant & value )
Sets the value a property is expected to match for a meta-data filter to pass.
See also value().
QVariant QGalleryMetaDataFilter::value () const
Returns the value a property is expected to match for a meta-data filter to pass.
See also setValue().
QGalleryMetaDataFilter QGalleryMetaDataFilter::operator! () const
Returns a meta-data filter which tests the negation of an existing filter.
QGalleryMetaDataFilter & QGalleryMetaDataFilter::operator= ( const QGalleryMetaDataFilter & filter )
Assigns the value of filter to another meta-data filter.