Akonadi Calendar
history.cpp
32void History::recordCreation(const Akonadi::Item &item, const QString &description, const uint atomicOperationId)
36 Q_ASSERT_X(item.hasPayload<KCalendarCore::Incidence::Ptr>(), "History::recordCreation()", "Item must have Incidence::Ptr payload.");
43void History::recordModification(const Akonadi::Item &oldItem, const Akonadi::Item &newItem, const QString &description, const uint atomicOperationId)
47 Q_ASSERT_X(oldItem.hasPayload<KCalendarCore::Incidence::Ptr>(), "History::recordModification", "old item must have Incidence::Ptr payload");
48 Q_ASSERT_X(newItem.hasPayload<KCalendarCore::Incidence::Ptr>(), "History::recordModification", "newItem item must have Incidence::Ptr payload");
50 Entry::Ptr entry(new ModificationEntry(newItem, oldItem.payload<KCalendarCore::Incidence::Ptr>(), description, this));
57void History::recordDeletion(const Akonadi::Item &item, const QString &description, const uint atomicOperationId)
65void History::recordDeletions(const Akonadi::Item::List &items, const QString &description, const uint atomicOperationId)
72 Q_ASSERT_X(item.hasPayload<Incidence::Ptr>(), "History::recordDeletion()", "Item must have an Incidence::Ptr payload.");
165 Q_EMIT q->changed(); // Application will disable undo/redo buttons because operation is in progress
169 connect(mEntryInProgress.data(), &Entry::finished, this, &HistoryPrivate::handleFinished, Qt::UniqueConnection);
173void HistoryPrivate::handleFinished(IncidenceChanger::ResultCode changerResult, const QString &errorString)
179 const History::ResultCode resultCode = success ? History::ResultCodeSuccess : History::ResultCodeError;
213 Entry::Ptr topEntry = (mOperationTypeInProgress == TypeNone) ? (mUndoStack.isEmpty() ? Entry::Ptr() : mUndoStack.top())
226 MultiEntry::Ptr multiEntry = MultiEntry::Ptr(new MultiEntry(atomicOperationId, entry->mDescription, q));
History class for implementing undo/redo of calendar operations.
Definition history.h:48
void recordDeletions(const Akonadi::Item::List &items, const QString &description, const uint atomicOperationId=0)
Pushes a list of incidence deletions onto the undo stack.
Definition history.cpp:65
void recordDeletion(const Akonadi::Item &item, const QString &description, const uint atomicOperationId=0)
Pushes an incidence deletion onto the undo stack.
Definition history.cpp:57
QString nextUndoDescription() const
Returns the description of the next undo.
Definition history.cpp:78
bool redoAvailable() const
Returns true if there are changes that can be redone.
Definition history.cpp:144
void recordModification(const Akonadi::Item &oldItem, const Akonadi::Item &newItem, const QString &description, const uint atomicOperationId=0)
Pushes an incidence modification onto the undo stack.
Definition history.cpp:43
void undoAll(QWidget *parent=nullptr)
Reverts every change in the undo stack.
Definition history.cpp:106
void redo(QWidget *parent=nullptr)
Reverts the change that's on top of the redo stack.
Definition history.cpp:101
QString nextRedoDescription() const
Returns the description of the next redo.
Definition history.cpp:87
bool undoAvailable() const
Returns true if there are changes that can be undone.
Definition history.cpp:139
ResultCode
This enum describes the possible result codes (success/error values) for an undo or redo operation.
Definition history.h:57
void undo(QWidget *parent=nullptr)
Reverts the change that's on top of the undo stack.
Definition history.cpp:96
void recordCreation(const Akonadi::Item &item, const QString &description, const uint atomicOperationId=0)
Pushes an incidence creation onto the undo stack.
Definition history.cpp:32
qint64 Id
bool hasPayload() const
int revision() const
T payload() const
bool isValid() const
Type type(const QSqlDatabase &db)
FreeBusyManager::Singleton.
void append(QList< T > &&value)
Q_EMITQ_EMIT
QObject * parent() const const
UniqueConnection
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.