Incidenceeditor

incidencedescription.h
1/*
2 SPDX-FileCopyrightText: 2010 Bertjan Broeksema <broeksema@kde.org>
3 SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "incidenceeditor-ng.h"
11
12#include <memory>
13
14namespace Ui
15{
16class EventOrTodoDesktop;
17}
18
19namespace IncidenceEditorNG
20{
21class IncidenceDescriptionPrivate;
22
23/**
24 * The IncidenceDescriptionEditor keeps track of the following Incidence parts:
25 * - description
26 */
28{
30public:
31 using IncidenceEditorNG::IncidenceEditor::load; // So we don't trigger -Woverloaded-virtual
32 using IncidenceEditorNG::IncidenceEditor::save; // So we don't trigger -Woverloaded-virtual
33
34 explicit IncidenceDescription(Ui::EventOrTodoDesktop *ui);
35
36 ~IncidenceDescription() override;
37
38 void load(const KCalendarCore::Incidence::Ptr &incidence) override;
39 void save(const KCalendarCore::Incidence::Ptr &incidence) override;
40 [[nodiscard]] bool isDirty() const override;
41
42 void printDebugInfo() const override;
43
44private:
45 void toggleRichTextDescription();
46 void enableRichTextDescription(bool enable);
47 void setupToolBar();
48
49private:
50 Ui::EventOrTodoDesktop *const mUi;
51 //@cond PRIVATE
52 Q_DECLARE_PRIVATE(IncidenceDescription)
53 std::unique_ptr<IncidenceDescriptionPrivate> const d;
54 //@endcond
55};
56}
The IncidenceDescriptionEditor keeps track of the following Incidence parts:
bool isDirty() const override
Returns whether or not the current values in the editor differ from the initial values.
void save(const KCalendarCore::Incidence::Ptr &incidence) override
Store the current values of the editor into.
void load(const KCalendarCore::Incidence::Ptr &incidence) override
Load the values of.
void printDebugInfo() const override
Re-implement this and print important member values and widget enabled/disabled states that could hav...
KCal Incidences are complicated objects.
virtual void load(const KCalendarCore::Incidence::Ptr &incidence)=0
Load the values of.
QSharedPointer< IncidenceT > incidence() const
Convenience method to get a pointer for a specific const Incidence Type.
virtual void save(const KCalendarCore::Incidence::Ptr &incidence)=0
Store the current values of the editor into.
Q_OBJECTQ_OBJECT
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

KDE's Doxygen guidelines are available online.