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
Itinerary
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
20
Issues
20
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
PIM
Itinerary
Commits
7713666a
Commit
7713666a
authored
May 13, 2018
by
Volker Krause
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add details page for restaurant reservations
parent
aaab5db2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
10 deletions
+105
-10
src/app/CMakeLists.txt
src/app/CMakeLists.txt
+1
-0
src/app/RestaurantDelegate.qml
src/app/RestaurantDelegate.qml
+8
-10
src/app/RestaurantPage.qml
src/app/RestaurantPage.qml
+95
-0
src/app/qml.qrc
src/app/qml.qrc
+1
-0
No files found.
src/app/CMakeLists.txt
View file @
7713666a
...
...
@@ -65,6 +65,7 @@ qml_lint(
PkPassPage.qml
PlaceDelegate.qml
RestaurantDelegate.qml
RestaurantPage.qml
TicketTokenDelegate.qml
TimelineDelegate.qml
TimelinePage.qml
...
...
src/app/RestaurantDelegate.qml
View file @
7713666a
...
...
@@ -61,16 +61,14 @@ App.TimelineDelegate {
place
:
reservation
.
reservationFor
Layout.fillWidth
:
true
}
QQC2.Label
{
text
:
qsTr
(
"
Person: %1
"
)
.
arg
(
reservation
.
partySize
)
color
:
Kirigami
.
Theme
.
textColor
}
QQC2.Label
{
text
:
qsTr
(
"
End: %1
"
)
.
arg
(
Localizer
.
formatTime
(
reservation
,
"
endTime
"
))
color
:
Kirigami
.
Theme
.
textColor
}
Component
{
id
:
detailsComponent
App.RestaurantPage
{
reservation
:
root
.
reservation
}
}
}
onClicked
:
applicationWindow
().
pageStack
.
push
(
detailsComponent
);
}
src/app/RestaurantPage.qml
0 → 100644
View file @
7713666a
/*
Copyright (C) 2018 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import
QtQuick
2.5
import
QtQuick
.
Layouts
1.1
import
QtQuick
.
Controls
2.1
as
QQC2
import
org
.
kde
.
kirigami
2.0
as
Kirigami
import
org
.
kde
.
kitinerary
1.0
import
org
.
kde
.
itinerary
1.0
import
"
.
"
as
App
App.DetailsPage
{
id
:
root
title
:
qsTr
(
"
Restaurant Reservation
"
)
GridLayout
{
id
:
grid
width
:
root
.
width
columns
:
2
QQC2.Label
{
Layout.columnSpan
:
2
Layout.fillWidth
:
true
text
:
reservation
.
reservationFor
.
name
horizontalAlignment
:
Qt
.
AlignHCenter
font.bold
:
true
}
App.PlaceDelegate
{
Layout.columnSpan
:
2
Layout.fillWidth
:
true
place
:
reservation
.
reservationFor
}
// TODO make these interactive
QQC2.Label
{
text
:
qsTr
(
"
Telephone:
"
)
}
QQC2.Label
{
text
:
reservation
.
reservationFor
.
telephone
}
QQC2.Label
{
text
:
qsTr
(
"
Email:
"
)
}
QQC2.Label
{
text
:
reservation
.
reservationFor
.
email
}
QQC2.Label
{
text
:
qsTr
(
"
Start time:
"
)
}
QQC2.Label
{
text
:
Localizer
.
formatDateTime
(
reservation
,
"
startTime
"
)
}
QQC2.Label
{
text
:
qsTr
(
"
End time:
"
)
}
QQC2.Label
{
text
:
Localizer
.
formatDateTime
(
reservation
,
"
endTime
"
)
}
QQC2.Label
{
text
:
qsTr
(
"
Party size:
"
)
}
QQC2.Label
{
text
:
reservation
.
partySize
}
QQC2.Label
{
text
:
qsTr
(
"
Booking reference:
"
)
}
QQC2.Label
{
text
:
reservation
.
reservationNumber
}
QQC2.Label
{
text
:
qsTr
(
"
Under name:
"
)
}
QQC2.Label
{
text
:
reservation
.
underName
.
name
}
}
}
src/app/qml.qrc
View file @
7713666a
...
...
@@ -12,6 +12,7 @@
<file>PkPassPage.qml</file>
<file>PlaceDelegate.qml</file>
<file>RestaurantDelegate.qml</file>
<file>RestaurantPage.qml</file>
<file>TicketTokenDelegate.qml</file>
<file>TimelineDelegate.qml</file>
<file>TimelinePage.qml</file>
...
...
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