QOrganizerItemFilter Class

The QOrganizerItemFilter class is used to filter items made available through a backend. More...

Public Types

enum FilterType { InvalidFilter, DetailFilter, DetailFieldFilter, DetailRangeFilter, ..., DefaultFilter }
enum MatchFlag { MatchExactly, MatchContains, MatchStartsWith, MatchEndsWith, MatchFixedString, MatchCaseSensitive }
flags MatchFlags

Public Functions

QOrganizerItemFilter()
QOrganizerItemFilter(const QOrganizerItemFilter &other)
~QOrganizerItemFilter()
FilterType type() const
bool operator!=(const QOrganizerItemFilter &other) const
QOrganizerItemFilter &operator=(const QOrganizerItemFilter &other)
bool operator==(const QOrganizerItemFilter &other) const
const Q_ORGANIZER_EXPORT operator&(const QOrganizerItemFilter &left, const QOrganizerItemFilter &right)
Q_ORGANIZER_EXPORT operator<<(QDebug dbg, const QOrganizerItemFilter &filter)
const Q_ORGANIZER_EXPORT operator|(const QOrganizerItemFilter &left, const QOrganizerItemFilter &right)

Detailed Description

The QOrganizerItemFilter class is used to filter items made available through a backend.

This class is used as a parameter to various functions offered by QOrganizerManager and QOrganizerAbstractRequest, to allow filtering of items which have certain details or properties.

Member Type Documentation

enum QOrganizerItemFilter::FilterType

This enumeration describes the type of the filter.

ConstantValueDescription
QOrganizerItemFilter::InvalidFilter0An invalid filter which matches nothing.
QOrganizerItemFilter::DetailFilter1A filter which matches items containing a detail identical to that used by the filter for matching.
QOrganizerItemFilter::DetailFieldFilter2A filter which matches items containing a detail of a particular type, having a given value for a particular field.
QOrganizerItemFilter::DetailRangeFilter3A filter which matches items containing a detail of a particular type, whose values are within a particular range.
QOrganizerItemFilter::IntersectionFilter4A filter which matches all items that are matched by all filters it includes.
QOrganizerItemFilter::UnionFilter5A filter which matches any organizer item that is matched by any of the filters it includes.
QOrganizerItemFilter::IdFilter6A filter which matches any organizer item whose ID is contained in a particular list of organizer item IDs.
QOrganizerItemFilter::CollectionFilter7A filter which matches any items whose collection ID is contained in a particular list of collection IDs.
QOrganizerItemFilter::DefaultFilter8A filter which matches everything.

enum QOrganizerItemFilter::MatchFlag
flags QOrganizerItemFilter::MatchFlags

This enumeration describes the semantics of matching followed by the filter.

ConstantValueDescription
QOrganizerItemFilter::MatchExactlyQt::MatchExactlyPerforms QVariant-based matching.
QOrganizerItemFilter::MatchContainsQt::MatchContainsThe search term is contained in the item.
QOrganizerItemFilter::MatchStartsWithQt::MatchStartsWithThe search term matches the start of the item.
QOrganizerItemFilter::MatchEndsWithQt::MatchEndsWithThe search term matches the end of the item.
QOrganizerItemFilter::MatchFixedStringQt::MatchFixedStringPerforms string-based matching. String-based comparisons are case-insensitive unless the MatchCaseSensitive flag is also specified.
QOrganizerItemFilter::MatchCaseSensitiveQt::MatchCaseSensitiveThe search is case sensitive.

The MatchFlags type is a typedef for QFlags<MatchFlag>. It stores an OR combination of MatchFlag values.

Member Function Documentation

QOrganizerItemFilter::QOrganizerItemFilter()

Constructs an empty filter of type DefaultFilter.

QOrganizerItemFilter::QOrganizerItemFilter(const QOrganizerItemFilter &other)

Constructs a new copy of other.

QOrganizerItemFilter::~QOrganizerItemFilter()

Cleans up the memory used by this filter.

FilterType QOrganizerItemFilter::type() const

Returns the type of the filter.

bool QOrganizerItemFilter::operator!=(const QOrganizerItemFilter &other) const

Returns true if this filter is not identical to the other filter.

See also operator==().

QOrganizerItemFilter &QOrganizerItemFilter::operator=(const QOrganizerItemFilter &other)

Assigns this filter to be other.

bool QOrganizerItemFilter::operator==(const QOrganizerItemFilter &other) const

Returns true if this filter is identical to the other filter.

See also operator!=().

Related Non-Members

const Q_ORGANIZER_EXPORT operator&(const QOrganizerItemFilter &left, const QOrganizerItemFilter &right)

Returns a filter which is the intersection of the left and right filters.

See also QOrganizerItemIntersectionFilter.

Q_ORGANIZER_EXPORT operator<<(QDebug dbg, const QOrganizerItemFilter &filter)

Outputs filter to the debug stream dbg.

const Q_ORGANIZER_EXPORT operator|(const QOrganizerItemFilter &left, const QOrganizerItemFilter &right)

Returns a filter which is the union of the left and right filters.

See also QOrganizerItemUnionFilter.