QOrganizerItemFetchHint Class

The QOrganizerItemFetchHint class provides hints to the manager about which organizer item information needs to be retrieved. More...

Header: #include <QOrganizerItemFetchHint>

Public Types

enum OptimizationHint { AllRequired, NoActionPreferences, NoBinaryBlobs }
flags OptimizationHints

Public Functions

QOrganizerItemFetchHint()
QOrganizerItemFetchHint(const QOrganizerItemFetchHint &other)
~QOrganizerItemFetchHint()
QList<QOrganizerItemDetail::DetailType> detailTypesHint() const
OptimizationHints optimizationHints() const
void setDetailTypesHint(const QList<QOrganizerItemDetail::DetailType> &detailTypes)
void setOptimizationHints(OptimizationHints hints)
bool operator!=(const QOrganizerItemFetchHint &other) const
QOrganizerItemFetchHint &operator=(const QOrganizerItemFetchHint &other)
bool operator==(const QOrganizerItemFetchHint &other) const
Q_ORGANIZER_EXPORT operator<<(QDebug dbg, const QOrganizerItemFetchHint &hint)

Detailed Description

The QOrganizerItemFetchHint class provides hints to the manager about which organizer item information needs to be retrieved.

All of the hints may be ignored at the discretion of the manager, however if a manager is able to optimize retrieval of organizer items due to hints, it may do so. If a manager ignores a hint, it must retrieve the full set of data that the hint refers to.

The fetch hint contains:

  • a list of detail definition names which the client is interested in (empty if interested in all detail definitions)
  • some optimization flags which allow the client to tell the backend if they are not interested in binary blobs (images etc).

Important note: if certain organizer item is retrieved with fetch hint set, normal saving will result in the loss of information that is not retrieved. Partial save should be used to avoid information loss.

Member Type Documentation

enum QOrganizerItemFetchHint::OptimizationHint
flags QOrganizerItemFetchHint::OptimizationHints

This enum defines flags which may be set to inform the backend that the client does not require certain information.

ConstantValueDescription
QOrganizerItemFetchHint::AllRequired0x0Tells the backend that all information is required.
QOrganizerItemFetchHint::NoActionPreferences0x2Tells the backend that the client does not require retrieved organizer items to include a cache of action preferences.
QOrganizerItemFetchHint::NoBinaryBlobs0x4Tells the backend that the client does not require retrieved organizer items to include binary blobs such as thumbnail images.

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

Member Function Documentation

QOrganizerItemFetchHint::QOrganizerItemFetchHint()

Constructs a new organizer item fetch hint which requests that the backend fetch all information.

QOrganizerItemFetchHint::QOrganizerItemFetchHint(const QOrganizerItemFetchHint &other)

Constructs a new organizer item fetch hint as a copy of other.

QOrganizerItemFetchHint::~QOrganizerItemFetchHint()

Frees any memory in use by the fetch hint.

QList<QOrganizerItemDetail::DetailType> QOrganizerItemFetchHint::detailTypesHint() const

Returns the list of detail types that identify details which should be retrieved by the manager when fetching items.

See also setDetailTypesHint().

OptimizationHints QOrganizerItemFetchHint::optimizationHints() const

Returns the optimization hint flags specified by the client.

See also setOptimizationHints().

void QOrganizerItemFetchHint::setDetailTypesHint(const QList<QOrganizerItemDetail::DetailType> &detailTypes)

Sets the list of detail types to detailTypes that identify details which should be retrieved' by the manager when fetching items.

See also detailTypesHint().

void QOrganizerItemFetchHint::setOptimizationHints(OptimizationHints hints)

Sets the optimization hint flags specified by the client to hints.

See also optimizationHints().

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

Returns true if this fetch hint is not the same as that of the other fetch hint.

See also operator==().

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

Assigns this fetch hint to the other.

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

Returns true if this fetch hint is the same as that of the other fetch hint; false otherwise.

See also operator!=().

Related Non-Members

Q_ORGANIZER_EXPORT operator<<(QDebug dbg, const QOrganizerItemFetchHint &hint)

Outputs hint to the debug stream dbg.