Commit ffd277a9 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Move setters into slots for incidenceoccurrencemodel



Signed-off-by: Claudio Cambra's avatarClaudio Cambra <claudio.cambra@gmail.com>
parent cc685b64
Pipeline #248327 failed with stage
in 1 minute and 53 seconds
......@@ -75,21 +75,12 @@ public:
~IncidenceOccurrenceModel() override = default;
int rowCount(const QModelIndex &parent = {}) const override;
QVariant data(const QModelIndex &index, int role) const override;
void updateQuery();
Akonadi::ETMCalendar::Ptr calendar() const;
void setCalendar(Akonadi::ETMCalendar::Ptr calendar);
void setStart(const QDate &start);
QDate start() const;
void setLength(int length);
int length() const;
Filter *filter() const;
void setFilter(Filter *filter);
void load();
struct Occurrence {
QDateTime start;
......@@ -106,12 +97,21 @@ Q_SIGNALS:
void filterChanged();
void calendarChanged();
public Q_SLOTS:
void setStart(const QDate &start);
void setLength(int length);
void setFilter(Filter *filter);
void setCalendar(Akonadi::ETMCalendar::Ptr calendar);
private Q_SLOTS:
void slotSourceDataChanged(const QModelIndex &upperLeft, const QModelIndex &bottomRight);
void slotSourceRowsInserted(const QModelIndex &parent, const int first, const int last);
void load();
void refreshView();
void updateQuery();
void updateFromSource();
void slotSourceDataChanged(const QModelIndex &upperLeft, const QModelIndex &bottomRight);
void slotSourceRowsInserted(const QModelIndex &parent, const int first, const int last);
private:
static std::pair<QDateTime, QDateTime> incidenceOccurrenceStartEnd(const QDateTime &ocStart, const KCalendarCore::Incidence::Ptr &incidence);
static uint incidenceOccurrenceHash(const QDateTime &ocStart, const QDateTime &ocEnd, const QString &incidenceUid);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment