@ -7,12 +7,13 @@ import QtQuick.Controls.Styles 1.3
import org . ethereum . qml . QEther 1.0
import org . ethereum . qml . QEther 1.0
import "js/TransactionHelper.js" as TransactionHelper
import "js/TransactionHelper.js" as TransactionHelper
import "js/InputValidator.js" as InputValidator
import "js/InputValidator.js" as InputValidator
import "js/NetworkDeployment.js" as NetworkDeployment
import "."
import "."
Dialog {
Dialog {
id: modalTransactionDialog
id: modalTransactionDialog
modality: Qt . ApplicationModal
modality: Qt . ApplicationModal
width: 57 0
width: 58 0
height: 500
height: 500
visible: false
visible: false
title: qsTr ( "Edit Transaction" )
title: qsTr ( "Edit Transaction" )
@ -22,7 +23,7 @@ Dialog {
property alias gasAuto: gasAutoCheck . checked ;
property alias gasAuto: gasAutoCheck . checked ;
property alias gasPrice: gasPriceField . value ;
property alias gasPrice: gasPriceField . value ;
property alias transactionValue: valueField . value ;
property alias transactionValue: valueField . value ;
property string contractId: contractComboBox . currentValue ( ) ;
property string contractId: contractCreationC omboBox . currentValue ( ) ;
property alias functionId: functionComboBox . currentText ;
property alias functionId: functionComboBox . currentText ;
property var paramValues ;
property var paramValues ;
property var paramsModel: [ ] ;
property var paramsModel: [ ] ;
@ -30,21 +31,16 @@ Dialog {
property alias stateAccounts: senderComboBox . model
property alias stateAccounts: senderComboBox . model
property bool saveStatus
property bool saveStatus
signal accepted ;
signal accepted ;
property int rowWidth: 500
StateDialogStyle {
StateDialogStyle {
id: transactionDialogStyle
id: transactionDialogStyle
}
}
function open ( index , blockIdx , item ) {
function open ( index , blockIdx , item ) {
rowFunction . visible = ! useTransactionDefaultValue ;
rowValue . visible = ! useTransactionDefaultValue ;
rowGas . visible = ! useTransactionDefaultValue ;
rowGasPrice . visible = ! useTransactionDefaultValue ;
transactionIndex = index
transactionIndex = index
blockIndex = blockIdx
blockIndex = blockIdx
typeLoader . transactionIndex = index
paramScroll . transactionIndex = index
typeLoader . blockIndex = blockIdx
paramScroll . blockIndex = blockIdx
saveStatus = item . saveStatus
saveStatus = item . saveStatus
gasValueEdit . gasValue = item . gas ;
gasValueEdit . gasValue = item . gas ;
gasAutoCheck . checked = item . gasAuto ? true : false ;
gasAutoCheck . checked = item . gasAuto ? true : false ;
@ -52,48 +48,20 @@ Dialog {
valueField . value = item . value ;
valueField . value = item . value ;
var contractId = item . contractId ;
var contractId = item . contractId ;
var functionId = item . functionId ;
var functionId = item . functionId ;
rowFunction . visible = true ;
paramValues = item . parameters !== undefined ? item.parameters : { } ;
paramValues = item . parameters !== undefined ? item.parameters : { } ;
if ( item . sender )
if ( item . sender )
senderComboBox . select ( item . sender ) ;
senderComboBox . select ( item . sender ) ;
contractsModel . clear ( ) ;
var contractIndex = - 1 ;
var contracts = codeModel . contracts ;
for ( var c in contracts ) {
contractsModel . append ( { cid: c , text: contracts [ c ] . contract . name } ) ;
if ( contracts [ c ] . contract . name === contractId )
contractIndex = contractsModel . count - 1 ;
}
if ( contractIndex == - 1 && contractsModel . count > 0 )
trTypeCreate . checked = item . isContractCreation
contractIndex = 0 ; / / @ t o d o s u g g e s t u n u s e d c o n t r a c t
trTypeSend . checked = ! item . isFunctionCall
contractComboBox . currentIndex = contractIndex ;
trTypeExecute . checked = item . isFunctionCall && ! item . isContractCreation
recipients . accounts = senderComboBox . model ;
load ( item . isContractCreation , item . isFunctionCall , functionId , contractId )
recipients . subType = "address" ;
recipients . load ( ) ;
recipients . init ( ) ;
recipients . select ( contractId ) ;
if ( item . isContractCreation )
loadFunctions ( contractComboBox . currentValue ( ) ) ;
else
loadFunctions ( contractFromToken ( recipients . currentValue ( ) ) )
selectFunction ( functionId ) ;
trType . checked = item . isContractCreation
trType . init ( ) ;
paramsModel = [ ] ;
if ( item . isContractCreation )
loadCtorParameters ( ) ;
else
loadParameters ( ) ;
estimatedGas . updateView ( )
visible = true ;
visible = true ;
valueField . focus = true ;
}
}
function loadCtorParameters ( contractId )
function loadCtorParameters ( contractId )
@ -111,12 +79,12 @@ Dialog {
function loadFunctions ( contractId )
function loadFunctions ( contractId )
{
{
functionsModel . clear ( ) ;
functionsModel . clear ( ) ;
functionsModel . append ( { text: " - " } ) ;
var contract = codeModel . contracts [ contractId ] ;
var contract = codeModel . contracts [ contractId ] ;
if ( contract ) {
if ( contract ) {
var functions = codeModel . contracts [ contractId ] . contract . functions ;
var functions = codeModel . contracts [ contractId ] . contract . functions ;
for ( var f = 0 ; f < functions . length ; f ++ ) {
for ( var f = 0 ; f < functions . length ; f ++ ) {
functionsModel . append ( { text: functions [ f ] . name } ) ;
if ( functions [ f ] . name !== contractId )
functionsModel . append ( { text: functions [ f ] . name } ) ;
}
}
}
}
}
}
@ -156,9 +124,9 @@ Dialog {
function loadParameters ( ) {
function loadParameters ( ) {
paramsModel = [ ]
paramsModel = [ ]
if ( functionComboBox . currentIndex >= 0 && functionComboBox . currentIndex < functionsModel . count ) {
if ( functionComboBox . currentIndex >= 0 && functionComboBox . currentIndex < functionsModel . count ) {
var contract = codeModel . contracts [ contractFromToken ( recipients . currentValue ( ) ) ] ;
var contract = codeModel . contracts [ contractFromToken ( contractCreationComboBox . currentValue ( ) ) ] ;
if ( contract ) {
if ( contract ) {
var func = contract . contract . functions [ functionComboBox . currentIndex - 1 ] ;
var func = contract . contract . functions [ functionComboBox . currentIndex + 1 ] ;
if ( func ) {
if ( func ) {
var parameters = func . parameters ;
var parameters = func . parameters ;
for ( var p = 0 ; p < parameters . length ; p ++ )
for ( var p = 0 ; p < parameters . length ; p ++ )
@ -171,13 +139,11 @@ Dialog {
function initTypeLoader ( )
function initTypeLoader ( )
{
{
typeLoader . value = { }
paramScroll . value = { }
typeLoader . members = [ ]
paramScroll . members = [ ]
typeLoader . value = paramValues ;
paramScroll . value = paramValues ;
typeLoader . members = paramsModel ;
paramScroll . members = paramsModel ;
paramLabel . visible = paramsModel . length > 0 ;
paramScroll . updateView ( )
paramScroll . visible = paramsModel . length > 0 ;
modalTransactionDialog . height = ( paramsModel . length > 0 ? 500 : 300 ) ;
}
}
function acceptAndClose ( )
function acceptAndClose ( )
@ -213,16 +179,16 @@ Dialog {
item . functionId = transactionDialog . functionId ;
item . functionId = transactionDialog . functionId ;
}
}
item . isContractCreation = trType . checked ;
item . isContractCreation = trTypeCreate . checked ;
if ( item . isContractCreation )
if ( item . isContractCreation )
item . functionId = item . contractId ;
item . functionId = item . contractId ;
item . isFunctionCall = item . functionId !== " - " ;
item . isFunctionCall = trTypeExecute . checked
if ( ! item . isContractCreation )
if ( ! item . isContractCreation )
{
{
item . contractId = recipients . currentText ;
item . contractId = recipientsAccount . currentValue ( ) ;
item . label = item . contractId + " " + item . functionId ;
item . label = contractFromToken ( item . contractId ) + ". " + item . functionId + "()" ;
if ( recipients . current ( ) . type === "address" )
if ( recipientsAccount . current ( ) . type === "address" )
{
{
item . functionId = "" ;
item . functionId = "" ;
item . isFunctionCall = false ;
item . isFunctionCall = false ;
@ -230,8 +196,9 @@ Dialog {
}
}
else
else
{
{
item . isFunctionCall = true
item . functionId = item . contractId ;
item . functionId = item . contractId ;
item . label = qsTr ( "Deploy" ) + " " + item . contractId ;
item . label = item . contractId + ". " + item . contractId + "()" ;
}
}
item . saveStatus = saveStatus
item . saveStatus = saveStatus
item . sender = senderComboBox . model [ senderComboBox . currentIndex ] . secret ;
item . sender = senderComboBox . model [ senderComboBox . currentIndex ] . secret ;
@ -246,187 +213,360 @@ Dialog {
return token ;
return token ;
}
}
function load ( isContractCreation , isFunctionCall , functionId , contractId )
{
if ( ! isContractCreation )
{
contractCreationComboBox . visible = false
recipientsAccount . visible = true
recipientsAccount . accounts = senderComboBox . model ;
amountLabel . text = qsTr ( "Amount" )
if ( ! isFunctionCall )
recipientsAccount . subType = "address"
else
recipientsAccount . subType = "contract" ;
recipientsAccount . load ( ) ;
recipientsAccount . init ( ) ;
if ( contractId )
recipientsAccount . select ( contractId ) ;
if ( functionId )
selectFunction ( functionId ) ;
if ( isFunctionCall )
{
labelRecipient . text = qsTr ( "Recipient Contract" )
functionRect . show ( )
loadFunctions ( contractFromToken ( recipientsAccount . currentValue ( ) ) )
loadParameters ( ) ;
paramScroll . updateView ( )
}
else
{
paramsModel = [ ]
paramScroll . updateView ( )
labelRecipient . text = qsTr ( "Recipient Account" )
functionRect . hide ( )
}
}
else
{
/ / c o n t r a c t c r e a t i o n
contractsModel . clear ( ) ;
var contractIndex = - 1 ;
var contracts = codeModel . contracts ;
for ( var c in contracts ) {
contractsModel . append ( { cid: c , text: contracts [ c ] . contract . name } ) ;
if ( contracts [ c ] . contract . name === contractId )
contractIndex = contractsModel . count - 1 ;
}
if ( contractIndex == - 1 && contractsModel . count > 0 )
contractIndex = 0 ; / / @ t o d o s u g g e s t u n u s e d c o n t r a c t
contractCreationComboBox . currentIndex = contractIndex ;
contractCreationComboBox . visible = true
labelRecipient . text = qsTr ( "Contract" )
amountLabel . text = qsTr ( "Endownment" )
functionRect . hide ( )
recipientsAccount . visible = false
loadCtorParameters ( contractCreationComboBox . currentValue ( ) ) ;
paramScroll . updateView ( )
}
}
contentItem: Rectangle {
contentItem: Rectangle {
id: containerRect
color: transactionDialogStyle . generic . backgroundColor
color: transactionDialogStyle . generic . backgroundColor
ColumnLayout {
anchors.fill: parent
ScrollView
{
anchors.top: parent . top
anchors.fill: parent
anchors.fill: parent
ColumnLayout {
ColumnLayout {
anchors.fill: parent
Layout.preferredWidth: rowWidth
anchors.margins: 10
anchors.top: parent . top
anchors.topMargin: 10
ColumnLayout {
anchors.left: parent . left
id: dialogContent
width: 500
anchors.top: parent . top
anchors.leftMargin:
spacing: 10
{
RowLayout
return ( containerRect . width - 530 ) / 2
}
RowLayout
{
Rectangle
{
{
id: rowSender
Layout.preferredWidth: 150
Layout.fillWidth: true
Label {
height: 150
anchors.right: parent . right
DefaultLabel {
anchors.verticalCenter: parent . verticalCenter
Layout.preferredWidth: 75
text: qsTr ( "Sender Account" )
text: qsTr ( "Sender" )
}
}
ComboBox {
}
function select ( secret )
ComboBox {
{
function select ( secret )
for ( var i in model )
{
if ( model [ i ] . secret === secret )
for ( var i in model )
{
if ( model [ i ] . secret === secret )
currentIndex = i ;
{
break ;
currentIndex = i ;
}
break ;
}
}
}
Layout.preferredWidth: 350
id: senderComboBox
currentIndex: 0
textRole: "name"
editable: false
}
}
id: senderComboBox
RowLayout
Layout.preferredWidth: 350
{
currentIndex: 0
Rectangle
textRole: "name"
{
editable: false
Layout.preferredWidth: 150
Layout.preferredHeight: 80
color: "transparent"
Label
{
anchors.verticalCenter: parent . verticalCenter
anchors.top: parent . top
anchors.right: parent . right
text: qsTr ( "Type of Transaction" )
}
}
}
}
RowLayout
Column
{
{
id: rowIsContract
Layout.preferredWidth: 350
Layout.fillWidth: true
Layout.preferredHeight: 90
height: 150
ExclusiveGroup {
CheckBox {
id: rbbuttonList
id: trType
onCurrentChanged: {
onCheckedChanged:
if ( current )
{
{
init ( ) ;
if ( current . objectName === "trTypeSend" )
{
recipientsAccount . visible = true
contractCreationComboBox . visible = false
modalTransactionDialog . load ( false , false )
}
else if ( current . objectName === "trTypeCreate" )
{
contractCreationComboBox . visible = true
recipientsAccount . visible = false
modalTransactionDialog . load ( true , true )
}
else if ( current . objectName === "trTypeExecute" )
{
recipientsAccount . visible = true
contractCreationComboBox . visible = false
modalTransactionDialog . load ( false , true )
}
}
}
}
}
function init ( )
RadioButton {
{
id: trTypeSend
rowFunction . visible = ! checked ;
objectName: "trTypeSend"
rowContract . visible = checked ;
exclusiveGroup: rbbuttonList
rowRecipient . visible = ! checked ;
height: 30
paramLabel . visible = checked ;
text: qsTr ( "Send ether to account" )
paramScroll . visible = checked ;
functionComboBox . enabled = ! checked ;
if ( checked )
loadCtorParameters ( contractComboBox . currentValue ( ) ) ;
}
text: qsTr ( "is contract creation" )
}
checked: true
RadioButton {
id: trTypeCreate
objectName: "trTypeCreate"
exclusiveGroup: rbbuttonList
height: 30
text: qsTr ( "Create Contract" )
}
RadioButton {
id: trTypeExecute
objectName: "trTypeExecute"
exclusiveGroup: rbbuttonList
height: 30
text: qsTr ( "Execute Contract" )
}
}
}
}
}
RowLayout
RowLayout
{
Rectangle
{
{
id: rowRecipient
Layout.preferredWidth: 150
Layout.fillWidth: true
Label {
height: 150
id: labelRecipient
DefaultLabel {
anchors.verticalCenter: parent . verticalCenter
Layout.preferredWidth: 75
anchors.right: parent . right
text: qsTr ( "Recipient" )
text: qsTr ( "Recipient Account " )
}
}
}
QAddressView
QAddressView
{
id: recipientsAccount
displayInput: false
onIndexChanged:
{
{
id: recipients
if ( rbbuttonList . current . objectName === "trTypeExecute" )
onIndexChanged:
loadFunctions ( contractFromToken ( currentValue ( ) ) )
{
rowFunction . visible = current ( ) . type === "contract" ;
paramLabel . visible = current ( ) . type === "contract" ;
paramScroll . visible = current ( ) . type === "contract" ;
if ( ! rowIsContract . checked )
loadFunctions ( contractFromToken ( recipients . currentValue ( ) ) )
}
}
}
}
}
RowLayout
ComboBox {
{
id: contractCreationComboBox
id: rowContract
function currentValue ( ) {
Layout.fillWidth: true
return ( currentIndex >= 0 && currentIndex < contractsModel . count ) ? contractsModel . get ( currentIndex ) . cid : "" ;
height: 150
DefaultLabel {
Layout.preferredWidth: 75
text: qsTr ( "Contract" )
}
}
ComboBox {
Layout.preferredWidth: 350
id: contractComboBox
currentIndex: - 1
function currentValue ( ) {
textRole: "text"
return ( currentIndex >= 0 && currentIndex < contractsModel . count ) ? contractsModel . get ( currentIndex ) . cid : "" ;
editable: false
}
model: ListModel {
Layout.preferredWidth: 350
id: contractsModel
currentIndex: - 1
}
textRole: "text"
onCurrentIndexChanged: {
editable: false
loadCtorParameters ( currentValue ( ) ) ;
model: ListModel {
id: contractsModel
}
onCurrentIndexChanged: {
loadCtorParameters ( currentValue ( ) ) ;
}
}
}
}
}
}
RowLayout
RowLayout
{
Rectangle
{
{
id: rowFunction
Layout.preferredWidth: 150
Layout.fillWidth: true
id: functionRect
height: 150
DefaultLabel {
function hide ( )
Layout.preferredWidth: 75
{
parent . visible = false
functionRect . visible = false
functionComboBox . visible = false
}
function show ( )
{
parent . visible = true
functionRect . visible = true
functionComboBox . visible = true
}
Label {
anchors.verticalCenter: parent . verticalCenter
anchors.right: parent . right
text: qsTr ( "Function" )
text: qsTr ( "Function" )
}
}
ComboBox {
}
id: functionComboBox
Layout.preferredWidth: 350
ComboBox {
currentIndex: - 1
id: functionComboBox
textRole: "text"
Layout.preferredWidth: 350
editable: false
currentIndex: - 1
model: ListModel {
textRole: "text"
id: functionsModel
editable: false
}
model: ListModel {
onCurrentIndexChanged: {
id: functionsModel
loadParameters ( ) ;
}
}
onCurrentIndexChanged: {
loadParameters ( ) ;
}
}
}
}
}
CommonSeparator
StructView
{
id: paramScroll
members: paramsModel ;
accounts: senderComboBox . model
context: "parameter"
Layout.fillWidth: true
function updateView ( )
{
{
Layout.fillWidth: true
paramScroll . visible = paramsModel . length > 0
paramScroll . Layout . preferredHeight = paramsModel . length < 6 ? paramsModel . length * 30 : 205
if ( paramsModel . length === 0 )
{
paramScroll . height = 0
}
}
}
}
RowLayout
RowLayout
{
Rectangle
{
{
id: rowValue
Layout.preferredWidth: 150
Layout.fillWidth: true
Label {
height: 150
id: amountLabel
DefaultLabel {
anchors.verticalCenter: parent . verticalCenter
Layout.preferredWidth: 75
anchors.right: parent . right
text: qsTr ( "Value" )
text: qsTr ( "Amount" )
}
Ether {
id: valueField
edit: true
displayFormattedValue: true
}
}
}
}
CommonSeparator
Ether {
Layout.preferredWidth: 350
id: valueField
edit: true
displayFormattedValue: false
displayUnitSelection: true
}
}
Rectangle
{
Layout.preferredHeight: 30
Layout.fillWidth: true
color: "transparent"
Rectangle
{
color: "#cccccc"
height: 1
width: parent . width
anchors.verticalCenter: parent . verticalCenter
}
}
Rectangle
{
height: 20
color: "transparent"
Layout.preferredWidth: 500
Rectangle
{
{
Layout.fillWidth: true
anchors.horizontalCenter: parent . horizontalCenter
Label {
text: qsTr ( "Transaction fees" )
anchors.horizontalCenter: parent . horizontalCenter
}
}
}
RowLayout
}
RowLayout
{
Layout.preferredHeight: 45
Rectangle
{
{
id: rowGas
Layout.preferredWidth: 150
Layout.fillWidth: true
Label {
height: 150
anchors.verticalCenter: parent . verticalCenter
DefaultLabel {
anchors.right: parent . right
Layout.preferredWidth: 75
text: qsTr ( "Gas" )
text: qsTr ( "Gas" )
}
}
}
Row
{
Layout.preferredWidth: 350
DefaultTextField
DefaultTextField
{
{
property variant gasValue
property variant gasValue
@ -435,6 +575,55 @@ Dialog {
implicitWidth: 200
implicitWidth: 200
enabled: ! gasAutoCheck . checked
enabled: ! gasAutoCheck . checked
id: gasValueEdit ;
id: gasValueEdit ;
Label
{
id: estimatedGas
anchors.top: parent . bottom
text: ""
Connections
{
target: functionComboBox
onCurrentIndexChanged:
{
estimatedGas . displayGas ( contractFromToken ( recipientsAccount . currentValue ( ) ) , functionComboBox . currentText )
}
}
function displayGas ( contractName , functionName )
{
var gasCost = codeModel . gasCostBy ( contractName , functionName ) ;
if ( gasCost && gasCost . length > 0 )
{
var gas = codeModel . txGas + codeModel . callStipend + parseInt ( gasCost [ 0 ] . gas )
estimatedGas . text = qsTr ( "Estimated cost: " ) + gasCost [ 0 ] . gas + " gas"
}
}
function updateView ( )
{
if ( rbbuttonList . current . objectName === "trTypeExecute" )
estimatedGas . displayGas ( contractFromToken ( recipientsAccount . currentValue ( ) ) , functionComboBox . currentText )
else if ( rbbuttonList . current . objectName === "trTypeCreate" )
{
var contractName = contractCreationComboBox . currentValue ( )
estimatedGas . displayGas ( contractName , contractName )
}
else if ( rbbuttonList . current . objectName === "trTypeSend" )
{
var gas = codeModel . txGas + codeModel . callStipend
estimatedGas . text = qsTr ( "Estimated cost: " ) + gas + " gas"
}
}
Connections
{
target: rbbuttonList
onCurrentChanged: {
estimatedGas . updateView ( )
}
}
}
}
}
CheckBox
CheckBox
@ -444,101 +633,92 @@ Dialog {
text: qsTr ( "Auto" ) ;
text: qsTr ( "Auto" ) ;
}
}
}
}
}
CommonSeparator
RowLayout
{
{
Layout.fillWidth: true
Layout.preferredWidth: 500
}
Layout.preferredHeight: 45
Rectangle
RowLayout
{
{
id: rowGasPrice
Layout.preferredWidth: 150
Layout.fillWidth: true
Label {
height: 150
id: gasPriceLabel
DefaultLabel {
anchors.verticalCenter: parent . verticalCenter
Layout.preferredWidth: 75
anchors.right: parent . right
text: qsTr ( "Gas Price" )
text: qsTr ( "Gas Price" )
}
Ether {
id: gasPriceField
edit: true
displayFormattedValue: true
}
}
CommonSeparator
{
Layout.fillWidth: true
}
DefaultLabel {
Label {
id: paramLabel
id: gasPriceMarket
text: qsTr ( "Parameters:" )
anchors.top: gasPriceLabel . bottom
Layout.preferredWidth: 75
Component.onCompleted:
}
{
NetworkDeployment . gasPrice ( function ( result )
ScrollView
{
{
gasPriceMarket . text = qsTr ( "Current market: " ) + " " + result + " Wei" ;
id: paramScroll
} , function ( ) { } ) ;
anchors.top: paramLabel . bottom
}
anchors.topMargin: 10
}
Layout.fillWidth: true
Layout.fillHeight: true
StructView
{
id: typeLoader
Layout.preferredWidth: 150
members: paramsModel ;
accounts: senderComboBox . model
context: "parameter"
}
}
}
}
CommonSeparator
Ether {
{
Layout.preferredWidth: 350
Layout.fillWidth: true
id: gasPriceField
visible: paramsModel . length > 0
edit: true
displayFormattedValue: false
displayUnitSelection: true
}
}
}
}
}
RowLayout
{
anchors.bottom: parent . bottom
anchors.right: parent . right ;
Button {
RowLayout
{
text: qsTr ( "OK" ) ;
Layout.preferredWidth: 500
onClicked: {
Row
var invalid = InputValidator . validate ( paramsModel , paramValues ) ;
{
if ( invalid . length === 0 )
width: parent . width
{
anchors.right: parent . right
close ( ) ;
Button {
accepted ( ) ;
id: updateBtn
text: qsTr ( "Cancel" ) ;
onClicked: close ( ) ;
}
}
else
{
Button {
errorDialog . text = qsTr ( "Some parameters are invalid:\n" ) ;
text: qsTr ( "Update" ) ;
for ( var k in invalid )
onClicked: {
errorDialog . text += invalid [ k ] . message + "\n" ;
var invalid = InputValidator . validate ( paramsModel , paramValues ) ;
errorDialog . open ( ) ;
if ( invalid . length === 0 )
{
close ( ) ;
accepted ( ) ;
}
else
{
errorDialog . text = qsTr ( "Some parameters are invalid:\n" ) ;
for ( var k in invalid )
errorDialog . text += invalid [ k ] . message + "\n" ;
errorDialog . open ( ) ;
}
}
}
}
}
}
}
Button {
MessageDialog {
text: qsTr ( "Cancel" ) ;
id: errorDialog
onClicked: close ( ) ;
standardButtons: StandardButton . Ok
icon: StandardIcon . Critical
}
}
}
MessageDialog {
RowLayout
id: errorDialog
{
standardButtons: StandardButton . Ok
Layout.preferredHeight: 30
icon: StandardIcon . Critical
anchors.bottom: parent . bottom
}
}
}
}
}
}
}
}
}
}