Commit 1a32f33a authored by Volker Krause's avatar Volker Krause
Browse files

Rework timeline section headers

This introduces a way around the limited way of passing model data to
section header delegates, and uses that to add information about public
holidays to the day headers in the timeline.
parent 7e82be11
Pipeline #103891 passed with stage
in 3 minutes and 7 seconds
......@@ -89,6 +89,9 @@ endif()
if (TARGET KHealthCertificate)
set(HAVE_KHEALTHCERTIFICATE TRUE)
endif()
if (TARGET KF5::Holidays)
set(HAVE_KHOLIDAYS TRUE)
endif()
if (TARGET KF5::UnitConversion)
set(HAVE_KUNITCONVERSION TRUE)
endif()
......
......@@ -17,6 +17,7 @@ ecm_add_test(applicationcontrollertest.cpp LINK_LIBRARIES Qt::Test itinerary)
ecm_add_test(tripgrouptest.cpp LINK_LIBRARIES Qt::Test itinerary)
ecm_add_test(locationinformationtest.cpp LINK_LIBRARIES Qt::Test itinerary)
ecm_add_test(timelinemodeltest.cpp modelverificationpoint.cpp TEST_NAME timelinemodeltest LINK_LIBRARIES Qt::Test itinerary)
ecm_add_test(timelinesectiondelegatecontrollertest.cpp LINK_LIBRARIES Qt::Test itinerary)
ecm_add_test(tripgroupproxytest.cpp modelverificationpoint.cpp TEST_NAME tripgroupproxytest LINK_LIBRARIES Qt::Test itinerary)
ecm_add_test(tripgroupinfoprovidertest.cpp TEST_NAME tripgroupinfoprovidertest LINK_LIBRARIES Qt::Test itinerary)
ecm_add_test(publictransporttest.cpp TEST_NAME publictransporttest LINK_LIBRARIES Qt::Test itinerary)
......
......@@ -3,7 +3,7 @@
"isToday": true,
"isTodayEmpty": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "2196-10-14",
"type": 1
}
]
......@@ -3,7 +3,7 @@
"isToday": true,
"isTodayEmpty": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "2196-10-15",
"type": 1
}
]
......@@ -59,7 +59,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 6
},
{
......@@ -80,7 +80,7 @@
"timeZoneOffsetDelta": 0
},
"rangeType": 0,
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 4
},
{
......@@ -143,7 +143,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 6
},
{
......@@ -164,20 +164,20 @@
"timeZoneOffsetDelta": -28800
},
"rangeType": 0,
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 4
},
{
"isToday": true,
"isTodayEmpty": false,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "2196-10-15",
"type": 1
},
{
"isToday": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "2196-10-15",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -194,7 +194,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Sunday, 10/16/96",
"sectionHeader": "2196-10-16",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -211,7 +211,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Monday, 10/17/96",
"sectionHeader": "2196-10-17",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -228,7 +228,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Tuesday, 10/18/96",
"sectionHeader": "2196-10-18",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -245,7 +245,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Wednesday, 10/19/96",
"sectionHeader": "2196-10-19",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -262,7 +262,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Thursday, 10/20/96",
"sectionHeader": "2196-10-20",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -279,7 +279,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Friday, 10/21/96",
"sectionHeader": "2196-10-21",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -296,7 +296,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Saturday, 10/22/96",
"sectionHeader": "2196-10-22",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -313,7 +313,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Sunday, 10/23/96",
"sectionHeader": "2196-10-23",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......
......@@ -59,7 +59,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 6
},
{
......@@ -80,7 +80,7 @@
"timeZoneOffsetDelta": 0
},
"rangeType": 0,
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 4
},
{
......@@ -143,7 +143,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 6
},
{
......@@ -164,20 +164,20 @@
"timeZoneOffsetDelta": -28800
},
"rangeType": 0,
"sectionHeader": "Wednesday, 1/4/17",
"sectionHeader": "2017-01-04",
"type": 4
},
{
"isToday": true,
"isTodayEmpty": false,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "2196-10-16",
"type": 1
},
{
"isToday": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "2196-10-16",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -194,7 +194,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Monday, 10/17/96",
"sectionHeader": "2196-10-17",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -211,7 +211,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Tuesday, 10/18/96",
"sectionHeader": "2196-10-18",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -228,7 +228,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Wednesday, 10/19/96",
"sectionHeader": "2196-10-19",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -245,7 +245,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Thursday, 10/20/96",
"sectionHeader": "2196-10-20",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -262,7 +262,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Friday, 10/21/96",
"sectionHeader": "2196-10-21",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -279,7 +279,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Saturday, 10/22/96",
"sectionHeader": "2196-10-22",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -296,7 +296,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Sunday, 10/23/96",
"sectionHeader": "2196-10-23",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -313,7 +313,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Monday, 10/24/96",
"sectionHeader": "2196-10-24",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......
......@@ -3,7 +3,7 @@
"isToday": true,
"isTodayEmpty": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "1996-10-14",
"type": 1
},
{
......@@ -80,7 +80,7 @@
}
}
],
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"type": 6
}
]
......@@ -3,13 +3,13 @@
"isToday": true,
"isTodayEmpty": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "1996-10-14",
"type": 1
},
{
"isToday": false,
"rangeType": 1,
"sectionHeader": "Saturday, 1/1/00",
"sectionHeader": "2000-01-01",
"tripGroup": {
"@context": "http://schema.org",
"@type": "TripGroup",
......@@ -30,7 +30,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Saturday, 1/1/00",
"sectionHeader": "2000-01-01",
"transfer": {
"@context": "http://schema.org",
"@type": "Transfer",
......@@ -184,7 +184,7 @@
}
}
],
"sectionHeader": "Saturday, 1/1/00",
"sectionHeader": "2000-01-01",
"type": 6
},
{
......@@ -310,7 +310,7 @@
}
}
],
"sectionHeader": "Saturday, 1/1/00",
"sectionHeader": "2000-01-01",
"type": 6
},
{
......@@ -330,13 +330,13 @@
"timeZoneOffsetDelta": 0
},
"rangeType": 0,
"sectionHeader": "Saturday, 1/1/00",
"sectionHeader": "2000-01-01",
"type": 4
},
{
"isToday": false,
"rangeType": 2,
"sectionHeader": "Saturday, 1/1/00",
"sectionHeader": "2000-01-01",
"tripGroup": {
"@context": "http://schema.org",
"@type": "TripGroup",
......
......@@ -57,20 +57,20 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Tuesday, 10/17/95",
"sectionHeader": "1995-10-17",
"type": 6
},
{
"isToday": true,
"isTodayEmpty": false,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "1996-10-14",
"type": 1
},
{
"isToday": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "1996-10-14",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -87,7 +87,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Tuesday, 10/15/96",
"sectionHeader": "1996-10-15",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -104,7 +104,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -121,7 +121,7 @@
{
"isToday": false,
"rangeType": 1,
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"tripGroup": {
"@context": "http://schema.org",
"@type": "TripGroup",
......@@ -142,7 +142,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"transfer": {
"@context": "http://schema.org",
"@type": "Transfer",
......@@ -233,13 +233,13 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"type": 6
},
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"transfer": {
"@context": "http://schema.org",
"@type": "Transfer",
......@@ -274,7 +274,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -320,7 +320,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Wednesday, 10/16/96",
"sectionHeader": "1996-10-16",
"type": 13
},
{
......@@ -355,13 +355,13 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Thursday, 10/17/96",
"sectionHeader": "1996-10-17",
"type": 13
},
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Thursday, 10/17/96",
"sectionHeader": "1996-10-17",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -378,7 +378,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Thursday, 10/17/96",
"sectionHeader": "1996-10-17",
"transfer": {
"@context": "http://schema.org",
"@type": "Transfer",
......@@ -470,13 +470,13 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Thursday, 10/17/96",
"sectionHeader": "1996-10-17",
"type": 6
},
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Thursday, 10/17/96",
"sectionHeader": "1996-10-17",
"transfer": {
"@context": "http://schema.org",
"@type": "Transfer",
......@@ -510,7 +510,7 @@
{
"isToday": false,
"rangeType": 2,
"sectionHeader": "Thursday, 10/17/96",
"sectionHeader": "1996-10-17",
"tripGroup": {
"@context": "http://schema.org",
"@type": "TripGroup",
......@@ -531,7 +531,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Thursday, 10/17/96",
"sectionHeader": "1996-10-17",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -548,7 +548,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Friday, 10/18/96",
"sectionHeader": "1996-10-18",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -565,7 +565,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Saturday, 10/19/96",
"sectionHeader": "1996-10-19",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -582,7 +582,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Sunday, 10/20/96",
"sectionHeader": "1996-10-20",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -599,7 +599,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Monday, 10/21/96",
"sectionHeader": "1996-10-21",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -616,7 +616,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Tuesday, 10/22/96",
"sectionHeader": "1996-10-22",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......@@ -633,7 +633,7 @@
{
"isToday": false,
"rangeType": 0,
"sectionHeader": "Wednesday, 10/23/96",
"sectionHeader": "1996-10-23",
"type": 3,
"weatherForecast": {
"@context": "http://schema.org",
......
......@@ -3,13 +3,13 @@
"isToday": true,
"isTodayEmpty": true,
"rangeType": 0,
"sectionHeader": "Today",
"sectionHeader": "2017-09-09",
"type": 1
},
{
"isToday": false,
"rangeType": 1,
"sectionHeader": "Sunday, 9/10/17",
"sectionHeader": "2017-09-10",
"tripGroup": {
"@context": "http://schema.org",
"@type": "TripGroup",
......@@ -93,7 +93,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Sunday, 9/10/17",
"sectionHeader": "2017-09-10",
"type": 6
},
{
......@@ -114,7 +114,7 @@
"timeZoneOffsetDelta": 0
},
"rangeType": 0,
"sectionHeader": "Sunday, 9/10/17",
"sectionHeader": "2017-09-10",
"type": 4
},
{
......@@ -187,7 +187,7 @@
}
}
],
"sectionHeader": "Sunday, 9/10/17",
"sectionHeader": "2017-09-10",
"type": 7
},
{
......@@ -250,7 +250,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Sunday, 9/10/17",
"sectionHeader": "2017-09-10",
"type": 7
},
{
......@@ -294,7 +294,7 @@
}
}
],
"sectionHeader": "Sunday, 9/10/17",
"sectionHeader": "2017-09-10",
"type": 12
},
{
......@@ -336,7 +336,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Sunday, 9/10/17",
"sectionHeader": "2017-09-10",
"type": 13
},
{
......@@ -386,7 +386,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"
}
],
"sectionHeader": "Wednesday, 9/13/17",
"sectionHeader": "2017-09-13",
"type": 9
},
{
......@@ -422,7 +422,7 @@
}
}
],
"sectionHeader": "Wednesday, 9/13/17",
"sectionHeader": "2017-09-13",
"type": 11
},
{
......@@ -464,7 +464,7 @@
}
}
],
"sectionHeader": "Thursday, 9/14/17",
"sectionHeader": "2017-09-14",
"type": 10
},
{
......@@ -506,7 +506,7 @@
"reservationStatus": "http://schema.org/ReservationConfirmed"