Change layout adding inline message.
This commit is contained in:
@@ -71,77 +71,89 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
Kirigami.CardsListView {
|
||||
anchors.fill: parent
|
||||
id: vehicleView
|
||||
model: vehicleModel
|
||||
delegate: Kirigami.Card {
|
||||
id: card
|
||||
banner {
|
||||
title: name
|
||||
}
|
||||
header: Row{
|
||||
topPadding: 10.0
|
||||
rightPadding: 10.0
|
||||
leftPadding: 10.0
|
||||
layoutDirection: Qt.RightToLeft
|
||||
spacing: 5
|
||||
Controls.Label {
|
||||
text: vin
|
||||
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
|
||||
Layouts.ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Kirigami.InlineMessage { //TODO:connect to code to detect car alerts.
|
||||
Layouts.Layout.fillWidth: true
|
||||
Layouts.Layout.leftMargin: 10
|
||||
Layouts.Layout.rightMargin: 10
|
||||
z: 9997
|
||||
type: Kirigami.MessageType.Information
|
||||
id: infoMessage
|
||||
showCloseButton: true
|
||||
}
|
||||
Kirigami.CardsListView {
|
||||
anchors.fill: parent
|
||||
id: vehicleView
|
||||
model: vehicleModel
|
||||
delegate: Kirigami.Card {
|
||||
id: card
|
||||
banner {
|
||||
title: name
|
||||
}
|
||||
header: Row{
|
||||
topPadding: 10.0
|
||||
rightPadding: 10.0
|
||||
leftPadding: 10.0
|
||||
layoutDirection: Qt.RightToLeft
|
||||
spacing: 5
|
||||
Controls.Label {
|
||||
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{
|
||||
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 {}
|
||||
Controls.ScrollBar.vertical: Controls.ScrollBar {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user