NotebookFilter

Since: BlackBerry 10.3.0

#include <bb/pim/notebook/NotebookFilter>

To link against this class, add the following line to your .pro file: LIBS += -lbbpim

The NotebookFilter class represents a filter that can be used to search and count notebook entries.

A NotebookFilter is used to retrieve lists or counts of Notebook objects that match certain criteria, which are specified using setter functions. Filter criteria are cumulative; a Notebook must match all criteria set on the filter in order to be accepted by the filter.

Example usage:
   // Here's how to create a filter for retrieving Notebook objects.
   // Note that service objects are potentially expensive to initialize, so you should not create
   // them on a per-use basis as is done below.
   NotebookService service;
   NotebookFilter filter;
   filter.setSearchString( "Physics Class Notes" );
   QList<Notebook> folders = service.notebooks( filter );


Overview

Public Functions Index

NotebookFilter ()
NotebookFilter (const NotebookFilter &other)
~NotebookFilter ()
bb::pim::account::AccountKeyaccountKey () const
boolhasSearchString () const
NotebookConstraint::TypesnotebookConstraints () const
NotebookDomain::TypesnotebookDomains () const
booloperator!= (const NotebookFilter &other) const
NotebookFilter &operator= (const NotebookFilter &other)
booloperator== (const NotebookFilter &other) const
voidresetAccountKey ()
voidresetNotebookConstraints ()
voidresetNotebookDomains ()
voidresetSearchString ()
QStringsearchString () const
voidsetAccountKey (const bb::pim::account::AccountKey accountKey)
voidsetNotebookConstraints (NotebookConstraint::Types notebookConstraints)
voidsetNotebookDomains (const NotebookDomain::Types domains)
voidsetSearchString (const QString &searchString)

Public Functions

NotebookFilter ()

Constructs a new NotebookFilter with no criteria set.

Since:

BlackBerry 10.3.0

NotebookFilter (

Copy constructor.

This function constructs a NotebookFilter containing exactly the same criteria as the provided NotebookFilter.

Parameters
other

The NotebookFilter to be copied.

Since:

BlackBerry 10.3.0

~NotebookFilter ()

Destructor.

Since:

BlackBerry 10.3.0

bb::pim::account::AccountKey accountKey ()

Retrieves the account key criterion being used by this NotebookFilter.

Return:

The account key criterion being used by this NotebookFilter

Since:

BlackBerry 10.3.0

bool hasSearchString ()

Determines whether this NotebookFilter is filtering based on search strings.

Return:

True if this NotebookFilter is filtering based on search strings, false otherwise.

Since:

BlackBerry 10.3.0

NotebookConstraint::Types notebookConstraints ()

Retrieves the notebook constraints criterion being used by this NotebookFilter.

Return:

The notebook constraints criterion being used by this NotebookFilter

Since:

BlackBerry 10.3.0

NotebookDomain::Types notebookDomains ()

Retrieves the notebook domain criterion being used by this NotebookFilter.

Return:

The notebook domain criterion being used by this NotebookFilter

Since:

BlackBerry 10.3.0

bool operator!= (

Inequality operator.

This operator determines if this NotebookFilter has any different values from another NotebookFilter.

Parameters
other

The NotebookFilter to compare to.

Return:

True if any of the values are not considered equal, false otherwise.

Since:

BlackBerry 10.3.0

NotebookFilter & operator= (

Assignment operator.

This operator copies all values from the provided NotebookFilter into this NotebookFilter.

Parameters
other

The NotebookFilter from which to copy all values.

Return:

A reference to this NotebookFilter.

Since:

BlackBerry 10.3.0

bool operator== (

Equality operator.

This operator determines if this NotebookFilter has the same values as another NotebookFilter. If two NotebookFilter objects are considered equal by this operator, they will both accept the same NotebookEntry objects.

Parameters
other

The NotebookFilter to compare to.

Return:

True if the values are considered equal, false otherwise.

Since:

BlackBerry 10.3.0

void resetAccountKey ()

Resets the account key for this NotebookFilter.

Calling this function prevents this NotebookFilter from rejecting Notebook objects based on account key, and is equivalent to invoking setAccountKey() with a Account::InvalidKey account key.

Since:

BlackBerry 10.3.0

void resetNotebookConstraints ()

Resets the notebook constraints criterion for this NotebookFilter.

Calling this function prevents this NotebookFilter from rejecting Notebook objects based on notebook constraints, and is equivalent to invoking setNotebookConstraints() with 0.

Since:

BlackBerry 10.3.0

void resetNotebookDomains ()

Resets the notebook domain criteria for this NotebookFilter.

Calling this function prevents this NotebookFilter from rejecting Notebook objects based on notebook domain, and is equivalent to invoking setNotebookDomain() with a (NotebookDomain::Tasks | NotebookDomain::Notes) NotebookDomain::Types

Since:

BlackBerry 10.3.0

void resetSearchString ()

Resets the search string for this NotebookFilter.

Calling this function prevents this NotebookFilter from rejecting Notebook objects based on search string, and is equivalent to invoking setSearchString() with a null QString.

Since:

BlackBerry 10.3.0

QString searchString ()

Retrieves the search string criterion being used by this NotebookFilter.

Return:

The search string criterion being used by this NotebookFilter. If a search string criterion is not set or has been reset, a null QString is returned.

Since:

BlackBerry 10.3.0

void setAccountKey (
  • const bb::pim::account::AccountKeyaccountKey)

Sets the account key of this NotebookFilter.

Once set, this NotebookFilter will only accept Notebook objects that belong to the account specified by the account key

Parameters
accountKey

The account key criterion for this NotebookFilter.

Since:

BlackBerry 10.3.0

void setNotebookConstraints (
  • NotebookConstraint::TypesnotebookConstraints)

Sets the notebook constraints criterion for this NotebookFilter.

Once set, this NotebookFilter will only accept Notebook objects with the specified notebook constraints.

Parameters
notebookConstraints

The notebook constraints criterion for this NotebookFilter.

Since:

BlackBerry 10.3.0

void setNotebookDomains (
  • const NotebookDomain::Typesdomains)

Sets the notebook domain of this NotebookFilter.

Once set, this NotebookFilter will only accept Notebook objects containing the specified notebook domain within the provided search field or fields.

Parameters
domains

The notebook domain criterion for this NotebookFilter.

Since:

BlackBerry 10.3.0

void setSearchString (

Sets the search string for this NotebookFilter.

Once set, this NotebookFilter will only accept Notebook objects containing the specified search string within the provided search field or fields. If the provided string is null or empty, then this NotebookFilter does not reject Notebook objects based on search strings.

Parameters
searchString

The search string criterion for this NotebookFilter. The maximum length of the search string that can be handled by the NotebookService is 250 characters.

Since:

BlackBerry 10.3.0

Last modified: 2015-01-22



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus