Incidenceeditor
incidencedialog.cpp
58IncidenceEditorNG::EditorItemManager::ItipPrivacyFlags toItemManagerFlags(bool sign, bool encrypt)
117 [[nodiscard]] bool containsPayloadIdentifiers(const QSet<QByteArray> &partIdentifiers) const override;
131IncidenceDialogPrivate::IncidenceDialogPrivate(Akonadi::IncidenceChanger *changer, IncidenceDialog *qq)
147 q->connect(mCalSelector, &Akonadi::CollectionComboBox::currentChanged, q, &IncidenceDialog::handleSelectedCollectionChange);
190 q->connect(mEditor, &CombinedIncidenceEditor::showMessage, q, [this](const QString &reason, KMessageWidget::MessageType msgType) {
196 q->connect(mItemManager, &EditorItemManager::itemSaveFinished, q, [this](EditorItemManager::SaveAction action) {
199 q->connect(mItemManager, &EditorItemManager::itemSaveFailed, q, [this](EditorItemManager::SaveAction action, const QString &message) {
205 q->connect(mIeRecurrence, &IncidenceRecurrence::recurrenceChanged, q, [this](IncidenceEditorNG::RecurrenceType type) {
208 q->connect(ieAttachments, &IncidenceAttachment::attachmentCountChanged, q, [this](int newCount) {
251 tabText = i18nc("@title:tab Tab to configure the reminders of an event or todo", "Reminder (%1)", newCount);
261 QString tabText = i18nc("@title:tab Tab to configure the recurrence of an event or todo", "Rec&urrence");
283 tabText += i18nc("@title:tab Exception to a recurring event, capital first letter only", " (E)");
311 KCalendarCore::MemoryCalendar::Ptr cal(new KCalendarCore::MemoryCalendar(QTimeZone::systemTimeZone()));
314 QStringLiteral("/korganizer/templates/") + typeToString(mEditor->type()) + QLatin1Char('/') + templateName);
334 KCalendarCore::Incidence::Ptr newInc = KCalendarCore::Incidence::Ptr(incidences.first()->clone());
347 QStringList &templates = IncidenceEditorNG::EditorConfig::instance()->templates(mEditor->type());
350 new IncidenceEditorNG::TemplateManagementDialog(q, templates, KCalUtils::Stringify::incidenceType(mEditor->type())));
352 q->connect(dialog, &TemplateManagementDialog::loadTemplate, q, [this](const QString &templateName) {
355 q->connect(dialog, &TemplateManagementDialog::templatesChanged, q, [this](const QStringList &templates) {
358 q->connect(dialog, &TemplateManagementDialog::saveTemplate, q, [this](const QString &templateName) {
369 KCalendarCore::MemoryCalendar::Ptr cal(new KCalendarCore::MemoryCalendar(QTimeZone::systemTimeZone()));
394 QString fileName = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/korganizer/templates/")
407 const QStringList origTemplates = IncidenceEditorNG::EditorConfig::instance()->templates(mEditor->type());
408 const QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("korganizer/templates/")
428 mUi->mTabWidget->setTabText(AttachmentsTab, i18nc("@title:tab Tab to modify attachments of an event or todo", "Attac&hments (%1)", newCount));
430 mUi->mTabWidget->setTabText(AttachmentsTab, i18nc("@title:tab Tab to modify attachments of an event or todo", "Attac&hments"));
437 mUi->mTabWidget->setTabText(AttendeesTab, i18nc("@title:tab Tab to modify attendees of an event or todo", "&Attendees (%1)", newCount));
439 mUi->mTabWidget->setTabText(AttendeesTab, i18nc("@title:tab Tab to modify attendees of an event or todo", "&Attendees"));
446 mUi->mTabWidget->setTabText(ResourcesTab, i18nc("@title:tab Tab to modify attendees of an event or todo", "&Resources (%1)", newCount));
448 mUi->mTabWidget->setTabText(ResourcesTab, i18nc("@title:tab Tab to modify attendees of an event or todo", "&Resources"));
457bool IncidenceDialogPrivate::containsPayloadIdentifiers(const QSet<QByteArray> &partIdentifiers) const
462void IncidenceDialogPrivate::handleItemSaveFail(EditorItemManager::SaveAction, const QString &errorMessage)
547 return mEditor->isDirty() || mCalSelector->currentCollection().id() != mItem.storageCollectionId();
593 && (me.status() == KCalendarCore::Attendee::NeedsAction || me.status() == KCalendarCore::Attendee::Tentative
601 qCDebug(INCIDENCEEDITOR_LOG) << "Loading item " << item.id() << "; parent " << item.parentCollection().id() << "; storage " << item.storageCollectionId();
635 KCalendarCore::Incidence::Ptr incidenceInEditor = mEditor->incidence<KCalendarCore::Incidence>();
678IncidenceDialog::IncidenceDialog(Akonadi::IncidenceChanger *changer, QWidget *parent, Qt::WindowFlags flags)
688 d->mUi->buttonBox->button(QDialogButtonBox::Apply)->setToolTip(i18nc("@info:tooltip", "Save current changes"));
689 d->mUi->buttonBox->button(QDialogButtonBox::Ok)->setToolTip(i18nc("@action:button", "Save changes and close dialog"));
690 d->mUi->buttonBox->button(QDialogButtonBox::Cancel)->setToolTip(i18nc("@action:button", "Discard changes and close dialog"));
704 connect(d->mUi->buttonBox, &QDialogButtonBox::clicked, this, &IncidenceDialog::slotButtonClicked);
708 connect(d->mUi->mAcceptInvitationButton, &QAbstractButton::clicked, d->mIeAttendee, &IncidenceAttendee::acceptForMe);
709 connect(d->mUi->mAcceptInvitationButton, &QAbstractButton::clicked, d->mUi->mInvitationBar, &QWidget::hide);
710 connect(d->mUi->mDeclineInvitationButton, &QAbstractButton::clicked, d->mIeAttendee, &IncidenceAttendee::declineForMe);
711 connect(d->mUi->mDeclineInvitationButton, &QAbstractButton::clicked, d->mUi->mInvitationBar, &QWidget::hide);
725 KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1StringView(myIncidenceDialogConfigGroupName));
733 KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1StringView(myIncidenceDialogConfigGroupName));
780 d->mItemManager->save(toItemManagerFlags(d->mUi->mSignItip->isChecked(), d->mUi->mEncryptItip->isChecked()));
791 d->mItemManager->save(toItemManagerFlags(d->mUi->mSignItip->isChecked(), d->mUi->mEncryptItip->isChecked()));
863 d->mUi->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(collection.id() != d->mItem.parentCollection().id());
void setMimeTypeFilter(const QStringList &mimetypes)
QStringList mimeTypeFilter() const
Akonadi::Collection currentCollection() const
void currentChanged(const Akonadi::Collection &collection)
void setDefaultCollection(const Collection &collection)
bool isValid() const
CanCreateItem
Id id() const
void setPayload(const T &p)
Collection & parentCollection()
void setMimeType(const QString &mimeType)
bool hasPayload() const
Id id() const
T payload() const
Collection::Id storageCollectionId() const
bool isValid() const
The CombinedIncidenceEditor combines optional widgets with zero or more IncidenceEditors.
Definition combinedincidenceeditor.h:23
void save(const KCalendarCore::Incidence::Ptr &incidence) override
Store the current values of the editor into.
Definition combinedincidenceeditor.cpp:127
void load(const KCalendarCore::Incidence::Ptr &incidence) override
Loads all data from.
Definition combinedincidenceeditor.cpp:76
bool isDirty() const override
Returns whether or not the current values in the editor differ from the initial values or if one of t...
Definition combinedincidenceeditor.cpp:33
bool isValid() const override
Returns whether or not the content of this editor is valid.
Definition combinedincidenceeditor.cpp:38
virtual QStringList allEmails() const
Returns all email addresses for the user.
Definition editorconfig.cpp:77
Helper class for creating dialogs that let the user create and edit the payload of Akonadi items (e....
Definition editoritemmanager.h:36
void save(ItipPrivacyFlags itipPrivacy=ItipPrivacyPlain)
Saves the new or modified item.
Definition editoritemmanager.cpp:313
Akonadi::Item item(ItemState state=AfterSave) const
Returns the last saved item with payload or an invalid item when save is not called yet.
Definition editoritemmanager.cpp:275
The IncidenceDescriptionEditor keeps track of the following Incidence parts:
Definition incidencedescription.h:28
virtual void load(const Akonadi::Item &item, const QDate &activeDate=QDate())
Loads the.
Definition incidencedialog.cpp:738
virtual void selectCollection(const Akonadi::Collection &collection)
Sets the Collection combobox to.
Definition incidencedialog.cpp:751
IncidenceDialog(Akonadi::IncidenceChanger *changer=nullptr, QWidget *parent=nullptr, Qt::WindowFlags flags={})
IncidenceDialog.
Definition incidencedialog.cpp:678
QObject * typeAheadReceiver() const
Returns the object that will receive all key events.
Definition incidencedialog.cpp:763
void setInitiallyDirty(bool initiallyDirty)
By default, if you load an incidence into the editor ( load(item) ), then press [OK] without changing...
Definition incidencedialog.cpp:847
KCalendarCore::IncidenceBase::IncidenceType type() const
Returns the type of the Incidence that is currently loaded.
Definition incidenceeditor.cpp:54
void dirtyStatusChanged(bool isDirty)
Signals whether the dirty status of this editor has changed.
QSharedPointer< IncidenceT > incidence() const
Convenience method to get a pointer for a specific const Incidence Type.
Definition incidenceeditor-ng.h:73
The IncidenceWhatWhere editor keeps track of the following Incidence parts:
Definition incidencewhatwhere.h:25
InProcess
Tentative
NeedsAction
bool isNull() const
PartStat status() const
static QString createUniqueId()
bool save(const Calendar::Ptr &calendar, const QString &fileName) override
bool load(const Calendar::Ptr &calendar, const QString &fileName) override
TypeJournal
QString uid() const
QSharedPointer< Incidence > Ptr
bool save()
MessageType
Warning
QString xi18nc(const char *context, const char *text, const TYPE &arg...)
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)
AKONADI_CALENDAR_EXPORT KCalendarCore::Journal::Ptr journal(const Akonadi::Item &item)
AKONADI_CALENDAR_EXPORT KCalendarCore::Todo::Ptr todo(const Akonadi::Item &item)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
KCALUTILS_EXPORT QString errorMessage(const KCalendarCore::Exception &exception)
ButtonCode warningTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Options(Notify|Dangerous))
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
ButtonCode questionTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
KGuiItem cancel()
KCONFIGGUI_EXPORT void saveWindowSize(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal)
KCONFIGGUI_EXPORT void restoreWindowSize(QWindow *window, const KConfigGroup &config)
void clicked(bool checked)
count
void setCurrentIndex(int index)
currentText
virtual void closeEvent(QCloseEvent *e) override
void setModal(bool modal)
virtual void reject()
void clicked(QAbstractButton *button)
bool mkpath(const QString &dirPath) const const
QFlags< T > & setFlag(Enum flag, bool on)
QIcon fromTheme(const QString &name)
T & first()
bool isEmpty() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool contains(const QSet< T > &other) const const
GenericDataLocation
QString locate(StandardLocation type, const QString &fileName, LocateOptions options)
QString writableLocation(StandardLocation type)
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
WA_DeleteOnClose
typedef WindowFlags
QTimeZone systemTimeZone()
bool close()
void create(WId window, bool initializeWindow, bool destroyOldWindow)
virtual bool event(QEvent *event) override
void hide()
void setAttribute(Qt::WidgetAttribute attribute, bool on)
void show()
void resize(const QSize &)
QWindow * windowHandle() const const
void resize(const QSize &newSize)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:52:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:52:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.