@ -2,7 +2,9 @@ import QtQuick 2.6
import QtQuick . Layouts 1.0
import QtQuick . Controls 2.1
Dialog {
import "../controls"
ElDialog {
id: wizard
modal: true
focus: true
@ -10,10 +12,22 @@ Dialog {
width: parent . width
height: parent . height
title: wizardTitle + ( pages . currentItem . title ? ' - ' + pages.currentItem.title : '' )
iconSource: '../../../icons/electrum.png'
property string wizardTitle
property var wizard_data
property alias pages: pages
property QtObject wiz
function doClose ( ) {
if ( pages . currentIndex == 0 )
reject ( )
else
pages . prev ( )
}
function _setWizardData ( wdata ) {
wizard_data = { }
Object . assign ( wizard_data , wdata ) / / d e e p c o p y
@ -32,7 +46,6 @@ Dialog {
}
var url = Qt . resolvedUrl ( wiz . viewToComponent ( view ) )
console . log ( url )
var comp = Qt . createComponent ( url )
if ( comp . status == Component . Error ) {
console . log ( comp . errorString ( ) )
@ -156,39 +169,6 @@ Dialog {
}
}
header: GridLayout {
columns: 2
rowSpacing: 0
Image {
source: "../../../icons/electrum.png"
Layout.preferredWidth: constants . iconSizeXLarge
Layout.preferredHeight: constants . iconSizeXLarge
Layout.leftMargin: constants . paddingMedium
Layout.topMargin: constants . paddingMedium
Layout.bottomMargin: constants . paddingMedium
}
Label {
text: title + ( pages . currentItem . title ? ' - ' + pages.currentItem.title : '' )
elide: Label . ElideRight
Layout.fillWidth: true
topPadding: constants . paddingXLarge
bottomPadding: constants . paddingXLarge
font.bold: true
font.pixelSize: constants . fontSizeMedium
}
Rectangle {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.leftMargin: constants . paddingTiny
Layout.rightMargin: constants . paddingTiny
height: 1
color: Qt . rgba ( 0 , 0 , 0 , 0.5 )
}
}
/ / m a k e c l i c k i n g t h e d i a l o g b a c k g r o u n d m o v e t h e s c o p e a w a y f r o m t e x t e d i t f i e l d s
/ / s o t h e k e y b o a r d g o e s a w a y
/ / T O D O : h e r e i t w o r k s o n d e s k t o p , b u t n o t a n d r o i d . h m m .