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, " ");
}
QStringList DebuggingStateWrapper::fillList(QStringList _list, QString _emptyValue)
QStringList DebuggingStateWrapper::fillList(QStringList& _list, QString const& _emptyValue)
{
if (_list.size() < 20)
{

2
mix/DebuggingStateWrapper.h

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

3
mix/qml/ItemDelegateDataDump.qml

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

17
mix/qml/MainContent.qml

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

4
mix/qml/StatusPane.qml

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

16
mix/qml/StepActionImage.qml

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

Loading…
Cancel
Save