Eventviews
eventview.cpp
66 // Thus, listen to the global focusChanged() signal (seen in Qt 4.6-stable-patched 20091112 -Frank)
67 connect(qobject_cast<QApplication *>(QApplication::instance()), &QApplication::focusChanged, this, &EventView::focusChanged);
132 return KCalUtils::RecurrenceActions::questionSelectedFutureAllCancel(message, caption, itemSelected, itemFuture, itemAll, this);
143 return KCalUtils::RecurrenceActions::questionSelectedAllCancel(message, caption, itemSelected, itemAll, this);
175 connect(d->model, &QAbstractItemModel::dataChanged, this, [this](const QModelIndex &topLeft, const QModelIndex &bottomRight) {
180 const auto col = d->model->data(index, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
560 const KConfigGroup selectionGroup = configGroup.config()->group(configGroup.name() + "_selectionSetup"_L1);
576 KConfigGroup selectionGroup = configGroup.config()->group(configGroup.name() + "_selectionSetup"_L1);
635 while (collection.parentCollection().isValid() && collection.parentCollection() != Akonadi::Collection::root()) {
636 collection = Akonadi::EntityTreeModel::updatedCollection(d->model, collection.parentCollection());
646void EventView::onCollectionChanged(const Akonadi::Collection &collection, const QSet<QByteArray> &changedAttributes)
666Akonadi::CollectionCalendar::Ptr EventView::calendar3(const KCalendarCore::Incidence::Ptr &incidence) const
672Akonadi::CollectionCalendar::Ptr EventView::calendarForCollection(Akonadi::Collection::Id collectionId) const
683Akonadi::CollectionCalendar::Ptr EventView::calendarForCollection(const Akonadi::Collection &collection) const
qint64 Id
bool isValid() const
static Collection root()
const T * attribute() const
Collection & parentCollection()
bool hasAttribute() const
Id id() const
static Collection updatedCollection(const QAbstractItemModel *model, qint64 collectionId)
Collection & parentCollection()
Collection::Id storageCollectionId() const
EventView is the abstract base class from which all other calendar views for event data are derived.
Definition eventview.h:69
virtual bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay) const
Sets the default start/end date/time for new events.
Definition eventview.cpp:450
virtual void updateView()=0
Updates the current display to reflect changes that may have happened in the calendar since the last ...
virtual QPair< QDateTime, QDateTime > actualDateRange(const QDateTime &start, const QDateTime &end, const QDate &preferredMonth=QDate()) const
from the requested date range (passed via setDateRange()), calculates the adjusted date range actuall...
Definition eventview.cpp:472
virtual QDateTime selectionEnd() const
Returns the end of the selection, or an invalid QDateTime if there is no selection or the view doesn'...
Definition eventview.cpp:270
void showIncidenceSignal(const Akonadi::Item &)
instructs the receiver to show the incidence in read-only mode.
void setHolidayRegions(const QStringList ®ions)
Set which holiday regions the user wants to use.
Definition eventview.cpp:91
bool dateRangeSelectionEnabled() const
Returns whether or not date range selection is enabled.
Definition eventview.cpp:275
virtual QDateTime selectionStart() const
Returns the start of the selection, or an invalid QDateTime if there is no selection or the view does...
Definition eventview.cpp:265
bool processKeyEvent(QKeyEvent *)
Handles key events, opens the new event dialog when enter is pressed, activates type ahead.
Definition eventview.cpp:337
virtual void setChanges(Changes changes)
Notifies the view that there are pending changes so a redraw is needed.
Definition eventview.cpp:518
virtual EventView * viewAt(const QPoint &p)
returns the view at the given widget coordinate.
Definition eventview.cpp:256
void newEventSignal()
instructs the receiver to create a new event in given collection.
virtual void doRestoreConfig(const KConfigGroup &configGroup)
reimplement to read view-specific settings.
Definition eventview.cpp:464
void defaultAction(const Akonadi::Item &incidence)
Perform the default action for an incidence, e.g.
Definition eventview.cpp:74
virtual bool supportsZoom() const
returns whether this view supports zoom.
Definition eventview.cpp:287
virtual void doSaveConfig(KConfigGroup &configGroup)
reimplement to write view-specific settings.
Definition eventview.cpp:468
void setDateRangeSelectionEnabled(bool enable)
Enable or disable date range selection.
Definition eventview.cpp:281
Changes changes() const
Returns if there are pending changes and a redraw is needed.
Definition eventview.cpp:528
CalendarSupport::CollectionSelection * collectionSelection() const
Returns the selection of collection to be used by this view (custom if set, or global otherwise).
Definition eventview.cpp:407
void restoreConfig(const KConfigGroup &configGroup)
reads the view configuration.
Definition eventview.cpp:534
static QColor itemFrameColor(const QColor &color, bool selected)
Returns a variation of color that will be used for the border of an agenda or month item.
Definition eventview.cpp:621
virtual void setDateRange(const QDateTime &start, const QDateTime &end, const QDate &preferredMonth=QDate())
Definition eventview.cpp:297
void editIncidenceSignal(const Akonadi::Item &)
instructs the receiver to begin editing the incidence specified in some manner.
virtual void showDates(const QDate &start, const QDate &end, const QDate &preferredMonth=QDate())=0
void saveConfig(KConfigGroup &configGroup)
writes out the view configuration.
Definition eventview.cpp:570
virtual void updateConfig()
Re-reads the configuration and picks up relevant changes which are applicable to the view.
Definition eventview.cpp:261
virtual void setIncidenceChanger(Akonadi::IncidenceChanger *changer)
Assign a new incidence change helper object.
Definition eventview.cpp:246
KConfigGroup group(const QString &group)
QString name() const
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
KConfig * config()
QString readEntry(const char *key, const char *aDefault=nullptr) const
Q_SCRIPTABLE Q_NOREPLY void start()
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Incidence::Ptr incidence(const Akonadi::Item &item)
Namespace EventViews provides facilities for displaying incidences, including events,...
Definition agenda.h:33
KCALUTILS_EXPORT int availableOccurrences(const KCalendarCore::Incidence::Ptr &incidence, const QDateTime &selectedOccurrence)
KCALUTILS_EXPORT int questionSelectedFutureAllCancel(const QString &message, const QString &caption, const KGuiItem &actionSelected, const KGuiItem &actionFuture, const KGuiItem &actionAll, QWidget *parent)
SelectedOccurrence
AllOccurrences
NoOccurrence
KCALUTILS_EXPORT int questionSelectedAllCancel(const QString &message, const QString &caption, const KGuiItem &actionSelected, const KGuiItem &actionAll, QWidget *parent)
KCOREADDONS_EXPORT QString randomString(int length)
QAction * preferences(const QObject *recvr, const char *slot, QObject *parent)
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles)
void focusChanged(QWidget *old, QWidget *now)
QByteArray & replace(QByteArrayView before, QByteArrayView after)
int blue() const const
QColor darker(int factor) const const
int green() const const
bool isValid() const const
int red() const const
QCoreApplication * instance()
KeyPress
Type type() const const
int count() const const
bool isAutoRepeat() const const
int key() const const
Qt::KeyboardModifiers modifiers() const const
QString text() const const
ConstIterator
const_iterator constBegin() const const
const_iterator constEnd() const const
const char * className() const const
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual const QMetaObject * metaObject() const const
T qobject_cast(QObject *object)
bool contains(const QSet< T > &other) const const
bool isEmpty() const const
QByteArray toLatin1() const const
CaseInsensitive
QueuedConnection
black
Key_Return
ControlModifier
LocalTime
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:05:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:05:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.