Newer
Older
import QtQuick 2.0
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.0
property alias icon: icon.source
property alias primaryText: primaryText.text
property alias informativeText: informativeText.text
property alias detailsVisible: details.visible
property alias detailedContentLoader: detailedContentLoader
property alias actionButton: actionButton
property alias acceptButton: acceptButton
property alias rejectButton: rejectButton
function open() {
dialog.visible = true;
}
function close() {
dialog.visible = false;
}
function toggleDetails() {
details.visible = details.visible ? false : true;
}
RowLayout {
Layout.fillWidth: true
spacing: 12
Image {
id: icon
source: ""
visible: source.toString() ? true : false
}
ColumnLayout {
Layout.fillWidth: true
spacing: 4
Label {
id: primaryText
text: ""
visible: text ? true : false
Layout.fillWidth: true
wrapMode: Text.WrapAnywhere
font.bold: true
}
Label {
id: informativeText
text: ""
visible: text ? true : false
Layout.fillWidth: true
wrapMode: Text.WrapAnywhere
}
}
ColumnLayout {
id: details
visible: false
spacing: 12
Label {
id: detailedText
text: ""
visible: text ? true : false
Layout.fillWidth: true
wrapMode: Text.WrapAnywhere
}
Button {
id: actionButton
text: ""
visible: text ? true : false
}