/*
* Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 3.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
import QtQuick 2.4
import QtQuick.Window 2.2
import Lomiri.Components
import "internalPopupUtils.js" as InternalPopupUtils
/*!
\qmltype Dialog
\inherits PopupBase
\inqmlmodule Lomiri.Components.Popups 1.0
\ingroup lomiri-popups
\brief The Dialog caters for cases in which the application requires the user to determine
between optional actions. The Dialog will interrupt the user flow and lock the view
for further interaction before the user has selected a desired action.
It can only be closed by selecting an optional action confirming or cancelling the operation.
\l {http://design.lomiri.com/apps/building-blocks/dialog}{See also the Design Guidelines on Dialogs}.
Example:
\qml
import QtQuick 2.4
import Lomiri.Components
import Lomiri.Components.Popups
Item {
width: units.gu(80)
height: units.gu(80)
Component {
id: dialog
Dialog {
id: dialogue
title: "Save file"
text: "Are you sure that you want to save this file?"
Button {
text: "cancel"
onClicked: PopupUtils.close(dialogue)
}
Button {
text: "overwrite previous version"
color: LomiriColors.orange
onClicked: PopupUtils.close(dialogue)
}
Button {
text: "save a copy"
color: LomiriColors.orange
onClicked: PopupUtils.close(dialogue)
}
}
}
Button {
anchors.centerIn: parent
id: saveButton
text: "save"
onClicked: PopupUtils.open(dialog)
}
}
\endqml
*/
PopupBase {
id: dialog
/*!
\qmlproperty list