Classes | Public Types | Public Member Functions | List of all members
mKCal::Notebook Class Reference

Placeholder for Notebook parameters. More...

#include <notebook.h>

Classes

class  Private
 Private class that helps to provide binary compatibility between releases.
 

Public Types

typedef QSharedPointer< NotebookPtr
 A shared pointer to a Notebook object. More...
 
typedef QSharedPointer< const NotebookConstPtr
 A shared pointer to a non-mutable Notebook. More...
 
typedef QList< PtrList
 List of notebooks. More...
 

Public Member Functions

 Notebook ()
 Constructs a new Notebook object. More...
 
 Notebook (const QString &name, const QString &description)
 
 Notebook (const QString &uid, const QString &name, const QString &description, const QString &color, bool isShared, bool isMaster, bool oviSync, bool isReadOnly, bool isVisible)
 
 Notebook (const QString &uid, const QString &name, const QString &description, const QString &color, bool isShared, bool isMaster, bool isSynchronized, bool isReadOnly, bool isVisible, const QString &pluginName, const QString &account, int attachmentSize)
 
 Notebook (const Notebook &n)
 Constructs an Notebook as a copy of another Notebook object. More...
 
virtual ~Notebook ()
 Destructor. More...
 
QString uid () const
 Returns the uid of the notebook. More...
 
void setUid (const QString &uid)
 Set the uid of the notebook. More...
 
QString name () const
 Returns the name of the notebook. More...
 
void setName (const QString &name)
 Set the name of the notebook. More...
 
QString description () const
 Returns the notebook description. More...
 
void setDescription (const QString &description)
 Set the description of the notebook. More...
 
QString color () const
 Returns the notebook color in the form of #RRGGBB. More...
 
void setColor (const QString &color)
 Set notebook color. More...
 
bool isShared () const
 Returns true if notebook is shared. More...
 
void setIsShared (bool isShared)
 Set notebook sharing. More...
 
bool isMaster () const
 Returns true if notebook is a master. More...
 
void setIsMaster (bool isMaster)
 Set notebook master status. More...
 
bool isSynchronized () const
 Returns true if notebook is synchronized to OVI. More...
 
void setIsSynchronized (bool oviSync)
 Set notebook OVI sync. More...
 
bool isReadOnly () const
 Returns true if notebook is read-only. More...
 
void setIsReadOnly (bool isReadOnly)
 Set notebook into read-only mode. More...
 
bool isVisible () const
 Returns true if notebook is visible. More...
 
void setIsVisible (bool isVisible)
 Set notebook visibility. More...
 
bool isRunTimeOnly () const
 Returns true if the notebook is never going to be saved; false otherwise. More...
 
void setRunTimeOnly (bool isRunTime)
 Determines if the notebook is only in memory and won't be saved into any storage. More...
 
QDateTime syncDate () const
 Returns sync date. More...
 
void setSyncDate (const QDateTime &syncDate)
 Sets sync date of notebook. More...
 
QString pluginName () const
 Gets the name of the plugin that created the notebook. More...
 
void setPluginName (const QString &pluginName)
 Sets the plugin name that created the notebook (if any). More...
 
QString account () const
 Gets the account associated with the notebook. More...
 
void setAccount (const QString &account)
 Sets the account associated with the notebook (if any). More...
 
int attachmentSize () const
 Gets the maximum size of attachments allowed in the notebook. More...
 
void setAttachmentSize (int size)
 Sets the size of attachments allowed in the notebook (if any). More...
 
QDateTime modifiedDate () const
 Returns modification date, in UTC. More...
 
void setModifiedDate (const QDateTime &modifiedDate)
 Sets modified date of notebook. More...
 
QDateTime creationDate () const
 Returns creation date, in UTC. More...
 
void setCreationDate (const QDateTime &date)
 Sets creation date of notebook. More...
 
bool isDefault () const
 Returns true if notebook is default notebook. More...
 
void setIsDefault (bool isDefault)
 Set notebook to default notebook. More...
 
bool isShareable () const
 Returns true if notebook is shareable. More...
 
void setIsShareable (bool isShareable)
 Set notebook to shareable. More...
 
QStringList sharedWith () const
 Gets the people shared with the notebook. More...
 
QString sharedWithStr () const
 Gets the people shared with the notebook. More...
 
void setSharedWith (const QStringList &sharedWith)
 Sets the people shared with the notebook. More...
 
void setSharedWithStr (const QString &sharedWith)
 Sets the people shared with the notebook. More...
 
QString syncProfile () const
 Gets the sync profile of the notebook. More...
 
void setSyncProfile (const QString &syncProfile)
 Sets the sync profile of the notebook. More...
 
void setEventsAllowed (bool eventsAllowed)
 Set whether the events are allowed to this notebook or not. More...
 
bool eventsAllowed () const
 Accessor querying whether events are allowed in this notebook. More...
 
void setJournalsAllowed (bool journalsAllowed)
 Set whether the journals are allowed to this notebook or not. More...
 
bool journalsAllowed () const
 Accessor querying whether journals are allowed in this notebook. More...
 
void setTodosAllowed (bool todosAllowed)
 Set whether the todos are allowed to this notebook or not. More...
 
bool todosAllowed () const
 Accessor querying whether todos are allowed in this notebook. More...
 
bool incidenceAllowed (KCalendarCore::Incidence::Ptr incidence) const
 Utility function to find out whether the incidence is allowed within this notebook or not. More...
 
void setFlags (int flags)
 Set the notebook flags. More...
 
int flags () const
 Get the flags associated with the notebook. More...
 
void setCustomProperty (const QByteArray &key, const QString &value)
 Set a key/value property. More...
 
QString customProperty (const QByteArray &key, const QString &defaultValue=QString()) const
 A getter function for a custom property, see setCustomProperty(). More...
 
QList< QByteArray > customPropertyKeys () const
 List the keys of all stored custom properties. More...
 
Notebookoperator= (const Notebook &other)
 Assignment operator. More...
 
bool operator== (const Notebook &notebook) const
 Compare this with notebook for equality. More...
 

Detailed Description

Placeholder for Notebook parameters.

Member Typedef Documentation

◆ ConstPtr

typedef QSharedPointer<const Notebook> mKCal::Notebook::ConstPtr

A shared pointer to a non-mutable Notebook.

◆ List

typedef QList<Ptr> mKCal::Notebook::List

List of notebooks.

◆ Ptr

typedef QSharedPointer<Notebook> mKCal::Notebook::Ptr

A shared pointer to a Notebook object.

Constructor & Destructor Documentation

◆ Notebook() [1/5]

Notebook::Notebook ( )
explicit

Constructs a new Notebook object.

◆ Notebook() [2/5]

Notebook::Notebook ( const QString &  name,
const QString &  description 
)
explicit

◆ Notebook() [3/5]

Notebook::Notebook ( const QString &  uid,
const QString &  name,
const QString &  description,
const QString &  color,
bool  isShared,
bool  isMaster,
bool  oviSync,
bool  isReadOnly,
bool  isVisible 
)
explicit

◆ Notebook() [4/5]

Notebook::Notebook ( const QString &  uid,
const QString &  name,
const QString &  description,
const QString &  color,
bool  isShared,
bool  isMaster,
bool  isSynchronized,
bool  isReadOnly,
bool  isVisible,
const QString &  pluginName,
const QString &  account,
int  attachmentSize 
)
explicit

◆ Notebook() [5/5]

Notebook::Notebook ( const Notebook n)
explicit

Constructs an Notebook as a copy of another Notebook object.

Parameters
nis the Notebook to copy.

◆ ~Notebook()

Notebook::~Notebook ( )
virtual

Destructor.

Member Function Documentation

◆ account()

QString Notebook::account ( ) const

Gets the account associated with the notebook.

Returns
The account.
See also
setAccount().

◆ attachmentSize()

int Notebook::attachmentSize ( ) const

Gets the maximum size of attachments allowed in the notebook.

Returns
The size in bytes.
See also
setAttachmentSize().

◆ color()

QString Notebook::color ( ) const

Returns the notebook color in the form of #RRGGBB.

See also
setColor().

◆ creationDate()

QDateTime Notebook::creationDate ( ) const

Returns creation date, in UTC.

◆ customProperty()

QString Notebook::customProperty ( const QByteArray &  key,
const QString &  defaultValue = QString() 
) const

A getter function for a custom property, see setCustomProperty().

Parameters
keyThe name of the property.
defaultA default value if the property does not exists.

◆ customPropertyKeys()

QList< QByteArray > Notebook::customPropertyKeys ( ) const

List the keys of all stored custom properties.

◆ description()

QString Notebook::description ( ) const

Returns the notebook description.

See also
setDescription().

◆ eventsAllowed()

bool Notebook::eventsAllowed ( ) const

Accessor querying whether events are allowed in this notebook.

◆ flags()

int Notebook::flags ( ) const

Get the flags associated with the notebook.

This utility function mostly facilitates easy database loading and saving, as storing the 'flags' is equivalent to getting all the booleans in this API. The content of flags is not public as such.

◆ incidenceAllowed()

bool Notebook::incidenceAllowed ( KCalendarCore::Incidence::Ptr  incidence) const

Utility function to find out whether the incidence is allowed within this notebook or not.

◆ isDefault()

bool Notebook::isDefault ( ) const

Returns true if notebook is default notebook.

See also
setIsDefault().

◆ isMaster()

bool Notebook::isMaster ( ) const

Returns true if notebook is a master.

See also
setIsMaster().

◆ isReadOnly()

bool Notebook::isReadOnly ( ) const

Returns true if notebook is read-only.

See also
setIsReadOnly().

◆ isRunTimeOnly()

bool Notebook::isRunTimeOnly ( ) const

Returns true if the notebook is never going to be saved; false otherwise.

See also
setRunTimeOnly().

◆ isShareable()

bool Notebook::isShareable ( ) const

Returns true if notebook is shareable.

See also
setIsShareable().

◆ isShared()

bool Notebook::isShared ( ) const

Returns true if notebook is shared.

See also
setIsShared().

◆ isSynchronized()

bool Notebook::isSynchronized ( ) const

Returns true if notebook is synchronized to OVI.

See also
setIsOviSync().

◆ isVisible()

bool Notebook::isVisible ( ) const

Returns true if notebook is visible.

See also
setIsVisible().

◆ journalsAllowed()

bool Notebook::journalsAllowed ( ) const

Accessor querying whether journals are allowed in this notebook.

◆ modifiedDate()

QDateTime Notebook::modifiedDate ( ) const

Returns modification date, in UTC.

Every time a property is set, the time is updated.

◆ name()

QString Notebook::name ( ) const

Returns the name of the notebook.

See also
setName()

◆ operator=()

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

Assignment operator.

◆ operator==()

bool Notebook::operator== ( const Notebook notebook) const

Compare this with notebook for equality.

◆ pluginName()

QString Notebook::pluginName ( ) const

Gets the name of the plugin that created the notebook.

Returns
The name of the plugin that owns the notebook.
See also
setPluginName().

◆ setAccount()

void Notebook::setAccount ( const QString &  account)

Sets the account associated with the notebook (if any).

Parameters
accountThe account
See also
account().

◆ setAttachmentSize()

void Notebook::setAttachmentSize ( int  size)

Sets the size of attachments allowed in the notebook (if any).

Parameters
sizeThe size in bytes. 0 means no attachments allowed; -1 means unlimited size.
See also
attachmentSize().

◆ setColor()

void Notebook::setColor ( const QString &  color)

Set notebook color.

Parameters
colornotebook color.

◆ setCreationDate()

void Notebook::setCreationDate ( const QDateTime &  date)

Sets creation date of notebook.

Used internally.

Parameters
datecreation date.
See also
creationDate().

◆ setCustomProperty()

void Notebook::setCustomProperty ( const QByteArray &  key,
const QString &  value 
)

Set a key/value property.

Setting the value to the empty string will remove the property.

Parameters
keyThe name of the property.
valueThe value of the property.

◆ setDescription()

void Notebook::setDescription ( const QString &  description)

Set the description of the notebook.

Parameters
descriptionnotebook description.

◆ setEventsAllowed()

void Notebook::setEventsAllowed ( bool  eventsAllowed)

Set whether the events are allowed to this notebook or not.

By default, this is true.

◆ setFlags()

void Notebook::setFlags ( int  flags)

Set the notebook flags.

This utility function mostly facilitates easy database loading and saving, as setting the 'flags' is equivalent to setting all the booleans in this API. The content of flags is not public as such.

Parameters
flagsThe flags to be set for the notebook.

◆ setIsDefault()

void Notebook::setIsDefault ( bool  isDefault)

Set notebook to default notebook.

Parameters
isDefaulttrue to set default.

◆ setIsMaster()

void Notebook::setIsMaster ( bool  isMaster)

Set notebook master status.

The actual meaning is storage specific.

Parameters
isMastertrue to set master status

◆ setIsReadOnly()

void Notebook::setIsReadOnly ( bool  isReadOnly)

Set notebook into read-only mode.

This means that storages will not save any notes for the notebook. Typically used for showing shared notebooks without write permission.

Parameters
isReadOnlytrue to set read-only mode

◆ setIsShareable()

void Notebook::setIsShareable ( bool  isShareable)

Set notebook to shareable.

Parameters
isShareabletrue to set shareable.

◆ setIsShared()

void Notebook::setIsShared ( bool  isShared)

Set notebook sharing.

The actual meaning is storage specific.

Parameters
isSharedtrue to allow sharing.

◆ setIsSynchronized()

void Notebook::setIsSynchronized ( bool  oviSync)

Set notebook OVI sync.

The actual meaning is storage specific.

Parameters
oviSynctrue to set OVI sync.

◆ setIsVisible()

void Notebook::setIsVisible ( bool  isVisible)

Set notebook visibility.

Calendar will check this value for including/excluding incidences into search lists.

Parameters
isVisibletrue to set visible mode.

◆ setJournalsAllowed()

void Notebook::setJournalsAllowed ( bool  journalsAllowed)

Set whether the journals are allowed to this notebook or not.

By default, this is true.

◆ setModifiedDate()

void Notebook::setModifiedDate ( const QDateTime &  modifiedDate)

Sets modified date of notebook.

Used internally by storages and synchronization services.

Parameters
modifiedDatelast modification date.
See also
modifiedDate().

◆ setName()

void Notebook::setName ( const QString &  name)

Set the name of the notebook.

Parameters
namenotebook name

◆ setPluginName()

void Notebook::setPluginName ( const QString &  pluginName)

Sets the plugin name that created the notebook (if any).

Parameters
pluginNameThe name of the plugin.
See also
pluginName();

◆ setRunTimeOnly()

void Notebook::setRunTimeOnly ( bool  isRunTime)

Determines if the notebook is only in memory and won't be saved into any storage.

Parameters
isRunTimetrue if the incidence is never going to be saved.

◆ setSharedWith()

void Notebook::setSharedWith ( const QStringList &  sharedWith)

Sets the people shared with the notebook.

Parameters
sharedWithThe list of people shared with
See also
sharedWith().

◆ setSharedWithStr()

void Notebook::setSharedWithStr ( const QString &  sharedWith)

Sets the people shared with the notebook.

Parameters
sharedWithThe string of people shared with.
See also
sharedWithStr().

◆ setSyncDate()

void Notebook::setSyncDate ( const QDateTime &  syncDate)

Sets sync date of notebook.

Used internally by storages and synchronization services.

Parameters
syncDatelast sync date.
See also
syncDate().

◆ setSyncProfile()

void Notebook::setSyncProfile ( const QString &  syncProfile)

Sets the sync profile of the notebook.

Parameters
syncProfilestring of sync profile
See also
syncProfile();

◆ setTodosAllowed()

void Notebook::setTodosAllowed ( bool  todosAllowed)

Set whether the todos are allowed to this notebook or not.

By default, this is true.

◆ setUid()

void Notebook::setUid ( const QString &  uid)

Set the uid of the notebook.

Typically called internally by the storage.

Parameters
uidunique identifier.

◆ sharedWith()

QStringList Notebook::sharedWith ( ) const

Gets the people shared with the notebook.

Returns
list of people shared with.
See also
setSharedWith().

◆ sharedWithStr()

QString Notebook::sharedWithStr ( ) const

Gets the people shared with the notebook.

Returns
string of people shared with.
See also
setSharedWithStr().

◆ syncDate()

QDateTime Notebook::syncDate ( ) const

Returns sync date.

See also
setSyncDate().

◆ syncProfile()

QString Notebook::syncProfile ( ) const

Gets the sync profile of the notebook.

Returns
string sync profile.
See also
setSyncProfile()

◆ todosAllowed()

bool Notebook::todosAllowed ( ) const

Accessor querying whether todos are allowed in this notebook.

◆ uid()

QString Notebook::uid ( ) const

Returns the uid of the notebook.

See also
setUid().

The documentation for this class was generated from the following files:

Generated on Wed Jun 9 2021 13:59:25 for libextendedkcal by doxygen 1.9.1