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
7c2e7d13
Unverified
Commit
7c2e7d13
authored
Sep 04, 2022
by
Carl Schwan
🚴
Browse files
Use enums for switching view
Signed-off-by:
Carl Schwan
<
carl@carlschwan.eu
>
parent
befe0508
Pipeline
#227187
passed with stage
in 2 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/main.qml
View file @
7c2e7d13
...
...
@@ -167,49 +167,49 @@ Kirigami.ApplicationWindow {
Connections
{
target
:
KalendarApplication
function
onOpenMonthView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
monthView
"
||
root
.
ignoreCurrentPage
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
Month
||
root
.
ignoreCurrentPage
)
{
KalendarUiUtils
.
switchView
(
monthViewComponent
);
}
}
function
onOpenWeekView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
weekView
"
||
root
.
ignoreCurrentPage
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
Week
||
root
.
ignoreCurrentPage
)
{
KalendarUiUtils
.
switchView
(
hourlyViewComponent
);
}
}
function
onOpenThreeDayView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
t
hreeDay
View
"
||
root
.
ignoreCurrentPage
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
T
hreeDay
||
root
.
ignoreCurrentPage
)
{
KalendarUiUtils
.
switchView
(
hourlyViewComponent
,
{
daysToShow
:
3
});
}
}
function
onOpenDayView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
dayView
"
||
root
.
ignoreCurrentPage
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
Day
||
root
.
ignoreCurrentPage
)
{
KalendarUiUtils
.
switchView
(
hourlyViewComponent
,
{
daysToShow
:
1
});
}
}
function
onOpenScheduleView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
s
chedule
View
"
||
root
.
ignoreCurrentPage
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
S
chedule
||
root
.
ignoreCurrentPage
)
{
KalendarUiUtils
.
switchView
(
scheduleViewComponent
);
}
}
function
onOpenContactView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
c
ontact
View
"
||
root
.
ignoreCurrentPage
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
C
ontact
||
root
.
ignoreCurrentPage
)
{
KalendarUiUtils
.
switchView
(
"
qrc:/LazyContactView.qml
"
);
}
}
function
onOpenMailView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
mailView
"
||
root
.
ignoreCurrentPage
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
Mail
||
root
.
ignoreCurrentPage
)
{
KalendarUiUtils
.
switchView
(
"
qrc:/LazyMailView.qml
"
);
}
}
function
onOpenTodoView
()
{
if
(
pageStack
.
currentItem
.
objectName
!==
"
todoView
"
)
{
if
(
pageStack
.
currentItem
.
mode
!==
KalendarApplication
.
Todo
)
{
filterHeaderBar
.
active
=
true
;
KalendarUiUtils
.
switchView
(
todoViewComponent
);
}
...
...
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