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();
65 void updateWeekDays(
const QDate &newStartDate);
66 void handleStartDateChange(
const QDate &);
79 [[nodiscard]]
short dayOfMonthFromStart()
const;
80 [[nodiscard]]
short dayOfMonthFromEnd()
const;
81 [[nodiscard]]
short dayOfYearFromStart()
const;
82 [[nodiscard]]
int duration()
const;
85 [[nodiscard]]
short monthWeekFromStart()
const;
86 [[nodiscard]]
short monthWeekFromEnd()
const;
90 [[nodiscard]]
QString numberToString(
int number)
const;
94 void setDuration(
int duration);
97 void setFrequency(
int freq);
98 void toggleRecurrenceWidgets(
int enable);
106 [[nodiscard]]
int weekdayCountForMonth(
const QDate &date)
const;
108 [[nodiscard]]
QDate currentDate()
const;
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.
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.