• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kalarm

Public Member Functions | Static Public Member Functions | List of all members
CollectionControlModel Class Reference

#include <collectionmodel.h>

Inherits FavoriteCollectionsModel.

Public Member Functions

virtual QVariant data (const QModelIndex &, int role=Qt::DisplayRole) const
 

Static Public Member Functions

static Akonadi::Collection collectionForResource (const QString &resourceId)
 
static Akonadi::Collection destination (CalEvent::Type, QWidget *promptParent=0, bool noPrompt=false, bool *cancelled=0)
 
static Akonadi::Collection::List enabledCollections (CalEvent::Type, bool writable)
 
static Akonadi::Collection getStandard (CalEvent::Type, bool useDefault=false)
 
static CollectionControlModel * instance ()
 
static bool isEnabled (const Akonadi::Collection &, CalEvent::Type)
 
static bool isStandard (Akonadi::Collection &, CalEvent::Type)
 
static int isWritableEnabled (const Akonadi::Collection &, CalEvent::Type)
 
static int isWritableEnabled (const Akonadi::Collection &, CalEvent::Type, KACalendar::Compat &format)
 
static void setAskDestinationPolicy (bool ask)
 
static CalEvent::Types setEnabled (const Akonadi::Collection &, CalEvent::Types, bool enabled)
 
static void setStandard (Akonadi::Collection &, CalEvent::Type, bool standard)
 
static void setStandard (Akonadi::Collection &, CalEvent::Types)
 
static CalEvent::Types standardTypes (const Akonadi::Collection &, bool useDefault=false)
 
static QString typeListForDisplay (CalEvent::Types)
 

Detailed Description

Definition at line 168 of file collectionmodel.h.

Member Function Documentation

Collection CollectionControlModel::collectionForResource ( const QString &  resourceId)
static

Return the collection ID for a given resource ID.

Returns
collection ID, or -1 if the resource is not in KAlarm's list.

Definition at line 1247 of file collectionmodel.cpp.

QVariant CollectionControlModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Definition at line 1330 of file collectionmodel.cpp.

Collection CollectionControlModel::destination ( CalEvent::Type  type,
QWidget *  promptParent = 0,
bool  noPrompt = false,
bool *  cancelled = 0 
)
static

Find the collection to be used to store an event of a given type.

This will be the standard collection for the type, but if this is not valid, the user will be prompted to select a collection.

Parameters
noPromptdon't prompt the user even if the standard collection is not valid
cancelledIf non-null: set to true if the user cancelled the prompt dialogue; set to false if any other error.

Definition at line 1180 of file collectionmodel.cpp.

Collection::List CollectionControlModel::enabledCollections ( CalEvent::Type  type,
bool  writable 
)
static

Return the enabled collections which contain a specified mime type.

If 'writable' is true, only writable collections are included.

Definition at line 1229 of file collectionmodel.cpp.

Collection CollectionControlModel::getStandard ( CalEvent::Type  type,
bool  useDefault = false 
)
static

Return the standard collection for a specified mime type.

Parameters
useDefaultfalse to return the defined standard collection, if any; true to return the standard or only collection for the type. Reply = invalid collection if there is no standard collection.

Definition at line 993 of file collectionmodel.cpp.

CollectionControlModel * CollectionControlModel::instance ( )
static

Definition at line 653 of file collectionmodel.cpp.

bool CollectionControlModel::isEnabled ( const Akonadi::Collection &  ,
CalEvent::Type   
)
static

Return whether a collection is enabled (and valid).

Definition at line 715 of file collectionmodel.cpp.

bool CollectionControlModel::isStandard ( Akonadi::Collection &  collection,
CalEvent::Type  type 
)
static

Return whether a collection is the standard collection for a specified mime type.

Definition at line 1018 of file collectionmodel.cpp.

int CollectionControlModel::isWritableEnabled ( const Akonadi::Collection &  collection,
CalEvent::Type  type 
)
static

Return whether a collection is both enabled and fully writable for a given alarm type, i.e.

with create/delete/change rights and compatible with the current KAlarm calendar format. Optionally, the enabled status can be ignored.

Returns
1 = fully enabled and writable, 0 = enabled and writable except that backend calendar is in an old KAlarm format, -1 = read-only, disabled or incompatible format.

Definition at line 968 of file collectionmodel.cpp.

int CollectionControlModel::isWritableEnabled ( const Akonadi::Collection &  collection,
CalEvent::Type  type,
KACalendar::Compat &  format 
)
static

Return whether a collection is both enabled and fully writable for a given alarm type, i.e.

with create/delete/change rights and compatible with the current KAlarm calendar format. Optionally, the enabled status can be ignored.

Parameters
formatIf the reply is false, and the calendar is not read-only but its backend calendar storage format is not the current KAlarm format, format is set to the calendar format used by the backend. If the calendar is non-writable for any other reason, format is set to KACalendar::Current.
Returns
1 = fully enabled and writable, 0 = enabled and writable except that backend calendar is in an old KAlarm format, -1 = read-only (if format == KACalendar::Current), or disabled or incompatible format.

Definition at line 973 of file collectionmodel.cpp.

static void CollectionControlModel::setAskDestinationPolicy ( bool  ask)
inlinestatic

Set whether the user should be prompted for the destination collection to add alarms to.

Parameters
asktrue = prompt for which collection to add to; false = add to standard collection.

Definition at line 247 of file collectionmodel.h.

CalEvent::Types CollectionControlModel::setEnabled ( const Akonadi::Collection &  ,
CalEvent::Types  ,
bool  enabled 
)
static

Enable or disable a collection (if it is valid) for specified alarm types.

Note that this only changes the status for the specified alarm types.

Returns
alarm types which can be enabled

Definition at line 736 of file collectionmodel.cpp.

void CollectionControlModel::setStandard ( Akonadi::Collection &  collection,
CalEvent::Type  type,
bool  standard 
)
static

Set or clear a collection as the standard collection for a specified mime type.

This does not affect its status for other mime types.

Definition at line 1066 of file collectionmodel.cpp.

void CollectionControlModel::setStandard ( Akonadi::Collection &  collection,
CalEvent::Types  types 
)
static

Set which mime types a collection is the standard collection for.

Its standard status is cleared for other mime types.

Definition at line 1124 of file collectionmodel.cpp.

CalEvent::Types CollectionControlModel::standardTypes ( const Akonadi::Collection &  ,
bool  useDefault = false 
)
static

Return the alarm type(s) for which a collection is the standard collection.

Parameters
useDefaultfalse to return the defined standard types, if any; true to return the types for which it is the standard or only collection.

Definition at line 1032 of file collectionmodel.cpp.

QString CollectionControlModel::typeListForDisplay ( CalEvent::Types  alarmTypes)
static

Return a bulleted list of alarm types for inclusion in an i18n message.

Definition at line 946 of file collectionmodel.cpp.


The documentation for this class was generated from the following files:
  • collectionmodel.h
  • collectionmodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm

Skip menu "kalarm"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal