Incidenceeditor
10#include "incidenceeditor-ng.h"
12#include <KLocalizedString>
16class EventOrTodoDesktop;
19namespace IncidenceEditorNG
21class IncidenceDateTime;
25 RecurrenceTypeNone = 0,
28 RecurrenceTypeMonthly,
30 RecurrenceTypeUnknown,
31 RecurrenceTypeException
34class IncidenceRecurrence :
public IncidenceEditor
41 IncidenceRecurrence(IncidenceDateTime *dateTime, Ui::EventOrTodoDesktop *
ui);
45 [[
nodiscard]]
bool isDirty()
const override;
46 [[
nodiscard]]
bool isValid()
const override;
48 void focusInvalidField()
override;
50 [[
nodiscard]] RecurrenceType currentRecurrenceType()
const;
53 void recurrenceChanged(IncidenceEditorNG::RecurrenceType
type);
58 void handleDateTimeToggle();
59 void handleEndAfterOccurrencesChange(
int currentValue);
60 void handleExceptionDateChange(
const QDate ¤tDate);
61 void handleFrequencyChange();
62 void handleRecurrenceTypeChange(
int currentIndex);
63 void removeExceptions();
64 void updateRemoveExceptionButton();
66 void handleStartDateChange(
const QDate &);
79 [[
nodiscard]]
short dayOfMonthFromStart()
const;
80 [[
nodiscard]]
short dayOfMonthFromEnd()
const;
81 [[
nodiscard]]
short dayOfYearFromStart()
const;
85 [[
nodiscard]]
short monthWeekFromStart()
const;
86 [[
nodiscard]]
short monthWeekFromEnd()
const;
94 void setDuration(
int duration);
97 void setFrequency(
int freq);
98 void toggleRecurrenceWidgets(
int enable);
111 Ui::EventOrTodoDesktop *
const mUi;
113 IncidenceDateTime *
const mDateTime;
118 int mMonthlyInitialType = -1;
119 int mYearlyInitialType = -1;
KCalendarCore::IncidenceBase::IncidenceType type() const
Returns the type of the Incidence that is currently loaded.
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.
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:37 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.