Browse Source

- Use QT5.4 dialog instead of Window control

cl-refactor
yann300 10 years ago
parent
commit
8eeaa24d56
  1. 15
      mix/qml/DeploymentDialog.qml
  2. 10
      mix/qml/NewProjectDialog.qml
  3. 15
      mix/qml/StateDialog.qml
  4. 7
      mix/qml/StateList.qml
  5. 13
      mix/qml/TransactionDialog.qml
  6. 2
      mix/qml/main.qml

15
mix/qml/DeploymentDialog.qml

@ -2,7 +2,7 @@ import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.0
import QtQuick.Dialogs 1.1
import QtQuick.Dialogs 1.2
import QtQuick.Controls.Styles 1.3
import org.ethereum.qml.QEther 1.0
import "js/TransactionHelper.js" as TransactionHelper
@ -11,16 +11,11 @@ import "js/QEtherHelper.js" as QEtherHelper
import "."
Window {
Dialog {
id: modalDeploymentDialog
modality: Qt.ApplicationModal
width: 735
height: 320
maximumWidth: width
minimumWidth: width
maximumHeight: height
minimumHeight: height
visible: false
property alias applicationUrlEth: applicationUrlEth.text
property alias applicationUrlHttp: applicationUrlHttp.text
@ -31,8 +26,6 @@ Window {
property string currentAccount
property alias gasToUse: gasToUseInput.text
color: Style.generic.layout.backgroundColor
function close()
{
visible = false;
@ -159,6 +152,9 @@ Window {
id: lightFont
}
contentItem: Rectangle {
color: Style.generic.layout.backgroundColor
anchors.fill: parent
Column
{
spacing: 5
@ -486,6 +482,7 @@ Window {
}
}
}
}
MessageDialog {
id: deployDialog

10
mix/qml/NewProjectDialog.qml

@ -1,10 +1,11 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.0
import QtQuick.Dialogs 1.1
Window {
Dialog {
id: newProjectWin
modality: Qt.ApplicationModal
@ -32,8 +33,10 @@ Window {
close();
accepted();
}
GridLayout {
contentItem: Rectangle {
anchors.fill: parent
GridLayout
{
id: dialogContent
columns: 2
anchors.fill: parent
@ -91,6 +94,7 @@ Window {
}
}
}
}
FileDialog {
id: createProjectFileDialog

15
mix/qml/StateDialog.qml

@ -1,6 +1,6 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Dialogs 1.1
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Window 2.0
import QtQuick.Controls.Styles 1.3
@ -9,7 +9,7 @@ import "js/QEtherHelper.js" as QEtherHelper
import "js/TransactionHelper.js" as TransactionHelper
import "."
Window {
Dialog {
id: modalStateDialog
modality: Qt.ApplicationModal
@ -17,7 +17,6 @@ Window {
height: 480
title: qsTr("Edit State")
visible: false
color: StateDialogStyle.generic.backgroundColor
property alias stateTitle: titleField.text
property alias isDefault: defaultCheckBox.checked
@ -46,9 +45,6 @@ Window {
stateAccounts.push(item.accounts[k]);
}
modalStateDialog.setX((Screen.width - width) / 2);
modalStateDialog.setY((Screen.height - height) / 2);
visible = true;
isDefault = setDefault;
titleField.focus = true;
@ -70,14 +66,16 @@ Window {
item.accounts = stateAccounts;
return item;
}
contentItem:
Rectangle {
color: StateDialogStyle.generic.backgroundColor
anchors.fill: parent
ColumnLayout {
anchors.fill: parent
anchors.margins: 10
ColumnLayout {
id: dialogContent
anchors.top: parent.top
RowLayout
{
Layout.fillWidth: true
@ -302,6 +300,7 @@ Window {
}
}
}
}
ListModel {
id: accountsModel

7
mix/qml/StateList.qml

@ -1,12 +1,12 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
import QtQuick.Dialogs 1.1
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Window 2.0
import "."
Window {
Dialog {
id: stateListContainer
modality: Qt.WindowModal
@ -14,6 +14,8 @@ Window {
height: 480
visible: false
contentItem: Rectangle {
anchors.fill: parent
ColumnLayout
{
anchors.fill: parent
@ -36,6 +38,7 @@ Window {
action: addStateAction
}
}
}
Component {
id: renderDelegate

13
mix/qml/TransactionDialog.qml

@ -1,19 +1,19 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.0
import QtQuick.Controls.Styles 1.3
import org.ethereum.qml.QEther 1.0
import "js/TransactionHelper.js" as TransactionHelper
import "."
Window {
Dialog {
id: modalTransactionDialog
modality: Qt.ApplicationModal
width: 520
height: 500;
height: 500
visible: false
color: StateDialogStyle.generic.backgroundColor
title: qsTr("Edit Transaction")
property int transactionIndex
property alias gas: gasValueEdit.gasValue;
@ -82,8 +82,6 @@ Window {
}
}
initTypeLoader();
modalTransactionDialog.setX((Screen.width - width) / 2);
modalTransactionDialog.setY((Screen.height - height) / 2);
visible = true;
valueField.focus = true;
@ -168,7 +166,9 @@ Window {
item.parameters = paramValues;
return item;
}
contentItem: Rectangle {
color: StateDialogStyle.generic.backgroundColor
anchors.fill: parent
ColumnLayout {
anchors.fill: parent
anchors.margins: 10
@ -375,4 +375,5 @@ Window {
}
}
}
}
}

2
mix/qml/main.qml

@ -163,7 +163,7 @@ ApplicationWindow {
id: editStatesAction
text: qsTr("Edit States")
shortcut: "Ctrl+Alt+E"
onTriggered: stateList.show();
onTriggered: stateList.open();
}
Connections {

Loading…
Cancel
Save