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
d06eed8f
Commit
d06eed8f
authored
Nov 11, 2021
by
Claudio Cambra
Browse files
Add number of tasks left to complete to filter header
parent
53b7cfdd
Pipeline
#96447
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/calendarmanager.cpp
View file @
d06eed8f
...
...
@@ -773,6 +773,7 @@ QVariantMap CalendarManager::getCollectionDetails(QVariant collectionId)
collectionDetails
[
QLatin1String
(
"name"
)]
=
collection
.
name
();
collectionDetails
[
QLatin1String
(
"displayName"
)]
=
collection
.
displayName
();
collectionDetails
[
QLatin1String
(
"color"
)]
=
m_baseModel
->
colorCache
[
QString
::
number
(
collection
.
id
())];
collectionDetails
[
QLatin1String
(
"count"
)]
=
collection
.
statistics
().
count
();
collectionDetails
[
QLatin1String
(
"isResource"
)]
=
Akonadi
::
CollectionUtils
::
isResource
(
collection
);
collectionDetails
[
QLatin1String
(
"readOnly"
)]
=
collection
.
rights
().
testFlag
(
Collection
::
ReadOnly
);
collectionDetails
[
QLatin1String
(
"isFiltered"
)]
=
isFiltered
;
...
...
src/contents/ui/FilterHeader.qml
View file @
d06eed8f
...
...
@@ -66,14 +66,6 @@ RowLayout {
clip
:
true
visible
:
headerLayout
.
filter
.
tags
.
length
>
0
move
:
Transition
{
NumberAnimation
{
properties
:
"
x, y
"
duration
:
Kirigami
.
Units
.
longDuration
easing.type
:
Easing
.
InOutQuad
}
}
Repeater
{
id
:
tagRepeater
model
:
headerLayout
.
filter
?
headerLayout
.
filter
.
tags
:
{}
...
...
@@ -95,4 +87,33 @@ RowLayout {
}
}
}
Kirigami.Heading
{
id
:
numTasksHeading
Layout.fillWidth
:
true
Layout.rightMargin
:
Kirigami
.
Units
.
largeSpacing
horizontalAlignment
:
Text
.
AlignRight
function
updateTasksCount
()
{
if
(
headerLayout
.
todoMode
)
text
=
applicationWindow
().
pageStack
.
currentItem
.
incompleteView
.
model
.
rowCount
();
}
Connections
{
target
:
applicationWindow
().
pageStack
.
currentItem
.
incompleteView
.
model
function
onRowsInserted
()
{
numTasksHeading
.
updateTasksCount
();
}
function
onRowsRemoved
()
{
numTasksHeading
.
updateTasksCount
();
}
}
font.weight
:
Font
.
Bold
color
:
headerLayout
.
todoMode
&&
headerLayout
.
filterCollectionDetails
&&
headerLayout
.
filter
.
collectionId
>
-
1
?
headerLayout
.
filterCollectionDetails
.
color
:
Kirigami
.
Theme
.
textColor
elide
:
Text
.
ElideRight
visible
:
headerLayout
.
todoMode
}
}
src/contents/ui/TodoPage.qml
View file @
d06eed8f
...
...
@@ -66,6 +66,8 @@ Kirigami.ScrollablePage {
readonly
property
color
standardTextColor
:
Kirigami
.
Theme
.
textColor
readonly
property
bool
isDark
:
LabelUtils
.
isDarkColor
(
Kirigami
.
Theme
.
backgroundColor
)
readonly
property
alias
incompleteView
:
incompleteView
padding
:
0
leftPadding
:
Kirigami
.
Units
.
largeSpacing
...
...
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