NotebookEntryDescription

Since: BlackBerry 10.0.0

#include <bb/pim/notebook/NotebookEntryDescription>

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

A NotebookEntryDescription is the text content of a NotebookEntry along with its respective type.

The type value of the NotebookEntryDescription indicates how the text should be displayed and edited.

Example usage:
// Here's how to create an HTML description.
NotebookEntryDescription description;
description.setText( "This is an <B>HTML</B> description.",
                       NotebookEntryDescription::HTML );
See also:

NotebookEntry


Overview

Public Types Index

enum Type

PLAIN_TEXT = 0, HTML = 1

Public Functions Index

NotebookEntryDescription ()
NotebookEntryDescription (const NotebookEntryDescription &other)
~NotebookEntryDescription ()
boolisEmpty () const
boolisValid () const
booloperator!= (const NotebookEntryDescription &other) const
NotebookEntryDescription &operator= (const NotebookEntryDescription &other)
booloperator== (const NotebookEntryDescription &other) const
QStringplainText () const
voidsetText (const QString &text, NotebookEntryDescription::Type type=PLAIN_TEXT)
QStringtext () const
NotebookEntryDescription::Typetype () const

Public Types

Type

An enumeration of supported description types.

NotebookEntryDescription objects with a type other than PLAIN_TEXT have special formatting. See the class-level documentation for more details.

Since:

BlackBerry 10.0.0

PLAIN_TEXT = 0

Indicates that the description is stored as plaintext; implies no special formatting or behavior.

Since:

BlackBerry 10.0.0

HTML = 1

Indicates that the description is stored as HTML; implies HTML5 tags are used for formatting and resource embedding.

Since:

BlackBerry 10.0.0

Public Functions

NotebookEntryDescription ()

Constructs a new NotebookEntryDescription.

A default-constructed NotebookEntryDescription is considered invalid until its text value is set.

See also:

isValid()

Since:

BlackBerry 10.0.0

NotebookEntryDescription (

Copy constructor.

Constructs a NotebookEntryDescription containing exactly the same values as the provided NotebookEntryDescription.

Parameters
other

The NotebookEntryDescription to be copied.

Since:

BlackBerry 10.0.0

~NotebookEntryDescription ()

Destructor.

Since:

BlackBerry 10.0.0

bool isEmpty ()

Determines whether or not this NotebookEntryDescription is empty.

A NotebookEntryDescription is considered empty if its text is empty.

Return:

true if this NotebookEntryDescription object's text is empty, false otherwise.

Since:

BlackBerry 10.0.0

bool isValid ()

Determines whether or not this NotebookEntryDescription is valid.

A default-constructed NotebookEntryDescription is considered invalid until its text value is set.

Return:

true if this NotebookEntryDescription is valid, false otherwise.

Since:

BlackBerry 10.0.0

bool operator!= (

Inequality operator.

This operator indicates whether the provided NotebookEntryDescription contains a different type or text than this NotebookEntryDescription.

Parameters
other

The NotebookEntryDescription to compare to this one for inequality of type or text.

Return:

true if the provided NotebookEntryDescription has a different type or text than this one, false otherwise.

Since:

BlackBerry 10.0.0

NotebookEntryDescription & operator= (

Assignment operator.

Copies all values from the provided NotebookEntryDescription into this NotebookEntryDescription.

Parameters
other

The NotebookEntryDescription from which to copy all values.

Return:

A reference to this NotebookEntryDescription.

Since:

BlackBerry 10.0.0

bool operator== (

Equality operator.

This operator indicates whether the provided NotebookEntryDescription contains the same type and text as this NotebookEntryDescription.

Parameters
other

The NotebookEntryDescription to compare to this one for equality of type and text.

Return:

true if the provided NotebookEntryDescription has the same type and text as this one, false otherwise.

Since:

BlackBerry 10.0.0

QString plainText ()

Retrieves the text for this NotebookEntryDescription as plaintext.

If this NotebookEntryDescription object's type is PLAIN_TEXT, this function simply returns its text (as if text() had been invoked). Otherwise, this function returns a plaintext representation of this NotebookEntryDescription object's text.

Return:

A plaintext representation of this NotebookEntryDescription object's text.

Since:

BlackBerry 10.0.0

void setText (

Sets the text and type for this NotebookEntryDescription.

Parameters
text

The new text for this NotebookEntryDescription.

type

The type of this NotebookEntryDescription.

Since:

BlackBerry 10.0.0

QString text ()

Retrieves the text for this NotebookEntryDescription.

Return:

The text for this NotebookEntryDescription.

Since:

BlackBerry 10.0.0

NotebookEntryDescription::Type type ()

Retrieves the type of this NotebookEntryDescription.

Return:

The Type of this NotebookEntryDescription.

Since:

BlackBerry 10.0.0

Last modified: 2014-03-13

comments powered by Disqus