Browse Source

Close button on StatesList

cl-refactor
yann300 10 years ago
parent
commit
519502f70c
  1. 39
      mix/qml/StateList.qml

39
mix/qml/StateList.qml

@ -9,11 +9,11 @@ import "."
Dialog { Dialog {
id: stateListContainer id: stateListContainer
modality: Qt.WindowModal modality: Qt.WindowModal
standardButtons: StandardButton.Close
width: 640 width: 640
height: 480 height: 480
visible: false visible: false
onRejected: {}
contentItem: Rectangle { contentItem: Rectangle {
anchors.fill: parent anchors.fill: parent
ColumnLayout ColumnLayout
@ -26,6 +26,7 @@ Dialog {
model: projectModel.stateListModel model: projectModel.stateListModel
itemDelegate: renderDelegate itemDelegate: renderDelegate
headerDelegate: null headerDelegate: null
frameVisible: false
TableViewColumn { TableViewColumn {
role: "title" role: "title"
title: qsTr("State") title: qsTr("State")
@ -33,9 +34,18 @@ Dialog {
} }
} }
Button { Row{
spacing: 5
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
action: addStateAction anchors.right: parent.right
anchors.rightMargin: 10
Button {
action: addStateAction
}
Button {
action: closeAction
}
} }
} }
} }
@ -72,12 +82,21 @@ Dialog {
} }
} }
Action { Row
id: addStateAction {
text: "&Add State" Action {
shortcut: "Ctrl+T" id: addStateAction
enabled: codeModel.hasContract && !clientModel.running; text: qsTr("Add State")
onTriggered: list.model.addState(); shortcut: "Ctrl+T"
enabled: codeModel.hasContract && !clientModel.running;
onTriggered: list.model.addState();
}
Action {
id: closeAction
text: qsTr("Close")
onTriggered: stateListContainer.close();
}
} }
} }

Loading…
Cancel
Save