Incidenceeditor
conflictresolver.cpp
44 mMandatoryRoles << KCalendarCore::Attendee::ReqParticipant << KCalendarCore::Attendee::OptParticipant << KCalendarCore::Attendee::NonParticipant
47 connect(mFBModel, &CalendarSupport::FreeBusyItemModel::dataChanged, this, &ConflictResolver::freebusyDataChanged);
56 mFBModel->addItem(CalendarSupport::FreeBusyItem::Ptr(new CalendarSupport::FreeBusyItem(attendee, mParentWidget)));
137 auto attendee = mFBModel->data(index, CalendarSupport::FreeBusyItemModel::AttendeeRole).value<KCalendarCore::Attendee>();
141 auto freebusy = mFBModel->data(index, CalendarSupport::FreeBusyItemModel::FreeBusyRole).value<KCalendarCore::FreeBusy::Ptr>();
149bool ConflictResolver::tryDate(const KCalendarCore::FreeBusy::Ptr &fb, QDateTime &tryFrom, QDateTime &tryTo)
217 // Uses an O(p*n) (n number of attendees, p timeframe range / timeslot resolution ) algorithm to
244 qCWarning(INCIDENCEEDITOR_LOG) << "free slot calculation: invalid range. range( " << begin.secsTo(end) << ") / mSlotResolutionSeconds("
249 qCDebug(INCIDENCEEDITOR_LOG) << "from " << begin << " to " << end << "; mSlotResolutionSeconds = " << mSlotResolutionSeconds << "; range = " << range;
255 auto attendee = mFBModel->data(index, CalendarSupport::FreeBusyItemModel::AttendeeRole).value<KCalendarCore::Attendee>();
259 auto freebusy = mFBModel->data(index, CalendarSupport::FreeBusyItemModel::FreeBusyRole).value<KCalendarCore::FreeBusy::Ptr>();
316 // qCCritical(INCIDENCEEDITOR_LOG) << "impossible condition reached" << period.start() << period.end();
387 const QDateTime freeEnd = freeBegin.addSecs((free_end_i - free_start_i) * mSlotResolutionSeconds);
ConflictResolver(QWidget *parentWidget, QObject *parent=nullptr)
Definition conflictresolver.cpp:20
bool containsAttendee(const KCalendarCore::Attendee &attendee)
Returns whether the resolver contains the attendee.
Definition conflictresolver.cpp:78
void insertAttendee(const KCalendarCore::Attendee &attendee)
Add an attendee The attendees free busy info will be fetched and integrated into the resolver.
Definition conflictresolver.cpp:53
void removeAttendee(const KCalendarCore::Attendee &attendee)
Removes an attendee The attendee will no longer be considered when resolving conflicts.
Definition conflictresolver.cpp:67
void freeSlotsAvailable(const KCalendarCore::Period::List &)
Emitted when the resolver locates new free slots.
void setAllowedWeekdays(const QBitArray &weekdays)
Constrain the free time slot search to the weekdays identified by their KCalendarSystem integer repre...
Definition conflictresolver.cpp:441
bool findFreeSlot(const KCalendarCore::Period &dateTimeRange)
Finds a free slot in the future which has at least the same size as the initial slot.
Definition conflictresolver.cpp:178
void setMandatoryRoles(const QSet< KCalendarCore::Attendee::Role > &roles)
Constrain the free time slot search to the set participant roles.
Definition conflictresolver.cpp:447
void conflictsDetected(int number)
Emitted when there are conflicts.
KCalendarCore::Period::List availableSlots() const
Returns a list of date time ranges that conform to the search constraints.
Definition conflictresolver.cpp:458
NonParticipant
ReqParticipant
OptParticipant
Role role() const
QDateTime end() const
QDateTime start() const
Q_SCRIPTABLE Q_NOREPLY void start()
const QList< QKeySequence > & begin()
const QList< QKeySequence > & end()
void setBit(qsizetype i)
int dayOfWeek() const const
QDateTime addSecs(qint64 s) const const
QDateTime currentDateTime()
QDateTime currentDateTimeUtc()
QDate date() const const
qint64 daysTo(const QDateTime &other) const const
qint64 secsTo(const QDateTime &other) const const
void setDate(QDate date)
void setTime(QTime time)
void append(QList< T > &&value)
iterator begin()
void clear()
iterator end()
qsizetype size() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool contains(const QSet< T > &other) const const
void reserve(qsizetype size)
bool isActive() const const
void setSingleShot(bool singleShot)
void start()
void timeout()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.