2023-05-22 16:17:51 +08:00
|
|
|
import QtQuick
|
2023-03-30 21:52:55 +08:00
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Window
|
|
|
|
import QtQuick.Controls
|
|
|
|
import FluentUI
|
2023-04-22 16:02:52 +08:00
|
|
|
import "../component"
|
2023-03-06 18:08:01 +08:00
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
FluScrollablePage{
|
2023-03-28 17:53:46 +08:00
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
title:"Dialog"
|
2023-04-06 17:32:21 +08:00
|
|
|
|
|
|
|
FluArea{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
height: 68
|
|
|
|
paddings: 10
|
|
|
|
Layout.topMargin: 20
|
2023-04-20 18:10:45 +08:00
|
|
|
FluButton{
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
Layout.topMargin: 20
|
|
|
|
text:"Show Double Button Dialog"
|
|
|
|
onClicked: {
|
|
|
|
double_btn_dialog.open()
|
2023-04-06 17:32:21 +08:00
|
|
|
}
|
2023-04-20 18:10:45 +08:00
|
|
|
}
|
2023-04-06 17:32:21 +08:00
|
|
|
}
|
|
|
|
CodeExpander{
|
|
|
|
Layout.fillWidth: true
|
2023-04-19 17:25:46 +08:00
|
|
|
Layout.topMargin: -1
|
2023-04-06 17:32:21 +08:00
|
|
|
code:'FluContentDialog{
|
|
|
|
id:dialog
|
|
|
|
title:"友情提示"
|
|
|
|
message:"确定要退出程序么?"
|
|
|
|
negativeText:"取消"
|
2023-04-20 18:10:45 +08:00
|
|
|
buttonFlags: FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
|
2023-04-06 17:32:21 +08:00
|
|
|
onNegativeClicked:{
|
|
|
|
showSuccess("点击取消按钮")
|
|
|
|
}
|
|
|
|
positiveText:"确定"
|
|
|
|
onPositiveClicked:{
|
|
|
|
showSuccess("点击确定按钮")
|
|
|
|
}
|
2023-04-20 18:10:45 +08:00
|
|
|
}
|
|
|
|
dialog.open()'
|
2023-04-06 17:32:21 +08:00
|
|
|
}
|
2023-03-07 00:05:27 +08:00
|
|
|
|
|
|
|
FluContentDialog{
|
2023-04-20 18:10:45 +08:00
|
|
|
id:double_btn_dialog
|
2023-03-07 00:05:27 +08:00
|
|
|
title:"友情提示"
|
|
|
|
message:"确定要退出程序么?"
|
2023-04-20 18:10:45 +08:00
|
|
|
buttonFlags: FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
|
2023-03-07 00:05:27 +08:00
|
|
|
negativeText:"取消"
|
|
|
|
onNegativeClicked:{
|
|
|
|
showSuccess("点击取消按钮")
|
|
|
|
}
|
|
|
|
positiveText:"确定"
|
|
|
|
onPositiveClicked:{
|
|
|
|
showSuccess("点击确定按钮")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-20 18:10:45 +08:00
|
|
|
FluArea{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
height: 68
|
|
|
|
paddings: 10
|
|
|
|
Layout.topMargin: 20
|
|
|
|
FluButton{
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
Layout.topMargin: 20
|
|
|
|
text:"Show Triple Button Dialog"
|
|
|
|
onClicked: {
|
|
|
|
triple_btn_dialog.open()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CodeExpander{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: -1
|
|
|
|
code:'FluContentDialog{
|
|
|
|
id:dialog
|
|
|
|
title:"友情提示"
|
|
|
|
message:"确定要退出程序么?"
|
|
|
|
negativeText:"取消"
|
2023-04-20 20:22:56 +08:00
|
|
|
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
|
|
|
|
negativeText:"取消"
|
|
|
|
onNegativeClicked:{
|
|
|
|
showSuccess("点击取消按钮")
|
|
|
|
}
|
|
|
|
positiveText:"确定"
|
|
|
|
onPositiveClicked:{
|
|
|
|
showSuccess("点击确定按钮")
|
|
|
|
}
|
|
|
|
neutralText:"最小化"
|
|
|
|
onNeutralClicked:{
|
|
|
|
showSuccess("点击最小化按钮")
|
2023-04-20 18:10:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
dialog.open()'
|
|
|
|
}
|
2023-04-06 17:32:21 +08:00
|
|
|
|
2023-04-20 18:10:45 +08:00
|
|
|
FluContentDialog{
|
|
|
|
id:triple_btn_dialog
|
|
|
|
title:"友情提示"
|
|
|
|
message:"确定要退出程序么?"
|
|
|
|
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
|
|
|
|
negativeText:"取消"
|
|
|
|
onNegativeClicked:{
|
|
|
|
showSuccess("点击取消按钮")
|
|
|
|
}
|
|
|
|
positiveText:"确定"
|
|
|
|
onPositiveClicked:{
|
|
|
|
showSuccess("点击确定按钮")
|
|
|
|
}
|
|
|
|
neutralText:"最小化"
|
|
|
|
onNeutralClicked:{
|
|
|
|
showSuccess("点击最小化按钮")
|
|
|
|
}
|
|
|
|
}
|
2023-03-06 18:08:01 +08:00
|
|
|
}
|