|
|
@ -5,35 +5,40 @@ import QtQuick.Dialogs 1.2 |
|
|
|
import QtQuick.Window 2.0 |
|
|
|
import QtQuick.Dialogs 1.1 |
|
|
|
|
|
|
|
Dialog { |
|
|
|
id: newProjectWin |
|
|
|
modality: Qt.ApplicationModal |
|
|
|
|
|
|
|
width: 640 |
|
|
|
height: 120 |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
property alias projectTitle: titleField.text |
|
|
|
readonly property string projectPath: "file://" + pathField.text |
|
|
|
property alias pathFieldText: pathField.text |
|
|
|
Item |
|
|
|
{ |
|
|
|
signal accepted |
|
|
|
|
|
|
|
function open() { |
|
|
|
newProjectWin.setX((Screen.width - width) / 2); |
|
|
|
newProjectWin.setY((Screen.height - height) / 2); |
|
|
|
visible = true; |
|
|
|
newProjectWin.visible = true; |
|
|
|
titleField.focus = true; |
|
|
|
} |
|
|
|
|
|
|
|
function close() { |
|
|
|
visible = false; |
|
|
|
newProjectWin.visible = false; |
|
|
|
} |
|
|
|
|
|
|
|
function acceptAndClose() { |
|
|
|
close(); |
|
|
|
accepted(); |
|
|
|
} |
|
|
|
|
|
|
|
Dialog { |
|
|
|
id: newProjectWin |
|
|
|
modality: Qt.ApplicationModal |
|
|
|
|
|
|
|
width: 640 |
|
|
|
height: 120 |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
property alias projectTitle: titleField.text |
|
|
|
readonly property string projectPath: "file://" + pathField.text |
|
|
|
property alias pathFieldText: pathField.text |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contentItem: Rectangle { |
|
|
|
anchors.fill: parent |
|
|
|
GridLayout |
|
|
@ -96,6 +101,9 @@ Dialog { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Component.onCompleted: pathField.text = fileIo.homePath |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
FileDialog { |
|
|
|
id: createProjectFileDialog |
|
|
@ -111,5 +119,4 @@ Dialog { |
|
|
|
pathField.text = u; |
|
|
|
} |
|
|
|
} |
|
|
|
Component.onCompleted: pathField.text = fileIo.homePath |
|
|
|
} |
|
|
|