1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- import QtQuick 1.1
- DialogLiquid {
- id: dlgQuery
- signal clickedOk
- signal clickedCancel
- property string title: ""
- property int fontTitleSize: 24
- property string text: ""
- property int fontTextSize: 22
- width: parent.width*0.9
- height: headerDlg.height + dlgText.height + rowButtons.height + dlgText.anchors.topMargin + rowButtons.anchors.topMargin + 20
- Rectangle {
- id: headerDlg
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: 70
- gradient: Gradient {
- GradientStop { position: 0; color: "#919191" }
- GradientStop { position: 1; color: "#666666" }
- }
- Text {
- anchors.centerIn: parent
- font.pixelSize: dlgQuery.fontTitleSize
- color: "white"
- text: dlgQuery.title
- }
- }
- Text {
- id: dlgText
- anchors.top: headerDlg.bottom; anchors.topMargin: 20
- anchors.left: parent.left; anchors.leftMargin: 10
- font.pixelSize: dlgQuery.fontTextSize
- width: parent.width - 10
- text: dlgQuery.text
- clip: true
- HorizontalGradient {
- anchors.left: parent.left
- anchors.top: parent.top
- height: parent.height
- width: parent.width
- gradient: Gradient {
- GradientStop { color: "transparent"; position: 0 }
- GradientStop { color: "transparent"; position: 0.8 }
- GradientStop { color: "white"; position: 0.95 }
- GradientStop { color: "white"; position: 1 }
- }
- }
- }
- /****************************************************/
- Row {
- id: rowButtons
- anchors.top: dlgText.bottom; anchors.topMargin: 20
- anchors.left: parent.left; anchors.leftMargin: 10
- spacing: 20
- Button {
- id: buttonOk
- height: 70
- text: qsTr("Ok")
- width: dlgQuery.width/2 - 20
- onClicked: {
- dlgQuery.clickedOk()
- dlgQuery.state = "hidden"
- }
- }
- Button {
- id: buttonCancel
- height: 70
- text: qsTr( "Cancel" )
- width: dlgQuery.width/2 - 20
- onClicked: {
- dlgQuery.clickedCancel()
- dlgQuery.state = "hidden"
- }
- }
- }
- /****************************************************/
- }
|