Commit 467fc123 authored by Volker Krause's avatar Volker Krause
Browse files

Adapt to KCalendarCore namespace changes

parent 41b9a485
......@@ -36,8 +36,8 @@
#include <Akonadi/Calendar/IncidenceChanger>
#include <CalendarSupport/Utils>
#include <KCalCore/Incidence>
#include <KCalCore/Todo>
#include <KCalendarCore/Incidence>
#include <KCalendarCore/Todo>
#include <KCalUtils/RecurrenceActions>
......@@ -90,7 +90,7 @@ int MarcusBains::Private::todayColumn() const
const QDate currentDate = QDate::currentDate();
int col = 0;
const KCalCore::DateList dateList = mAgenda->dateList();
const KCalendarCore::DateList dateList = mAgenda->dateList();
for (const QDate &date : dateList) {
if (date == currentDate) {
return QApplication::isRightToLeft() ? mAgenda->columns() - 1 - col : col;
......@@ -304,7 +304,7 @@ public:
QPoint mSelectionEndCell;
// List of dates to be displayed
KCalCore::DateList mSelectedDates;
KCalendarCore::DateList mSelectedDates;
// The AgendaItem, which has been right-clicked last
QPointer<AgendaItem> mClickedItem;
......@@ -371,9 +371,9 @@ Agenda::~Agenda()
delete d;
}
KCalCore::Incidence::Ptr Agenda::selectedIncidence() const
KCalendarCore::Incidence::Ptr Agenda::selectedIncidence() const
{
return d->mSelectedItem ? d->mSelectedItem->incidence() : KCalCore::Incidence::Ptr();
return d->mSelectedItem ? d->mSelectedItem->incidence() : KCalendarCore::Incidence::Ptr();
}
QDate Agenda::selectedIncidenceDate() const
......@@ -602,7 +602,7 @@ bool Agenda::eventFilter_drag(QObject *obj, QDropEvent *de)
}
const QList<QUrl> incidenceUrls = CalendarSupport::incidenceItemUrls(md);
const KCalCore::Incidence::List incidences = CalendarSupport::incidences(md);
const KCalendarCore::Incidence::List incidences = CalendarSupport::incidences(md);
Q_ASSERT(!incidenceUrls.isEmpty() || !incidences.isEmpty());
......@@ -694,7 +694,7 @@ bool Agenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
} else {
AgendaItem::QPtr item = qobject_cast<AgendaItem *>(object);
if (item) {
KCalCore::Incidence::Ptr incidence = item->incidence();
KCalendarCore::Incidence::Ptr incidence = item->incidence();
if (incidence->isReadOnly()) {
d->mActionItem = nullptr;
} else {
......@@ -755,8 +755,8 @@ bool Agenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
QPoint indicatorPos = gridToContents(contentsToGrid(viewportPos));
if (object != this) {
AgendaItem::QPtr moveItem = qobject_cast<AgendaItem *>(object);
KCalCore::Incidence::Ptr incidence
= moveItem ? moveItem->incidence() : KCalCore::Incidence::Ptr();
KCalendarCore::Incidence::Ptr incidence
= moveItem ? moveItem->incidence() : KCalendarCore::Incidence::Ptr();
if (incidence && !incidence->isReadOnly()) {
if (!d->mActionItem) {
setNoActionCursor(moveItem, viewportPos);
......@@ -1189,7 +1189,7 @@ void Agenda::endItemAction()
bool multiModify = false;
// FIXME: do the cloning here...
KCalCore::Incidence::Ptr incidence = d->mActionItem->incidence();
KCalendarCore::Incidence::Ptr incidence = d->mActionItem->incidence();
const auto recurrenceId = d->mActionItem->occurrenceDateTime();
d->mItemMoved
......@@ -1202,8 +1202,8 @@ void Agenda::endItemAction()
//get the main event and not the exception
if (incidence->hasRecurrenceId() && !incidence->recurs()) {
KCalCore::Incidence::Ptr mainIncidence;
KCalCore::Calendar::Ptr cal = d->mCalendar->findCalendar(incidence)->getCalendar();
KCalendarCore::Incidence::Ptr mainIncidence;
KCalendarCore::Calendar::Ptr cal = d->mCalendar->findCalendar(incidence)->getCalendar();
if (CalendarSupport::hasEvent(incidence)) {
mainIncidence = cal->event(incidence->uid());
} else if (CalendarSupport::hasTodo(incidence)) {
......@@ -1228,7 +1228,7 @@ void Agenda::endItemAction()
modify = true;
multiModify = true;
d->mChanger->startAtomicOperation(i18n("Dissociate event from recurrence"));
KCalCore::Incidence::Ptr newInc(KCalCore::Calendar::createException(
KCalendarCore::Incidence::Ptr newInc(KCalendarCore::Calendar::createException(
incidence, recurrenceId, thisAndFuture));
if (newInc) {
newInc->removeCustomProperty("VOLATILE", "AKONADI-ID");
......@@ -1357,8 +1357,8 @@ void Agenda::setActionCursor(int actionType, bool acting)
void Agenda::setNoActionCursor(const AgendaItem::QPtr &moveItem, const QPoint &pos)
{
const KCalCore::Incidence::Ptr item
= moveItem ? moveItem->incidence() : KCalCore::Incidence::Ptr();
const KCalendarCore::Incidence::Ptr item
= moveItem ? moveItem->incidence() : KCalendarCore::Incidence::Ptr();
const bool noResize = CalendarSupport::hasTodo(item);
......@@ -1458,7 +1458,7 @@ void Agenda::placeSubCells(const AgendaItem::QPtr &placeItem)
#if 0
qCDebug(CALENDARVIEW_LOG);
if (placeItem) {
KCalCore::Incidence::Ptr event = placeItem->incidence();
KCalendarCore::Incidence::Ptr event = placeItem->incidence();
if (!event) {
qCDebug(CALENDARVIEW_LOG) << " event is 0";
} else {
......@@ -1804,7 +1804,7 @@ void Agenda::setStartTime(const QTime &startHour)
/*
Insert AgendaItem into agenda.
*/
AgendaItem::QPtr Agenda::insertItem(const KCalCore::Incidence::Ptr &incidence, const QDateTime &recurrenceId, int X, int YTop, int YBottom, int itemPos, int itemCount, bool isSelected)
AgendaItem::QPtr Agenda::insertItem(const KCalendarCore::Incidence::Ptr &incidence, const QDateTime &recurrenceId, int X, int YTop, int YBottom, int itemPos, int itemCount, bool isSelected)
{
if (d->mAllDayMode) {
qCDebug(CALENDARVIEW_LOG) << "using this in all-day mode is illegal.";
......@@ -1847,7 +1847,7 @@ AgendaItem::QPtr Agenda::insertItem(const KCalCore::Incidence::Ptr &incidence, c
/*
Insert all-day AgendaItem into agenda.
*/
AgendaItem::QPtr Agenda::insertAllDayItem(const KCalCore::Incidence::Ptr &incidence, const QDateTime &recurrenceId, int XBegin, int XEnd, bool isSelected)
AgendaItem::QPtr Agenda::insertAllDayItem(const KCalendarCore::Incidence::Ptr &incidence, const QDateTime &recurrenceId, int XBegin, int XEnd, bool isSelected)
{
if (!d->mAllDayMode) {
qCCritical(CALENDARVIEW_LOG) << "using this in non all-day mode is illegal.";
......@@ -1881,7 +1881,7 @@ AgendaItem::QPtr Agenda::insertAllDayItem(const KCalCore::Incidence::Ptr &incide
return agendaItem;
}
AgendaItem::QPtr Agenda::createAgendaItem(const KCalCore::Incidence::Ptr &incidence, int itemPos, int itemCount, const QDateTime &recurrenceId, bool isSelected)
AgendaItem::QPtr Agenda::createAgendaItem(const KCalendarCore::Incidence::Ptr &incidence, int itemPos, int itemCount, const QDateTime &recurrenceId, bool isSelected)
{
if (!incidence) {
qCWarning(CALENDARVIEW_LOG) << "Agenda::createAgendaItem() item is invalid.";
......@@ -1900,9 +1900,9 @@ AgendaItem::QPtr Agenda::createAgendaItem(const KCalCore::Incidence::Ptr &incide
return agendaItem;
}
void Agenda::insertMultiItem(const KCalCore::Incidence::Ptr &event, const QDateTime &recurrenceId, int XBegin, int XEnd, int YTop, int YBottom, bool isSelected)
void Agenda::insertMultiItem(const KCalendarCore::Incidence::Ptr &event, const QDateTime &recurrenceId, int XBegin, int XEnd, int YTop, int YBottom, bool isSelected)
{
KCalCore::Event::Ptr ev = CalendarSupport::event(event);
KCalendarCore::Event::Ptr ev = CalendarSupport::event(event);
Q_ASSERT(ev);
if (d->mAllDayMode) {
qCDebug(CALENDARVIEW_LOG) << "using this in all-day mode is illegal.";
......@@ -1966,7 +1966,7 @@ void Agenda::insertMultiItem(const KCalCore::Incidence::Ptr &event, const QDateT
marcus_bains();
}
void Agenda::removeIncidence(const KCalCore::Incidence::Ptr &incidence)
void Agenda::removeIncidence(const KCalendarCore::Incidence::Ptr &incidence)
{
if (!incidence) {
qCWarning(CALENDARVIEW_LOG) << "Agenda::removeIncidence() incidence is invalid"
......@@ -2231,11 +2231,11 @@ void Agenda::deselectItem()
return;
}
const KCalCore::Incidence::Ptr selectedItem = d->mSelectedItem->incidence();
const KCalendarCore::Incidence::Ptr selectedItem = d->mSelectedItem->incidence();
for (AgendaItem::QPtr item : qAsConst(d->mItems)) {
if (item) {
const KCalCore::Incidence::Ptr itemInc = item->incidence();
const KCalendarCore::Incidence::Ptr itemInc = item->incidence();
if (itemInc && selectedItem && itemInc->uid() == selectedItem->uid()) {
item->select(false);
}
......@@ -2252,7 +2252,7 @@ void Agenda::selectItem(const AgendaItem::QPtr &item)
}
deselectItem();
if (item == nullptr) {
Q_EMIT incidenceSelected(KCalCore::Incidence::Ptr(), QDate());
Q_EMIT incidenceSelected(KCalendarCore::Incidence::Ptr(), QDate());
return;
}
d->mSelectedItem = item;
......@@ -2316,13 +2316,13 @@ void Agenda::calculateWorkingHours()
= int(4 * d->mGridSpacingY * (tmp.hour() + tmp.minute() / 60. + tmp.second() / 3600.) - 1);
}
void Agenda::setDateList(const KCalCore::DateList &selectedDates)
void Agenda::setDateList(const KCalendarCore::DateList &selectedDates)
{
d->mSelectedDates = selectedDates;
marcus_bains();
}
KCalCore::DateList Agenda::dateList() const
KCalendarCore::DateList Agenda::dateList() const
{
return d->mSelectedDates;
}
......
......@@ -31,7 +31,7 @@
#include <Item>
#include <KCalCore/Todo>
#include <KCalendarCore/Todo>
#include <QFrame>
#include <QScrollArea>
......@@ -71,7 +71,7 @@ public:
~Agenda() override;
Q_REQUIRED_RESULT KCalCore::Incidence::Ptr selectedIncidence() const;
Q_REQUIRED_RESULT KCalendarCore::Incidence::Ptr selectedIncidence() const;
Q_REQUIRED_RESULT QDate selectedIncidenceDate() const;
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
......@@ -119,11 +119,11 @@ public:
void setStartTime(const QTime &startHour);
AgendaItem::QPtr insertItem(const KCalCore::Incidence::Ptr &incidence, const QDateTime &recurrenceId, int X, int YTop, int YBottom, int itemPos, int itemCount, bool isSelected);
AgendaItem::QPtr insertItem(const KCalendarCore::Incidence::Ptr &incidence, const QDateTime &recurrenceId, int X, int YTop, int YBottom, int itemPos, int itemCount, bool isSelected);
AgendaItem::QPtr insertAllDayItem(const KCalCore::Incidence::Ptr &event, const QDateTime &recurrenceId, int XBegin, int XEnd, bool isSelected);
AgendaItem::QPtr insertAllDayItem(const KCalendarCore::Incidence::Ptr &event, const QDateTime &recurrenceId, int XBegin, int XEnd, bool isSelected);
void insertMultiItem(const KCalCore::Incidence::Ptr &event, const QDateTime &recurrenceId, int XBegin, int XEnd, int YTop, int YBottom, bool isSelected);
void insertMultiItem(const KCalendarCore::Incidence::Ptr &event, const QDateTime &recurrenceId, int XBegin, int XEnd, int YTop, int YBottom, bool isSelected);
/**
Removes an event and all its multi-items from the agenda. This function
......@@ -132,7 +132,7 @@ public:
slot deleteItemsToDelete() (called by QTimer::singleShot ).
@param incidence The pointer to the incidence that should be removed.
*/
void removeIncidence(const KCalCore::Incidence::Ptr &incidence);
void removeIncidence(const KCalendarCore::Incidence::Ptr &incidence);
void changeColumns(int columns);
......@@ -151,8 +151,8 @@ public:
void setHolidayMask(QVector<bool> *);
void setDateList(const KCalCore::DateList &selectedDates);
Q_REQUIRED_RESULT KCalCore::DateList dateList() const;
void setDateList(const KCalendarCore::DateList &selectedDates);
Q_REQUIRED_RESULT KCalendarCore::DateList dateList() const;
void setCalendar(const EventViews::MultiViewCalendar::Ptr &cal);
......@@ -193,20 +193,20 @@ Q_SIGNALS:
void newTimeSpanSignal(const QPoint &, const QPoint &);
void newStartSelectSignal();
void showIncidenceSignal(const KCalCore::Incidence::Ptr &);
void editIncidenceSignal(const KCalCore::Incidence::Ptr &);
void deleteIncidenceSignal(const KCalCore::Incidence::Ptr &);
void showIncidencePopupSignal(const KCalCore::Incidence::Ptr &, const QDate &);
void showIncidenceSignal(const KCalendarCore::Incidence::Ptr &);
void editIncidenceSignal(const KCalendarCore::Incidence::Ptr &);
void deleteIncidenceSignal(const KCalendarCore::Incidence::Ptr &);
void showIncidencePopupSignal(const KCalendarCore::Incidence::Ptr &, const QDate &);
void showNewEventPopupSignal();
void incidenceSelected(const KCalCore::Incidence::Ptr &, const QDate &);
void incidenceSelected(const KCalendarCore::Incidence::Ptr &, const QDate &);
void lowerYChanged(int);
void upperYChanged(int);
void startDragSignal(const KCalCore::Incidence::Ptr &);
void droppedIncidences(const KCalCore::Incidence::List &, const QPoint &gpos, bool allDay);
void startDragSignal(const KCalendarCore::Incidence::Ptr &);
void droppedIncidences(const KCalendarCore::Incidence::List &, const QPoint &gpos, bool allDay);
void droppedIncidences(const QList<QUrl> &, const QPoint &gpos, bool allDay);
void enableAgendaUpdate(bool enable);
......@@ -229,7 +229,7 @@ private:
RESIZERIGHT
};
AgendaItem::QPtr createAgendaItem(const KCalCore::Incidence::Ptr &incidence, int itemPos, int itemCount, const QDateTime &recurrentId, bool isSelected);
AgendaItem::QPtr createAgendaItem(const KCalendarCore::Incidence::Ptr &incidence, int itemPos, int itemCount, const QDateTime &recurrentId, bool isSelected);
protected:
/**
......
......@@ -51,7 +51,7 @@
#include <QMimeData>
#include <QLocale>
using namespace KCalCore;
using namespace KCalendarCore;
using namespace EventViews;
//-----------------------------------------------------------------------------
......@@ -67,7 +67,7 @@ QPixmap *AgendaItem::eventPxmp = nullptr;
//-----------------------------------------------------------------------------
AgendaItem::AgendaItem(EventView *eventView, const MultiViewCalendar::Ptr &calendar, const KCalCore::Incidence::Ptr &item, int itemPos, int itemCount, const QDateTime &qd, bool isSelected,
AgendaItem::AgendaItem(EventView *eventView, const MultiViewCalendar::Ptr &calendar, const KCalendarCore::Incidence::Ptr &item, int itemPos, int itemCount, const QDateTime &qd, bool isSelected,
QWidget *parent)
: QWidget(parent)
, mEventView(eventView)
......@@ -144,15 +144,15 @@ void AgendaItem::updateIcons()
mIconGroupTent = false;
mIconOrganizer = true;
} else {
KCalCore::Attendee me = mIncidence->attendeeByMails(mEventView->kcalPreferences()->allEmails());
KCalendarCore::Attendee me = mIncidence->attendeeByMails(mEventView->kcalPreferences()->allEmails());
if (!me.isNull()) {
if (me.status() == KCalCore::Attendee::NeedsAction && me.RSVP()) {
if (me.status() == KCalendarCore::Attendee::NeedsAction && me.RSVP()) {
mIconReply = true;
mIconGroup = false;
mIconGroupTent = false;
mIconOrganizer = false;
} else if (me.status() == KCalCore::Attendee::Tentative) {
} else if (me.status() == KCalendarCore::Attendee::Tentative) {
mIconReply = false;
mIconGroup = false;
mIconGroupTent = true;
......@@ -212,7 +212,7 @@ bool AgendaItem::dissociateFromMultiItem()
return true;
}
void AgendaItem::setIncidence(const KCalCore::Incidence::Ptr &incidence)
void AgendaItem::setIncidence(const KCalendarCore::Incidence::Ptr &incidence)
{
mValid = false;
if (incidence) {
......@@ -642,7 +642,7 @@ void AgendaItem::addAttendee(const QString &newAttendee)
QString name, email;
KEmailAddress::extractEmailAddressAndName(newAttendee, email, name);
if (!(name.isEmpty() && email.isEmpty())) {
mIncidence->addAttendee(KCalCore::Attendee(name, email));
mIncidence->addAttendee(KCalendarCore::Attendee(name, email));
KMessageBox::information(
this,
i18n("Attendee \"%1\" added to the calendar item \"%2\"",
......@@ -666,7 +666,7 @@ void AgendaItem::dropEvent(QDropEvent *e)
bool decoded = md->hasText();
QString text = md->text();
if (decoded && text.startsWith(QLatin1String("file:"))) {
mIncidence->addAttachment(KCalCore::Attachment(text));
mIncidence->addAttachment(KCalendarCore::Attachment(text));
return;
}
......@@ -869,13 +869,13 @@ void AgendaItem::paintEvent(QPaintEvent *ev)
QString longH;
if (!isMultiItem()) {
shortH = QLocale().toString(mIncidence->dateTime(
KCalCore::Incidence::RoleDisplayStart).toLocalTime().time(),
KCalendarCore::Incidence::RoleDisplayStart).toLocalTime().time(),
QLocale::ShortFormat);
if (CalendarSupport::hasEvent(mIncidence)) {
longH = i18n("%1 - %2",
shortH,
QLocale().toString(mIncidence->dateTime(KCalCore::Incidence::RoleEnd).
QLocale().toString(mIncidence->dateTime(KCalendarCore::Incidence::RoleEnd).
toLocalTime().time(), QLocale::ShortFormat));
} else {
longH = shortH;
......@@ -886,7 +886,7 @@ void AgendaItem::paintEvent(QPaintEvent *ev)
longH = shortH;
} else {
shortH = QLocale().toString(mIncidence->dateTime(
KCalCore::Incidence::RoleEnd).toLocalTime().time(),
KCalendarCore::Incidence::RoleEnd).toLocalTime().time(),
QLocale::ShortFormat);
longH = i18n("- %1", shortH);
}
......@@ -972,13 +972,13 @@ void AgendaItem::paintEvent(QPaintEvent *ev)
shortH.clear();
longH.clear();
if (const KCalCore::Event::Ptr event = CalendarSupport::event(mIncidence)) {
if (const KCalendarCore::Event::Ptr event = CalendarSupport::event(mIncidence)) {
if (event->isMultiDay(QTimeZone::systemTimeZone())) {
// multi-day, all-day event
shortH
= i18n("%1 - %2",
QLocale().toString(mIncidence->dtStart().toLocalTime().date()),
QLocale().toString(mIncidence->dateTime(KCalCore::Incidence::RoleEnd).
QLocale().toString(mIncidence->dateTime(KCalendarCore::Incidence::RoleEnd).
toLocalTime().date()));
longH = shortH;
......
......@@ -81,7 +81,7 @@ public:
typedef QPointer<AgendaItem> QPtr;
typedef QList<QPtr> List;
AgendaItem(EventView *eventView, const MultiViewCalendar::Ptr &calendar, const KCalCore::Incidence::Ptr &incidence, int itemPos, int itemCount, const QDateTime &qd, bool isSelected,
AgendaItem(EventView *eventView, const MultiViewCalendar::Ptr &calendar, const KCalendarCore::Incidence::Ptr &incidence, int itemPos, int itemCount, const QDateTime &qd, bool isSelected,
QWidget *parent);
~AgendaItem() override;
......@@ -197,9 +197,9 @@ public:
Q_REQUIRED_RESULT bool dissociateFromMultiItem();
void setIncidence(const KCalCore::Incidence::Ptr &incidence);
void setIncidence(const KCalendarCore::Incidence::Ptr &incidence);
const KCalCore::Incidence::Ptr &incidence() const
const KCalendarCore::Incidence::Ptr &incidence() const
{
return mIncidence;
}
......@@ -288,7 +288,7 @@ private:
EventView *mEventView = nullptr;
MultiViewCalendar::Ptr mCalendar;
KCalCore::Incidence::Ptr mIncidence;
KCalendarCore::Incidence::Ptr mIncidence;
QDateTime mOccurrenceDateTime;
bool mValid;
bool mCloned;
......
This diff is collapsed.
......@@ -30,7 +30,7 @@
#include "eventview.h"
#include "viewcalendar.h"
#include <KCalCore/Todo>
#include <KCalendarCore/Todo>
#include <QFrame>
......@@ -101,7 +101,7 @@ public:
Q_REQUIRED_RESULT Akonadi::Item::List selectedIncidences() const override;
/** returns the currently selected incidence's dates */
Q_REQUIRED_RESULT KCalCore::DateList selectedIncidenceDates() const override;
Q_REQUIRED_RESULT KCalendarCore::DateList selectedIncidenceDates() const override;
/** return the default start/end date/time for new events */
bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay) const override;
......@@ -146,8 +146,8 @@ public:
* this function is able to use multiple calenders
* TODO: replace EventsView::calendar()
*/
virtual KCalCore::Calendar::Ptr calendar2(const KCalCore::Incidence::Ptr &incidence) const;
virtual KCalCore::Calendar::Ptr calendar2(const QString &incidenceIdentifier) const;
virtual KCalendarCore::Calendar::Ptr calendar2(const KCalendarCore::Incidence::Ptr &incidence) const;
virtual KCalendarCore::Calendar::Ptr calendar2(const QString &incidenceIdentifier) const;
void showDates(const QDate &start, const QDate &end, const QDate &preferredMonth = QDate()) override;
......@@ -201,7 +201,7 @@ protected:
*/
void setHolidayMasks();
void removeIncidence(const KCalCore::Incidence::Ptr &inc);
void removeIncidence(const KCalendarCore::Incidence::Ptr &inc);
void resizeEvent(QResizeEvent *resizeEvent) override;
......@@ -210,9 +210,9 @@ public Q_SLOTS:
void updateConfig() override;
/** reschedule the todo to the given x- and y- coordinates.
Third parameter determines all-day (no time specified) */
void slotIncidencesDropped(const KCalCore::Incidence::List &incidences, const QPoint &, bool);
void slotIncidencesDropped(const KCalendarCore::Incidence::List &incidences, const QPoint &, bool);
void slotIncidencesDropped(const QList<QUrl> &incidences, const QPoint &, bool);
void startDrag(const KCalCore::Incidence::Ptr &);
void startDrag(const KCalendarCore::Incidence::Ptr &);
protected Q_SLOTS:
void updateEventIndicatorTop(int newY);
......@@ -233,17 +233,17 @@ protected Q_SLOTS:
void alignAgendas();
private Q_SLOTS:
void slotIncidenceSelected(const KCalCore::Incidence::Ptr &incidence, const QDate &date);
void slotShowIncidencePopup(const KCalCore::Incidence::Ptr &incidence, const QDate &date);
void slotEditIncidence(const KCalCore::Incidence::Ptr &incidence);
void slotShowIncidence(const KCalCore::Incidence::Ptr &incidence);
void slotDeleteIncidence(const KCalCore::Incidence::Ptr &incidence);
void slotIncidenceSelected(const KCalendarCore::Incidence::Ptr &incidence, const QDate &date);
void slotShowIncidencePopup(const KCalendarCore::Incidence::Ptr &incidence, const QDate &date);
void slotEditIncidence(const KCalendarCore::Incidence::Ptr &incidence);
void slotShowIncidence(const KCalendarCore::Incidence::Ptr &incidence);
void slotDeleteIncidence(const KCalendarCore::Incidence::Ptr &incidence);
private:
void init(const QDate &start, const QDate &end);
bool filterByCollectionSelection(const KCalCore::Incidence::Ptr &incidence);
bool filterByCollectionSelection(const KCalendarCore::Incidence::Ptr &incidence);
void setupTimeLabel(TimeLabels *timeLabel);
bool displayIncidence(const KCalCore::Incidence::Ptr &incidence, bool createSelected);
bool displayIncidence(const KCalendarCore::Incidence::Ptr &incidence, bool createSelected);
#ifndef EVENTVIEWS_NODECOS
typedef QList<EventViews::CalendarDecoration::Decoration *> DecorationList;
......
......@@ -173,7 +173,7 @@ void TimeLabels::setAgenda(Agenda *agenda)
int TimeLabels::yposToCell(const int ypos) const
{
const KCalCore::DateList datelist = mAgenda->dateList();
const KCalendarCore::DateList datelist = mAgenda->dateList();
if (datelist.isEmpty()) {
return 0;
}
......@@ -236,7 +236,7 @@ void TimeLabels::paintEvent(QPaintEvent *)
if (!mAgenda) {
return;
}
const KCalCore::DateList datelist = mAgenda->dateList();
const KCalendarCore::DateList datelist = mAgenda->dateList();
if (datelist.isEmpty()) {
return;
}
......
......@@ -37,14 +37,14 @@ MultiViewCalendar::~MultiViewCalendar()
{
}
KCalCore::Calendar::Ptr MultiViewCalendar::getCalendar() const
KCalendarCore::Calendar::Ptr MultiViewCalendar::getCalendar() const
{
return KCalCore::Calendar::Ptr();
return KCalendarCore::Calendar::Ptr();
}
KCalCore::Incidence::List MultiViewCalendar::incidences() const
KCalendarCore::Incidence::List MultiViewCalendar::incidences() const
{
KCalCore::Incidence::List list;
KCalendarCore::Incidence::List list;
for (const ViewCalendar::Ptr &cal : qAsConst(mSubCalendars)) {
if (cal->getCalendar()) {
list += cal->getCalendar()->incidences();
......@@ -58,7 +58,7 @@ int MultiViewCalendar::calendars() const
return mSubCalendars.size();
}
ViewCalendar::Ptr MultiViewCalendar::findCalendar(const KCalCore::Incidence::Ptr &incidence) const
ViewCalendar::Ptr MultiViewCalendar::findCalendar(const KCalendarCore::Incidence::Ptr &incidence) const
{
for (const ViewCalendar::Ptr &cal : qAsConst(mSubCalendars)) {
if (cal->isValid(incidence)) {
......@@ -95,7 +95,7 @@ void MultiViewCalendar::setETMCalendar(const Akonadi::ETMCalendar::Ptr &calendar
addCalendar(mETMCalendar);
}
QString MultiViewCalendar::displayName(const KCalCore::Incidence::Ptr &incidence) const
QString MultiViewCalendar::displayName(const KCalendarCore::Incidence::Ptr &incidence) const
{
ViewCalendar::Ptr cal = findCalendar(incidence);
if (cal) {
......@@ -104,7 +104,7 @@ QString MultiViewCalendar::displayName(const KCalCore::Incidence::Ptr &incidence
return QString();
}
QString MultiViewCalendar::iconForIncidence(const KCalCore::Incidence::Ptr &incidence) const
QString MultiViewCalendar::iconForIncidence(const KCalendarCore::Incidence::Ptr &incidence) const
{
ViewCalendar::Ptr cal = findCalendar(incidence);
if (cal) {
......@@ -113,7 +113,7 @@ QString MultiViewCalendar::iconForIncidence(const KCalCore::Incidence::Ptr &inci
return QString();
}
bool MultiViewCalendar::isValid(const KCalCore::Incidence::Ptr &incidence) const
bool MultiViewCalendar::isValid(const KCalendarCore::Incidence::Ptr &incidence) const
{
ViewCalendar::Ptr cal = findCalendar(incidence);
return cal;
......@@ -125,7 +125,7 @@ bool MultiViewCalendar::isValid(const QString &incidenceIdentifier) const
return cal;
}
QColor MultiViewCalendar::resourceColor(const KCalCore::Incidence::Ptr &incidence) const
QColor MultiViewCalendar::resourceColor(const KCalendarCore::Incidence::Ptr &incidence) const
{
ViewCalendar::Ptr cal = findCalendar(incidence);
if (cal) {
......@@ -134,7 +134,7 @@ QColor MultiViewCalendar::resourceColor(const KCalCore::Incidence::Ptr &incidenc
return QColor();
}
Akonadi::Item MultiViewCalendar::item(const KCalCore::Incidence::Ptr &incidence) const
Akonadi::Item MultiViewCalendar::item(const KCalendarCore::Incidence::Ptr &incidence) const
{
if (mETMCalendar->isValid(incidence)) {
return mETMCalendar->item(incidence);
......@@ -147,7 +147,7 @@ AkonadiViewCalendar::~AkonadiViewCalendar()
{
}
bool AkonadiViewCalendar::isValid(const KCalCore::Incidence::Ptr &incidence) const
bool AkonadiViewCalendar::isValid(const KCalendarCore::Incidence::Ptr &incidence) const
{
if (!mCalendar) {
return false;
......@@ -168,7 +168,7 @@ bool AkonadiViewCalendar::isValid(const QString &incidenceIdentifier) const
return !mCalendar->incidence(incidenceIdentifier).isNull();
}
Akonadi::Item AkonadiViewCalendar::item(const KCalCore::Incidence::Ptr &incidence) const
Akonadi::Item AkonadiViewCalendar::item(const KCalendarCore::Incidence::Ptr &incidence) const
{
if (!mCalendar || !incidence) {
return Akonadi::Item();
......@@ -190,22 +190,22 @@ Akonadi::Item AkonadiViewCalendar::item(const KCalCore::Incidence::Ptr &incidenc
return mCalendar->item(id);
}