Akonadi::CalendarClipboard Class
Class to copy or cut calendar incidences. More...
| Header: | #include <Akonadi/CalendarClipboard> |
| CMake: | find_package(KPim6AkonadiCalendar REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::AkonadiCalendar) |
| Inherits: | QObject |
Public Functions
| CalendarClipboard(const Akonadi::CalendarBase::Ptr &calendar, Akonadi::IncidenceChanger *changer = nullptr, QObject *parent = nullptr) | |
| virtual | ~CalendarClipboard() override |
| bool | copyIncidence(const KCalendarCore::Incidence::Ptr &incidence, Akonadi::CalendarClipboard::Mode mode = RecursiveMode) |
| void | cutIncidence(const KCalendarCore::Incidence::Ptr &incidence, Akonadi::CalendarClipboard::Mode mode = RecursiveMode) |
| bool | pasteAvailable() const |
Signals
| void | cutFinished(bool success, const QString &errorMessage) |
Detailed Description
Author: Sérgio Martins <iamsergio@gmail.com>
Member Function Documentation
[explicit] CalendarClipboard::CalendarClipboard(const Akonadi::CalendarBase::Ptr &calendar, Akonadi::IncidenceChanger *changer = nullptr, QObject *parent = nullptr)
Constructs a new CalendarClipboard. calendar calendar containing incidences changer incidence changer that will delete incidences while copying. If 0, an internal one will be created. parent QObject parent
[override virtual noexcept] CalendarClipboard::~CalendarClipboard()
Destroys the CalendarClipboard instance.
bool CalendarClipboard::copyIncidence(const KCalendarCore::Incidence::Ptr &incidence, Akonadi::CalendarClipboard::Mode mode = RecursiveMode)
Copies the specified incidence into the clipboard. incidence the incidence to copy mode how to treat child incidences. Defaults to #RecursiveMode Returns true on success
[signal] void CalendarClipboard::cutFinished(bool success, const QString &errorMessage)
Emitted after cutIncidences() finishes. success true if the cut was successful errorMessage if success if false, contains the error message, empty otherwise.
void CalendarClipboard::cutIncidence(const KCalendarCore::Incidence::Ptr &incidence, Akonadi::CalendarClipboard::Mode mode = RecursiveMode)
Copies the specified incidence into the clipboard and then deletes it from akonadi. The incidence must be present in the calendar. After it's deletion from akonadi, signal cutFinished() is emitted. incidence to cut mode how to treat child incidences. Defaults to #RecursiveMode
See also cutFinished().
bool CalendarClipboard::pasteAvailable() const
Returns if there's any ical mime data available for pasting.