Change layout adding inline message.
This commit is contained in:
@@ -71,77 +71,89 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Kirigami.CardsListView {
|
Layouts.ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
id: vehicleView
|
Kirigami.InlineMessage { //TODO:connect to code to detect car alerts.
|
||||||
model: vehicleModel
|
Layouts.Layout.fillWidth: true
|
||||||
delegate: Kirigami.Card {
|
Layouts.Layout.leftMargin: 10
|
||||||
id: card
|
Layouts.Layout.rightMargin: 10
|
||||||
banner {
|
z: 9997
|
||||||
title: name
|
type: Kirigami.MessageType.Information
|
||||||
}
|
id: infoMessage
|
||||||
header: Row{
|
showCloseButton: true
|
||||||
topPadding: 10.0
|
}
|
||||||
rightPadding: 10.0
|
Kirigami.CardsListView {
|
||||||
leftPadding: 10.0
|
anchors.fill: parent
|
||||||
layoutDirection: Qt.RightToLeft
|
id: vehicleView
|
||||||
spacing: 5
|
model: vehicleModel
|
||||||
Controls.Label {
|
delegate: Kirigami.Card {
|
||||||
text: vin
|
id: card
|
||||||
visible: root.wideScreen && mainPage.width > 550
|
banner {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
title: name
|
||||||
}
|
}
|
||||||
Image {
|
header: Row{
|
||||||
id: vinIcon
|
topPadding: 10.0
|
||||||
source: "qrc:/license.svg"
|
rightPadding: 10.0
|
||||||
sourceSize.width: 32
|
leftPadding: 10.0
|
||||||
sourceSize.height: 32
|
layoutDirection: Qt.RightToLeft
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
spacing: 5
|
||||||
MouseArea {
|
Controls.Label {
|
||||||
id: vinMouse
|
|
||||||
hoverEnabled: true
|
|
||||||
anchors.fill: vinIcon
|
|
||||||
}
|
|
||||||
Controls.ToolTip {
|
|
||||||
id: vinTip
|
|
||||||
text: vin
|
text: vin
|
||||||
visible: vinMouse.containsMouse
|
visible: root.wideScreen && mainPage.width > 550
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
Image {
|
||||||
|
id: vinIcon
|
||||||
|
source: "qrc:/license.svg"
|
||||||
|
sourceSize.width: 32
|
||||||
|
sourceSize.height: 32
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
MouseArea {
|
||||||
|
id: vinMouse
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: vinIcon
|
||||||
|
}
|
||||||
|
Controls.ToolTip {
|
||||||
|
id: vinTip
|
||||||
|
text: vin
|
||||||
|
visible: vinMouse.containsMouse
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentItem: Item{
|
||||||
|
implicitHeight: Kirigami.Units.gridUnit * 4
|
||||||
|
Layouts.ColumnLayout {
|
||||||
|
Kirigami.Heading {
|
||||||
|
text: maker + " " + vmodel
|
||||||
|
level: 2
|
||||||
|
}
|
||||||
|
Kirigami.Heading {
|
||||||
|
text: year
|
||||||
|
level: 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
actions: [
|
||||||
|
Kirigami.Action {
|
||||||
|
text: qsTr("Examine Logs")
|
||||||
|
iconName: "edit-find"
|
||||||
|
onTriggered: {
|
||||||
|
router.navigateToRoute(["main", {"route": "servicerecords", "data": {"id": id, "name": name}}]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
hiddenActions: [
|
||||||
|
Kirigami.Action {
|
||||||
|
text: qsTr("Delete")
|
||||||
|
iconName: "edit-delete"
|
||||||
|
onTriggered: {
|
||||||
|
vehicleModel.removeVehicle(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
contentItem: Item{
|
Controls.ScrollBar.vertical: Controls.ScrollBar {}
|
||||||
implicitHeight: Kirigami.Units.gridUnit * 4
|
}
|
||||||
Layouts.ColumnLayout {
|
|
||||||
Kirigami.Heading {
|
|
||||||
text: maker + " " + vmodel
|
|
||||||
level: 2
|
|
||||||
}
|
|
||||||
Kirigami.Heading {
|
|
||||||
text: year
|
|
||||||
level: 4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
actions: [
|
|
||||||
Kirigami.Action {
|
|
||||||
text: qsTr("Examine Logs")
|
|
||||||
iconName: "edit-find"
|
|
||||||
onTriggered: {
|
|
||||||
router.navigateToRoute(["main", {"route": "servicerecords", "data": {"id": id, "name": name}}]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
hiddenActions: [
|
|
||||||
Kirigami.Action {
|
|
||||||
text: qsTr("Delete")
|
|
||||||
iconName: "edit-delete"
|
|
||||||
onTriggered: {
|
|
||||||
vehicleModel.removeVehicle(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Controls.ScrollBar.vertical: Controls.ScrollBar {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user