Skip to content

Commit

Permalink
Close button on StatesList
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Apr 2, 2015
1 parent fd727a3 commit af8b198
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions qml/StateList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import "."
Dialog {
id: stateListContainer
modality: Qt.WindowModal

standardButtons: StandardButton.Close
width: 640
height: 480

visible: false
onRejected: {}
contentItem: Rectangle {
anchors.fill: parent
ColumnLayout
Expand All @@ -26,16 +26,26 @@ Dialog {
model: projectModel.stateListModel
itemDelegate: renderDelegate
headerDelegate: null
frameVisible: false
TableViewColumn {
role: "title"
title: qsTr("State")
width: list.width
}
}

Button {
Row{
spacing: 5
anchors.bottom: parent.bottom
action: addStateAction
anchors.right: parent.right
anchors.rightMargin: 10
Button {
action: addStateAction
}

Button {
action: closeAction
}
}
}
}
Expand Down Expand Up @@ -72,12 +82,21 @@ Dialog {
}
}

Action {
id: addStateAction
text: "&Add State"
shortcut: "Ctrl+T"
enabled: codeModel.hasContract && !clientModel.running;
onTriggered: list.model.addState();
Row
{
Action {
id: addStateAction
text: qsTr("Add State")
shortcut: "Ctrl+T"
enabled: codeModel.hasContract && !clientModel.running;
onTriggered: list.model.addState();
}

Action {
id: closeAction
text: qsTr("Close")
onTriggered: stateListContainer.close();
}
}
}

0 comments on commit af8b198

Please sign in to comment.