Browse Source

fix indentation issues

cl-refactor
yann300 10 years ago
parent
commit
ae5d53bc78
  1. 5
      mix/qml/Ether.qml
  2. 30
      mix/qml/StateDialog.qml
  3. 66
      mix/qml/TransactionDialog.qml

5
mix/qml/Ether.qml

@ -65,6 +65,7 @@ RowLayout {
formattedValue.text = value.format();
}
}
model: ListModel {
id: unitsModel
ListElement { text: "Uether"; }
@ -87,11 +88,11 @@ RowLayout {
ListElement { text: "Kwei"; }
ListElement { text: "wei"; }
}
style: ComboBoxStyle
{
style: ComboBoxStyle {
font: regularFont.name
}
}
Text
{
visible: displayFormattedValue

30
mix/qml/StateDialog.qml

@ -44,8 +44,6 @@ Window {
isDefault = setDefault;
titleField.focus = true;
defaultCheckBox.enabled = !isDefault;
}
function close() {
@ -67,8 +65,7 @@ Window {
id: regularFont
}
Rectangle
{
Rectangle {
anchors.fill: parent
anchors.margins: 10
color: StateDialogStyle.generic.backgroundColor
@ -114,8 +111,7 @@ Window {
}
}
ColumnLayout
{
ColumnLayout {
anchors.top: dialogContent.bottom
anchors.topMargin: 5
spacing: 5
@ -132,8 +128,7 @@ Window {
onClicked: transactionsModel.addTransaction()
height: 5
width: 5
style: ButtonStyle
{
style: ButtonStyle {
label: Text {
font.family: regularFont.name
text: qsTr("+")
@ -165,7 +160,9 @@ Window {
}
}
RowLayout {
RowLayout
{
anchors.bottom: parent.bottom
anchors.right: parent.right;
@ -183,9 +180,6 @@ Window {
}
}
ListModel {
id: transactionsModel
@ -229,8 +223,7 @@ Window {
visible: !stdContract
Layout.fillHeight: true
onClicked: transactionsModel.editTransaction(index)
style: ButtonStyle
{
style: ButtonStyle {
label: Text {
font.family: regularFont.name
text: qsTr("Edit")
@ -247,8 +240,7 @@ Window {
text: qsTr("Delete");
Layout.fillHeight: true
onClicked: transactionsModel.deleteTransaction(index)
style: ButtonStyle
{
style: ButtonStyle {
label: Text {
font.family: regularFont.name
text: qsTr("Delete")
@ -264,9 +256,11 @@ Window {
}
}
TransactionDialog {
TransactionDialog
{
id: transactionDialog
onAccepted: {
onAccepted:
{
var item = transactionDialog.getItem();
if (transactionDialog.transactionIndex < transactionsModel.count) {

66
mix/qml/TransactionDialog.qml

@ -209,8 +209,7 @@ Window {
onCurrentIndexChanged: {
loadParameters();
}
style: ComboBoxStyle
{
style: ComboBoxStyle {
font: regularFont.name
}
}
@ -432,69 +431,8 @@ Window {
}
}
}
ListModel {
id: paramsModel
}
Component {
id: rowDelegate
Item {
height: 100
}
}
Component {
id: editableDelegate
Item {
Loader {
id: loaderEditor
anchors.fill: parent
anchors.margins: 4
Connections {
target: loaderEditor.item
onTextChanged: {
if (styleData.role === "value" && styleData.row < paramsModel.count)
loaderEditor.updateValue(styleData.row, styleData.role, loaderEditor.item.text);
}
}
function updateValue(row, role, value)
{
paramsModel.setProperty(styleData.row, styleData.role, value);
}
sourceComponent:
{
if (styleData.role === "value")
{
if (paramsModel.get(styleData.row) === undefined)
return null;
if (paramsModel.get(styleData.row).type.indexOf("int") !== -1)
return intViewComp;
else if (paramsModel.get(styleData.row).type.indexOf("bool") !== -1)
return boolViewComp;
else if (paramsModel.get(styleData.row).type.indexOf("string") !== -1)
return stringViewComp;
else if (paramsModel.get(styleData.row).type.indexOf("hash") !== -1)
return hashViewComp;
}
else
return editor;
}
Component {
id: editor
TextInput {
id: textinput
readOnly: true
color: styleData.textColor
text: styleData.value
font.family: regularFont.name
}
}
}
}
}
}

Loading…
Cancel
Save