Browse Source

- small UI changes.

- change on DebuggingStateWrapper::fillList
cl-refactor
yann300 10 years ago
committed by yann300
parent
commit
fc09c2692b
  1. 2
      mix/DebuggingStateWrapper.cpp
  2. 2
      mix/DebuggingStateWrapper.h
  3. 114
      mix/qml/Debugger.qml
  4. 3
      mix/qml/ItemDelegateDataDump.qml
  5. 17
      mix/qml/MainContent.qml
  6. 4
      mix/qml/StatusPane.qml
  7. 16
      mix/qml/StepActionImage.qml

2
mix/DebuggingStateWrapper.cpp

@ -121,7 +121,7 @@ QStringList DebuggingStateWrapper::debugCallData()
return fillList(re, " "); return fillList(re, " ");
} }
QStringList DebuggingStateWrapper::fillList(QStringList _list, QString _emptyValue) QStringList DebuggingStateWrapper::fillList(QStringList& _list, QString const& _emptyValue)
{ {
if (_list.size() < 20) if (_list.size() < 20)
{ {

2
mix/DebuggingStateWrapper.h

@ -134,7 +134,7 @@ private:
MachineState m_state; MachineState m_state;
bytes m_code; bytes m_code;
bytes m_data; bytes m_data;
QStringList fillList(QStringList _list, QString _emptyValue); QStringList fillList(QStringList& _list, QString const& _emptyValue);
}; };
} }

114
mix/qml/Debugger.qml

@ -101,6 +101,8 @@ Rectangle {
Flickable { Flickable {
property int firstColumnWidth: 170
property int secondColumnWidth: 250
id: debugScrollArea id: debugScrollArea
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
anchors.fill: parent anchors.fill: parent
@ -121,74 +123,76 @@ Rectangle {
rowSpacing: 15 rowSpacing: 15
RowLayout { RowLayout {
// step button + slider // step button + slider
spacing: 10 spacing: machineStates.sideMargin
height: 27 height: 27
width: debugPanel.width width: debugPanel.width
RowLayout { Rectangle
id: jumpButtons {
spacing: 15
width: 250
height: parent.height height: parent.height
color: "transparent"
width: debugScrollArea.firstColumnWidth
RowLayout {
anchors.horizontalCenter: parent.horizontalCenter
id: jumpButtons
spacing: 3
StepActionImage
{
id: jumpoutbackaction;
enabledStateImg: "qrc:/qml/img/jumpoutback.png"
disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png"
onClicked: Debugger.stepOutBack()
}
StepActionImage StepActionImage
{ {
id: jumpoutbackaction; id: jumpintobackaction
enabledStateImg: "qrc:/qml/img/jumpoutback.png" enabledStateImg: "qrc:/qml/img/jumpintoback.png"
disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png" disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png"
onClicked: Debugger.stepOutBack() onClicked: Debugger.stepIntoBack()
} }
StepActionImage
{
id: jumpintobackaction
enabledStateImg: "qrc:/qml/img/jumpintoback.png"
disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png"
onClicked: Debugger.stepIntoBack()
}
StepActionImage StepActionImage
{ {
id: jumpoverbackaction id: jumpoverbackaction
enabledStateImg: "qrc:/qml/img/jumpoverback.png" enabledStateImg: "qrc:/qml/img/jumpoverback.png"
disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png" disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png"
onClicked: Debugger.stepOverBack() onClicked: Debugger.stepOverBack()
} }
StepActionImage StepActionImage
{ {
id: jumpoverforwardaction id: jumpoverforwardaction
enabledStateImg: "qrc:/qml/img/jumpoverforward.png" enabledStateImg: "qrc:/qml/img/jumpoverforward.png"
disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png" disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png"
onClicked: Debugger.stepOverForward() onClicked: Debugger.stepOverForward()
} }
StepActionImage StepActionImage
{ {
id: jumpintoforwardaction id: jumpintoforwardaction
enabledStateImg: "qrc:/qml/img/jumpintoforward.png" enabledStateImg: "qrc:/qml/img/jumpintoforward.png"
disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png" disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png"
onClicked: Debugger.stepIntoForward() onClicked: Debugger.stepIntoForward()
} }
StepActionImage StepActionImage
{ {
id: jumpoutforwardaction id: jumpoutforwardaction
enabledStateImg: "qrc:/qml/img/jumpoutforward.png" enabledStateImg: "qrc:/qml/img/jumpoutforward.png"
disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png" disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png"
onClicked: Debugger.stepOutForward() onClicked: Debugger.stepOutForward()
}
} }
} }
Rectangle { Rectangle {
color: "transparent" color: "transparent"
width: 250 width: debugScrollArea.secondColumnWidth
height: parent.height height: parent.height
Slider { Slider {
id: statesSlider id: statesSlider
anchors.fill: parent anchors.fill: parent
tickmarksEnabled: true tickmarksEnabled: true
stepSize: 1.0 stepSize: 1.0
height: parent.height
onValueChanged: Debugger.jumpTo(value); onValueChanged: Debugger.jumpTo(value);
style: SliderStyle { style: SliderStyle {
groove: Rectangle { groove: Rectangle {
@ -214,11 +218,11 @@ Rectangle {
// Assembly code // Assembly code
width: debugPanel.width width: debugPanel.width
height: 405 height: 405
spacing: 10 spacing: machineStates.sideMargin
Rectangle Rectangle
{ {
width: 170 width: debugScrollArea.firstColumnWidth
height: parent.height height: parent.height
border.width: 3 border.width: 3
border.color: "#deddd9" border.color: "#deddd9"
@ -243,7 +247,7 @@ Rectangle {
radius: 4 radius: 4
height: statesList.currentItem.height height: statesList.currentItem.height
width: statesList.currentItem.width; width: statesList.currentItem.width;
color: "#4b8fe2" color: "#4A90E2"
Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } } Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } }
} }
} }
@ -277,7 +281,7 @@ Rectangle {
} }
ColumnLayout { ColumnLayout {
width: 250 width: debugScrollArea.secondColumnWidth
height: parent.height height: parent.height
Rectangle { Rectangle {
// Info // Info
@ -458,8 +462,6 @@ Rectangle {
radius: 3 radius: 3
} }
DebugInfoList { DebugInfoList {
id: memoryDump id: memoryDump
width: debugPanel.width - 2 * machineStates.sideMargin width: debugPanel.width - 2 * machineStates.sideMargin

3
mix/qml/ItemDelegateDataDump.qml

@ -34,8 +34,8 @@ Rectangle {
text: row.formatData(modelData, 0) text: row.formatData(modelData, 0)
font.pointSize: 9; font.pointSize: 9;
} }
} }
Rectangle Rectangle
{ {
anchors.left: firstCol.right anchors.left: firstCol.right
@ -46,6 +46,7 @@ Rectangle {
Layout.minimumHeight: parent.height Layout.minimumHeight: parent.height
Text { Text {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 7
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: "#8b8b8b" color: "#8b8b8b"
text: row.formatData(modelData, 1) text: row.formatData(modelData, 1)

17
mix/qml/MainContent.qml

@ -86,16 +86,15 @@ Rectangle {
Layout.preferredHeight: root.height - headerView.height; Layout.preferredHeight: root.height - headerView.height;
ProjectList { ProjectList {
width: parent.width * 0.2 id: projectList
width: 200
height: parent.height height: parent.height
Layout.minimumWidth: 200 Layout.minimumWidth: 200
} }
Rectangle { Rectangle {
anchors.top: parent.top
id: contentView id: contentView
width: parent.width width: parent.width - projectList.width
height: parent.height height: parent.height
CodeEditorView { CodeEditorView {
height: parent.height height: parent.height
@ -113,21 +112,19 @@ Rectangle {
hide(); hide();
} }
property real panelRelWidth: 0.38
function show() { function show() {
visible = true; visible = true;
contentView.width = parent.width * (1 - 0.38) contentView.width = parent.width - projectList.width - rightView.width;
} }
function hide() { function hide() {
visible = false; visible = false;
contentView.width = parent.width; contentView.width = parent.width - projectList.width;
} }
height: parent.height; height: parent.height;
width: Layout.minimumWidth width: 450
Layout.minimumWidth: parent.width * 0.38 Layout.minimumWidth: 450
Rectangle { Rectangle {
anchors.fill: parent; anchors.fill: parent;
id: rightPaneView id: rightPaneView

4
mix/qml/StatusPane.qml

@ -90,8 +90,6 @@ Rectangle {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
mainContent.ensureRightView(); mainContent.ensureRightView();
//clientModel.showDebugger();
//debugModel.updateDebugPanel();
} }
} }
} }
@ -114,7 +112,7 @@ Rectangle {
Button Button
{ {
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 15 anchors.rightMargin: 7
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
id: debugImg id: debugImg
iconSource: "qrc:/qml/img/bugiconinactive.png" iconSource: "qrc:/qml/img/bugiconinactive.png"

16
mix/qml/StepActionImage.qml

@ -19,8 +19,8 @@ Rectangle {
debugImg.iconSource = disableStateImg; debugImg.iconSource = disableStateImg;
} }
width: 15 width: debugImg.width + 4
height: 15 height: debugImg.height
color: "transparent" color: "transparent"
Button Button
{ {
@ -28,16 +28,8 @@ Rectangle {
id: debugImg id: debugImg
iconSource: enabledStateImg iconSource: enabledStateImg
action: buttonAction action: buttonAction
style: ButtonStyle { width: 17
background: Component { height: 27
Rectangle {
color: "transparent"
border.width: 0
width: 15
height: 15
}
}
}
} }
Action { Action {
id: buttonAction id: buttonAction

Loading…
Cancel
Save