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
80a8534c
Commit
80a8534c
authored
Oct 09, 2022
by
Claudio Cambra
Browse files
Add schedule view mode to config
Signed-off-by:
Claudio Cambra
<
claudio.cambra@gmail.com
>
parent
de1cb66d
Pipeline
#246421
canceled with stage
in 28 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/MainViews/ScheduleView.qml
View file @
80a8534c
...
...
@@ -26,7 +26,15 @@ Kirigami.Page {
property
bool
dragDropEnabled
:
true
readonly
property
int
mode
:
Kalendar
.
KalendarApplication
.
Schedule
readonly
property
var
dayList
:
basicViewLoader
.
item
readonly
property
var
dayList
:
{
switch
(
Kalendar
.
Config
.
monthListMode
)
{
case
Kalendar
.
Config
.
BasicMonthList
:
return
basicViewLoader
.
item
;
case
Kalendar
.
Config
.
SwipeableMonthList
:
default
:
return
swipeableViewLoader
.
item
;
}
}
readonly
property
Kirigami.Action
previousAction
:
Kirigami.Action
{
icon.name
:
"
go-previous
"
...
...
@@ -72,7 +80,7 @@ Kirigami.Page {
Loader
{
id
:
swipeableViewLoader
anchors.fill
:
parent
active
:
false
active
:
Kalendar
.
Config
.
monthListMode
===
Kalendar
.
Config
.
SwipeableMonthList
sourceComponent
:
SwipeableMonthListView
{
anchors.fill
:
parent
initialMonth
:
root
.
initialMonth
...
...
@@ -88,7 +96,7 @@ Kirigami.Page {
Loader
{
id
:
basicViewLoader
anchors.fill
:
parent
active
:
true
active
:
Kalendar
.
Config
.
monthListMode
===
Kalendar
.
Config
.
BasicMonthList
sourceComponent
:
BasicMonthListView
{
anchors.fill
:
parent
initialMonth
:
root
.
initialMonth
...
...
src/contents/ui/Settings/ViewSettingsPage.qml
View file @
80a8534c
...
...
@@ -269,6 +269,41 @@ Kirigami.ScrollablePage {
MobileForm.FormCardHeader
{
title
:
i18n
(
"
Schedule View settings
"
)
}
Controls.ButtonGroup
{
id
:
monthListModeGroup
exclusive
:
true
onCheckedButtonChanged
:
{
Config
.
monthListMode
=
checkedButton
.
value
;
Config
.
save
();
}
}
MobileForm.FormSectionText
{
text
:
i18n
(
"
Schedule view mode
"
)
}
ColumnLayout
{
spacing
:
0
Layout.fillWidth
:
true
MobileForm.FormRadioDelegate
{
property
int
value
:
Config
.
SwipeableMonthList
text
:
i18n
(
"
Swipeable schedule view
"
)
enabled
:
!
Config
.
isMonthListModeImmutable
checked
:
Config
.
monthListMode
===
value
Controls.ButtonGroup.group
:
monthListModeGroup
}
MobileForm.FormRadioDelegate
{
property
int
value
:
Config
.
BasicMonthList
text
:
i18n
(
"
Basic schedule view
"
)
enabled
:
!
Config
.
isMonthListModeImmutable
checked
:
Config
.
monthListMode
===
value
Controls.ButtonGroup.group
:
monthListModeGroup
}
MobileForm.FormTextDelegate
{
text
:
i18n
(
"
Swipeable schedule view requires higher system performance.
"
)
visible
:
Config
.
monthListMode
===
Config
.
SwipeableMonthList
}
}
MobileForm.FormCheckDelegate
{
text
:
i18n
(
"
Show week headers
"
)
checked
:
Config
.
showWeekHeaders
...
...
src/kalendarconfig.kcfg
View file @
80a8534c
...
...
@@ -169,6 +169,19 @@ SPDX-License-Identifier: LGPL-2.0-or-later
</group>
<group
name=
"ScheduleView"
>
<entry
name=
"monthListMode"
type=
"Enum"
>
<label>
Type of day list view to be used internally in the schedule view"
</label>
<choices>
<choice
name=
"SwipeableMonthList"
>
<label>
Swipeable internal month list view
</label>
</choice>
<choice
name=
"BasicMonthList"
>
<label>
Basic internal month list view
</label>
</choice>
</choices>
<default>
SwipeableMonthList
</default>
</entry>
<entry
name=
"showWeekHeaders"
type=
"Bool"
>
<label>
Show week headers in schedule view.
</label>
<default>
true
</default>
...
...
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