Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Calindori
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma Mobile
Calindori
Commits
a78d3084
Commit
a78d3084
authored
Mar 03, 2019
by
Dimitris Kardarakos
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refresh' into 'master'
Simplify model update See merge request dkardarakos/calindori!10
parents
026c972a
f78cc40f
Pipeline
#1234
passed with stage
in 4 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
36 deletions
+15
-36
src/contents/ui/Main.qml
src/contents/ui/Main.qml
+9
-18
src/contents/ui/TodosView.qml
src/contents/ui/TodosView.qml
+6
-18
No files found.
src/contents/ui/Main.qml
View file @
a78d3084
...
...
@@ -44,6 +44,8 @@ Kirigami.ApplicationWindow {
*/
signal
refreshNeeded
;
onRefreshNeeded
:
todosView
.
refreshNeeded
()
Component
{
id
:
calendarDashboardComponent
...
...
@@ -77,7 +79,7 @@ Kirigami.ApplicationWindow {
onTriggered
:
{
if
(
localCalendar
.
todosCount
(
calendarMonthView
.
selectedDate
)
>
0
)
{
root
.
pageStack
.
push
(
todosView
Component
,
{
todoDt
:
calendarMonthView
.
selectedDate
});
root
.
pageStack
.
push
(
todosView
,
{
todoDt
:
calendarMonthView
.
selectedDate
});
}
else
{
showPassiveNotification
(
i18n
(
"
There is no task for the day selected
"
));
...
...
@@ -118,25 +120,14 @@ Kirigami.ApplicationWindow {
}
}
Component
{
id
:
todosViewComponent
TodosView
{
TodosView
{
id
:
todosView
id
:
todosView
calendar
:
localCalendar
onEditTask
:
root
.
pageStack
.
push
(
todoPage
,
{
startdt
:
modelData
.
dtstart
,
uid
:
modelData
.
uid
,
todoData
:
modelData
})
onTaskDeleted
:
root
.
refreshNeeded
()
Connections
{
target
:
root
onRefreshNeeded
:
todosView
.
refreshNeeded
()
}
}
calendar
:
localCalendar
onEditTask
:
root
.
pageStack
.
push
(
todoPage
,
{
startdt
:
modelData
.
dtstart
,
uid
:
modelData
.
uid
,
todoData
:
modelData
})
onTaskDeleted
:
root
.
refreshNeeded
()
}
Component
{
...
...
src/contents/ui/TodosView.qml
View file @
a78d3084
...
...
@@ -33,31 +33,19 @@ Kirigami.Page {
signal
taskDeleted
signal
refreshNeeded
function
reloadModel
()
{
cardsListview
.
model
.
reloadTasks
();
}
function
setModel
()
{
var
todosModelObj
=
todosModelComponent
.
createObject
(
root
,
{
"
filterdt
"
:
root
.
todoDt
,
"
memorycalendar
"
:
root
.
calendar
.
memorycalendar
});
cardsListview
.
model
=
todosModelObj
;
cardsListview
.
model
.
reloadTasks
();
}
onTodoDtChanged
:
setModel
()
onRefreshNeeded
:
reloadModel
()
onRefreshNeeded
:
cardsListview
.
model
.
reloadTasks
()
title
:
qsTr
(
"
Tasks
"
)
Component
{
id
:
todosModelComponent
Calindori.TodosModel
{}
}
Kirigami.CardsListView
{
id
:
cardsListview
anchors.fill
:
parent
model
:
Calindori.TodosModel
{
filterdt
:
root
.
todoDt
memorycalendar
:
root
.
calendar
.
memorycalendar
}
delegate
:
Kirigami.Card
{
banner.title
:
model
.
summary
banner.titleLevel
:
3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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