Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kalendar
Commits
010b4caa
Commit
010b4caa
authored
Oct 16, 2022
by
Claudio Cambra
Browse files
Further clean up of todosortfilterproxymodel
Signed-off-by:
Claudio Cambra
<
claudio.cambra@kde.org
>
parent
6dec58c4
Pipeline
#248937
passed with stage
in 3 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/models/todosortfilterproxymodel.cpp
View file @
010b4caa
...
...
@@ -370,7 +370,7 @@ bool TodoSortFilterProxyModel::hasAcceptedChildren(int row, const QModelIndex &s
return
false
;
}
Akonadi
::
ETMCalendar
::
Ptr
TodoSortFilterProxyModel
::
calendar
()
Akonadi
::
ETMCalendar
::
Ptr
TodoSortFilterProxyModel
::
calendar
()
const
{
return
m_calendar
;
}
...
...
@@ -385,7 +385,7 @@ void TodoSortFilterProxyModel::setCalendar(Akonadi::ETMCalendar::Ptr &calendar)
endResetModel
();
}
Akonadi
::
IncidenceChanger
*
TodoSortFilterProxyModel
::
incidenceChanger
()
Akonadi
::
IncidenceChanger
*
TodoSortFilterProxyModel
::
incidenceChanger
()
const
{
return
m_lastSetChanger
;
}
...
...
@@ -398,7 +398,7 @@ void TodoSortFilterProxyModel::setIncidenceChanger(Akonadi::IncidenceChanger *ch
Q_EMIT
incidenceChangerChanged
();
}
void
TodoSortFilterProxyModel
::
setColorCache
(
QHash
<
QString
,
QColor
>
colorCache
)
void
TodoSortFilterProxyModel
::
setColorCache
(
const
QHash
<
QString
,
QColor
>
colorCache
)
{
m_colors
=
colorCache
;
}
...
...
src/models/todosortfilterproxymodel.h
View file @
010b4caa
...
...
@@ -91,11 +91,12 @@ public:
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
bool
filterAcceptsRow
(
int
row
,
const
QModelIndex
&
sourceParent
)
const
override
;
bool
filterAcceptsRowCheck
(
int
row
,
const
QModelIndex
&
sourceParent
)
const
;
bool
hasAcceptedChildren
(
int
row
,
const
QModelIndex
&
sourceParent
)
const
;
Akonadi
::
ETMCalendar
::
Ptr
calendar
();
Akonadi
::
IncidenceChanger
*
incidenceChanger
();
Akonadi
::
ETMCalendar
::
Ptr
calendar
()
const
;
Akonadi
::
IncidenceChanger
*
incidenceChanger
()
const
;
int
showCompleted
()
const
;
Filter
*
filterObject
()
const
;
int
sortBy
()
const
;
...
...
@@ -128,15 +129,15 @@ public Q_SLOTS:
protected:
bool
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
override
;
QHash
<
QString
,
QColor
>
colorCache
();
void
setColorCache
(
QHash
<
QString
,
QColor
>
colorCache
);
void
loadColors
();
private
Q_SLOTS
:
void
setColorCache
(
const
QHash
<
QString
,
QColor
>
colorCache
);
void
loadColors
();
void
updateDateLabels
();
void
emitDateDataChanged
(
const
QModelIndex
&
idx
);
private:
QHash
<
QString
,
QColor
>
colorCache
()
const
;
QString
todoDueDateDisplayString
(
const
KCalendarCore
::
Todo
::
Ptr
todo
,
const
DueDateDisplayFormat
format
)
const
;
int
compareStartDates
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment