QtMobility Reference Documentation

QGalleryFilter Class Reference

The QGalleryFilter class provides filtering criteria for gallery requests. More...

 #include <QGalleryFilter>

This class was introduced in Qt Mobility 1.1.

Public Types

enum Comparator { Equals, LessThan, GreaterThan, LessThanEquals, ..., RegExp }
enum Type { Invalid, Intersection, Union, MetaData }

Public Functions

QGalleryFilter ()
QGalleryFilter ( const QGalleryFilter & filter )
QGalleryFilter ( const QGalleryIntersectionFilter & filter )
QGalleryFilter ( const QGalleryUnionFilter & filter )
QGalleryFilter ( const QGalleryMetaDataFilter & filter )
~QGalleryFilter ()
bool isValid () const
QGalleryIntersectionFilter toIntersectionFilter () const
QGalleryMetaDataFilter toMetaDataFilter () const
QGalleryUnionFilter toUnionFilter () const
Type type () const
QGalleryFilter & operator= ( const QGalleryFilter & filter )

Detailed Description

The QGalleryFilter class provides filtering criteria for gallery requests.

A gallery filter may be a {QGalleryMetaData}{meta-data}, {QGalleryUnionFilter}{union}, or {QGalleryIntersectionFilter}{intersection} filter. The type of a QGalleryFilter is given by the type() function, and a filter can be cast to its specific type using one of toMetaFilter(), toUnionFilter() or toIntersectionFilter(). Casting to different type of filter will always result in an invalid filter.

See also QGalleryMetaDataFilter, QGalleryUnionFilter, and QGalleryIntersectionFilter.

Member Type Documentation

enum QGalleryFilter::Comparator

Identifies the comparison made by a QGalleryMetaDataFilter.

ConstantValueDescription
QGalleryFilter::Equals0The filter tests if a meta-data property is equal to a value.
QGalleryFilter::LessThan1The filter tests if a meta-data property is less than a value.
QGalleryFilter::GreaterThan2The filter tests if a meta-data property is greater than a value.
QGalleryFilter::LessThanEquals3The filter tests if a meta-data property is less than or equal to a value.
QGalleryFilter::GreaterThanEquals4The filter tests if a meta-data property is greater than or equal to a value.
QGalleryFilter::Contains5The filter tests if a meta-data property contains a sub-string.
QGalleryFilter::StartsWith6The filter tests if a meta-data property starts with a string.
QGalleryFilter::EndsWith7The filter tests if a meta-data property ends with a string.
QGalleryFilter::Wildcard8The filter tests if a meta-data property matches a wildcard string.
QGalleryFilter::RegExp9The filter tests if a meta-data property matches a regular expression.

enum QGalleryFilter::Type

Identifies the type of a filter.

ConstantValueDescription
QGalleryFilter::Invalid0The filter is a null QGalleryFilter.
QGalleryFilter::Intersection1The filter is a QGalleryIntersectionFilter.
QGalleryFilter::Union2The filter is a QGalleryUnionFilter.
QGalleryFilter::MetaData3The filter is a QGalleryMetaDataFilter.

Member Function Documentation

QGalleryFilter::QGalleryFilter ()

Constructs a gallery filter of type Invalid.

QGalleryFilter::QGalleryFilter ( const QGalleryFilter & filter )

Constructs a copy of a gallery filter.

This function was introduced in Qt Mobility 1.1.

QGalleryFilter::QGalleryFilter ( const QGalleryIntersectionFilter & filter )

Constructs a copy of a gallery intersection filter.

This function was introduced in Qt Mobility 1.1.

QGalleryFilter::QGalleryFilter ( const QGalleryUnionFilter & filter )

Constructs a copy of a gallery union filter.

This function was introduced in Qt Mobility 1.1.

QGalleryFilter::QGalleryFilter ( const QGalleryMetaDataFilter & filter )

Constructs a copy of a gallery meta-data filter.

This function was introduced in Qt Mobility 1.1.

QGalleryFilter::~QGalleryFilter ()

Destroys a gallery filter.

bool QGalleryFilter::isValid () const

Returns true if the type() of the filter is not equal to Invalid.

This function was introduced in Qt Mobility 1.1.

QGalleryIntersectionFilter QGalleryFilter::toIntersectionFilter () const

Casts a filter to an intersection filter. The filter must be of type Intersection or this will return an Invalid filter.

Returns a QGalleryIntersectionFilter.

This function was introduced in Qt Mobility 1.1.

QGalleryMetaDataFilter QGalleryFilter::toMetaDataFilter () const

Casts a filter to a meta-data filter. The filter must be of type MetaData or this will return an Invalid filter.

Returns a QGalleryMetaDataFilter.

This function was introduced in Qt Mobility 1.1.

QGalleryUnionFilter QGalleryFilter::toUnionFilter () const

Casts a filter to a union filter. The filter must be of type Union or this will return an Invalid filter.

Returns a QGalleryUnionFilter.

This function was introduced in Qt Mobility 1.1.

Type QGalleryFilter::type () const

Returns the type of a filter.

This function was introduced in Qt Mobility 1.1.

QGalleryFilter & QGalleryFilter::operator= ( const QGalleryFilter & filter )

Assigns the value of filter to another filter.

This function was introduced in Qt Mobility 1.1.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.