calendarsupport
utils.cpp
Go to the documentation of this file.
113 KCalCore::Incidence::List CalendarSupport::incidencesFromItems( const Akonadi::Item::List &items )
434 Akonadi::Collection::List CalendarSupport::collectionsFromModel( const QAbstractItemModel *model,
488 return index.data( Akonadi::EntityTreeModel::CollectionIdRole ).value<Akonadi::Collection::Id>();
491 Akonadi::Collection::List CalendarSupport::collectionsFromIndexes( const QModelIndexList &indexes )
500 QString CalendarSupport::displayName( Akonadi::ETMCalendar *calendar, const Akonadi::Collection &c )
583 const QString resourceDisplayName = Akonadi::AgentManager::self()->instance(resourceName).name();
584 return i18nc( "%1 is the folder name", "%1 in %2", fullCollection.displayName(), resourceDisplayName );
631 return fullCollection.name().startsWith( QLatin1String( "akonadi_" ) ) ? i18n( "My %1", dName ) : fullCollection.name();
725 targetFile = KFileDialog::getSaveFileName( KUrl( QLatin1String("kfiledialog:///saveAttachment/") + fileName ),
769 bool CalendarSupport::mergeCalendar(const QString &srcFilename, const KCalCore::Calendar::Ptr &destCalendar)
static QByteArray findMostCommonType(const Akonadi::Item::List &items)
Definition: utils.cpp:220
int daysTo(const QDate &d) const
virtual int rowCount(const QModelIndex &parent) const =0
QString & append(QChar ch)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
void push_back(const T &value)
CALENDARSUPPORT_EXPORT QMimeData * createMimeData(const Akonadi::Item &item, const KDateTime::Spec &timeSpec)
creates mime data object for dragging an akonadi item containing an incidence
Definition: utils.cpp:206
CALENDARSUPPORT_EXPORT QDrag * createDrag(const Akonadi::Item &item, const KDateTime::Spec &timeSpec, QWidget *parent)
creates a drag object for dragging an akonadi item containing an incidence
Definition: utils.cpp:213
CALENDARSUPPORT_EXPORT bool isValidIncidenceItemUrl(const KUrl &url, const QStringList &supportedMimeTypes)
returns true if the URL represents an Akonadi item and has one of the given mimetypes.
Definition: utils.cpp:278
bool contains(const QString &str, Qt::CaseSensitivity cs) const
bool isEmpty() const
T value() const
bool exists() const
CALENDARSUPPORT_EXPORT KCalCore::Incidence::Ptr incidence(const Akonadi::Item &item)
returns the incidence from an akonadi item, or a null pointer if the item has no such payload ...
Definition: utils.cpp:78
static bool itemMatches(const Akonadi::Item &item, const KCalCore::CalFilter *filter)
Definition: utils.cpp:258
CALENDARSUPPORT_EXPORT bool hasIncidence(const Akonadi::Item &item)
returns whether an Akonadi item contains an incidence
Definition: utils.cpp:150
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
CALENDARSUPPORT_EXPORT KCalCore::Todo::Ptr todo(const Akonadi::Item &item)
returns the todo from an akonadi item, or a null pointer if the item has no such payload ...
Definition: utils.cpp:124
int dayOfWeek() const
CALENDARSUPPORT_EXPORT bool mimeDataHasIncidence(const QMimeData *mimeData)
Definition: utils.cpp:354
bool isValid() const
CALENDARSUPPORT_EXPORT Akonadi::Collection selectCollection(QWidget *parent, int &dialogCode, const QStringList &mimeTypes, const Akonadi::Collection &defaultCollection=Akonadi::Collection())
Shows a modal dialog that allows to select a collection.
Definition: utils.cpp:395
void append(const T &value)
bool isEmpty() const
int removeAll(const T &value)
CALENDARSUPPORT_EXPORT QString subMimeTypeForIncidence(const KCalCore::Incidence::Ptr &incidence)
Definition: utils.cpp:637
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
CALENDARSUPPORT_EXPORT QList< KUrl > todoItemUrls(const QMimeData *mimeData)
Definition: utils.cpp:337
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
CALENDARSUPPORT_EXPORT QStringList categories(const KCalCore::Incidence::List &incidences)
Definition: utils.cpp:752
CALENDARSUPPORT_EXPORT KCalCore::Incidence::List incidences(const QMimeData *mimeData, const KDateTime::Spec &timeSpec)
Definition: utils.cpp:377
CALENDARSUPPORT_EXPORT KCalCore::Incidence::List incidencesFromItems(const Akonadi::Item::List &items)
returns incidence pointers from an akonadi item.
Definition: utils.cpp:113
CALENDARSUPPORT_EXPORT KCalCore::Event::List eventsFromItems(const Akonadi::Item::List &items)
returns event pointers from an akonadi item, or a null pointer if the item has no such payload ...
Definition: utils.cpp:102
iterator end()
QString toLower() const
bool contains(QChar ch, Qt::CaseSensitivity cs) const
CALENDARSUPPORT_EXPORT Akonadi::Item::List itemsFromModel(const QAbstractItemModel *model, const QModelIndex &parentIndex=QModelIndex(), int start=0, int end=-1)
Definition: utils.cpp:457
QModelIndex child(int row, int column) const
CALENDARSUPPORT_EXPORT QString displayName(Akonadi::ETMCalendar *calendar, const Akonadi::Collection &coll)
Definition: utils.cpp:500
CALENDARSUPPORT_EXPORT bool hasEvent(const Akonadi::Item &item)
returns whether an Akonadi item contains an event
Definition: utils.cpp:155
QVariant data(int role) const
QList< QUrl > urls() const
CALENDARSUPPORT_EXPORT Akonadi::Collection::List collectionsFromIndexes(const QModelIndexList &indexes)
Definition: utils.cpp:491
CALENDARSUPPORT_EXPORT Akonadi::Collection collectionFromIndex(const QModelIndex &index)
Definition: utils.cpp:481
QModelIndex sibling(int row, int column) const
typedef ConstIterator
CALENDARSUPPORT_EXPORT bool hasTodo(const Akonadi::Item &item)
returns whether an Akonadi item contains a todo
Definition: utils.cpp:160
CALENDARSUPPORT_EXPORT void saveAttachments(const Akonadi::Item &item, QWidget *parentWidget=0)
Definition: utils.cpp:688
QString left(int n) const
CALENDARSUPPORT_EXPORT Akonadi::Collection::Id collectionIdFromIndex(const QModelIndex &index)
Definition: utils.cpp:486
CALENDARSUPPORT_EXPORT bool mimeDataHasTodo(const QMimeData *mimeData)
Definition: utils.cpp:349
CALENDARSUPPORT_EXPORT QList< QDate > workDays(const QDate &start, const QDate &end)
Returns a list containing work days between start and .
Definition: utils.cpp:642
QDate addDays(int ndays) const
CALENDARSUPPORT_EXPORT KCalCore::Journal::Ptr journal(const Akonadi::Item &item)
returns the journal from an akonadi item, or a null pointer if the item has no such payload ...
Definition: utils.cpp:137
CALENDARSUPPORT_EXPORT Akonadi::Item::List applyCalFilter(const Akonadi::Item::List &items, const KCalCore::CalFilter *filter)
Applies a filter to a list of items containing incidences.
Definition: utils.cpp:268
CALENDARSUPPORT_EXPORT KCalCore::Event::Ptr event(const Akonadi::Item &item)
returns the event from an akonadi item, or a null pointer if the item has no such payload ...
Definition: utils.cpp:88
const_iterator constEnd() const
CALENDARSUPPORT_EXPORT bool canDecode(const QMimeData *mimeData)
returns true if the mime data object contains any of the following:
Definition: utils.cpp:317
const_iterator constBegin() const
QString absolutePath() const
CALENDARSUPPORT_EXPORT QStringList holiday(const QDate &date)
Returns a list of holidays that occur at.
Definition: utils.cpp:675
CALENDARSUPPORT_EXPORT Akonadi::Item itemFromIndex(const QModelIndex &index)
Definition: utils.cpp:426
int compare(const QString &other) const
CALENDARSUPPORT_EXPORT KCalCore::Todo::List todos(const QMimeData *mimeData, const KDateTime::Spec &timeSpec)
Definition: utils.cpp:360
static bool containsValidIncidenceItemUrl(const QList< QUrl > &urls)
Definition: utils.cpp:301
CALENDARSUPPORT_EXPORT bool hasJournal(const Akonadi::Item &item)
returns whether an Akonadi item contains a journal
Definition: utils.cpp:165
iterator begin()
CALENDARSUPPORT_EXPORT Akonadi::Collection::List collectionsFromModel(const QAbstractItemModel *model, const QModelIndex &parentIndex=QModelIndex(), int start=0, int end=-1)
Definition: utils.cpp:434
CALENDARSUPPORT_EXPORT QList< KUrl > incidenceItemUrls(const QMimeData *mimeData)
Definition: utils.cpp:326
CALENDARSUPPORT_EXPORT bool mergeCalendar(const QString &srcFilename, const KCalCore::Calendar::Ptr &destCalendar)
Definition: utils.cpp:769
CALENDARSUPPORT_EXPORT bool isValidTodoItemUrl(const KUrl &url)
returns true if the URL represents an Akonadi item and has one of the given mimetypes.
Definition: utils.cpp:308
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.