|
|
@ -9,7 +9,7 @@ Rectangle { |
|
|
|
id: statusHeader |
|
|
|
objectName: "statusPane" |
|
|
|
property variant webPreview |
|
|
|
|
|
|
|
property alias currentStatus: logPane.currentStatus |
|
|
|
function updateStatus(message) |
|
|
|
{ |
|
|
|
if (!message) |
|
|
@ -17,6 +17,7 @@ Rectangle { |
|
|
|
status.state = ""; |
|
|
|
status.text = qsTr("Compile successfully."); |
|
|
|
debugImg.state = "active"; |
|
|
|
currentStatus = { "type": "Comp", "date": Qt.formatDateTime(new Date(), "hh:mm:ss"), "content": status.text, "level": "info" } |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@ -24,6 +25,7 @@ Rectangle { |
|
|
|
var errorInfo = ErrorLocationFormater.extractErrorInfo(message, true); |
|
|
|
status.text = errorInfo.errorLocation + " " + errorInfo.errorDetail; |
|
|
|
debugImg.state = ""; |
|
|
|
currentStatus = { "type": "Comp", "date": Qt.formatDateTime(new Date(), "hh:mm:ss"), "content": status.text, "level": "error" } |
|
|
|
} |
|
|
|
debugRunActionIcon.enabled = codeModel.hasContract; |
|
|
|
} |
|
|
@ -33,6 +35,7 @@ Rectangle { |
|
|
|
status.state = ""; |
|
|
|
status.text = text |
|
|
|
logPane.push("info", type, text); |
|
|
|
currentStatus = { "type": type, "date": Qt.formatDateTime(new Date(), "hh:mm:ss"), "content": text, "level": "info" } |
|
|
|
} |
|
|
|
|
|
|
|
function warningMessage(text, type) |
|
|
@ -40,6 +43,7 @@ Rectangle { |
|
|
|
status.state = "warning"; |
|
|
|
status.text = text |
|
|
|
logPane.push("warning", type, text); |
|
|
|
currentStatus = { "type": type, "date": Qt.formatDateTime(new Date(), "hh:mm:ss"), "content": text, "level": "warning" } |
|
|
|
} |
|
|
|
|
|
|
|
function errorMessage(text, type) |
|
|
@ -47,6 +51,7 @@ Rectangle { |
|
|
|
status.state = "error"; |
|
|
|
status.text = text; |
|
|
|
logPane.push("error", type, text); |
|
|
|
currentStatus = { "type": type, "date": Qt.formatDateTime(new Date(), "hh:mm:ss"), "content": text, "level": "error" } |
|
|
|
} |
|
|
|
|
|
|
|
Connections { |
|
|
@ -118,7 +123,7 @@ Rectangle { |
|
|
|
Text { |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
font.pointSize: StatusPaneStyle.general.statusFontSize |
|
|
|
font.pointSize: Style.absoluteSize(-1) |
|
|
|
height: 15 |
|
|
|
font.family: "sans serif" |
|
|
|
objectName: "status" |
|
|
@ -196,7 +201,9 @@ Rectangle { |
|
|
|
function toggle() |
|
|
|
{ |
|
|
|
if (logsContainer.state === "opened") |
|
|
|
{ |
|
|
|
logsContainer.state = "closed" |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
logsContainer.state = "opened"; |
|
|
@ -208,11 +215,10 @@ Rectangle { |
|
|
|
|
|
|
|
id: logsContainer |
|
|
|
width: 750 |
|
|
|
anchors.topMargin: -30 |
|
|
|
anchors.top: statusContainer.bottom |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.topMargin: 4 |
|
|
|
visible: false |
|
|
|
radius: 5 |
|
|
|
radius: 10 |
|
|
|
|
|
|
|
function calCoord() |
|
|
|
{ |
|
|
@ -221,28 +227,31 @@ Rectangle { |
|
|
|
top = top.parent |
|
|
|
var coordinates = logsContainer.mapToItem(top, 0, 0); |
|
|
|
logsContainer.parent = top; |
|
|
|
logsContainer.x = coordinates.x; |
|
|
|
logsContainer.y = coordinates.y; |
|
|
|
logsContainer.x = status.x + statusContainer.x - LogsPaneStyle.generic.layout.dateWidth - LogsPaneStyle.generic.layout.typeWidth - 30 |
|
|
|
} |
|
|
|
|
|
|
|
LogsPane |
|
|
|
{ |
|
|
|
id: logPane; |
|
|
|
} |
|
|
|
|
|
|
|
states: [ |
|
|
|
State { |
|
|
|
name: "opened"; |
|
|
|
PropertyChanges { target: logsContainer; height: 500; visible: true } |
|
|
|
PropertyChanges { target: statusContainer; width: 100; height: 25 } |
|
|
|
}, |
|
|
|
State { |
|
|
|
name: "closed"; |
|
|
|
PropertyChanges { target: logsContainer; height: 0; visible: false } |
|
|
|
PropertyChanges { target: statusContainer; width: 600; height: 30 } |
|
|
|
} |
|
|
|
] |
|
|
|
transitions: Transition { |
|
|
|
NumberAnimation { properties: "height"; easing.type: Easing.InOutQuad; duration: 200 } |
|
|
|
NumberAnimation { properties: "visible"; easing.type: Easing.InOutQuad; duration: 200 } |
|
|
|
} |
|
|
|
NumberAnimation { target: logsContainer; properties: "visible"; easing.type: Easing.InOutQuad; duration: 200 } |
|
|
|
NumberAnimation { target: statusContainer; properties: "width"; easing.type: Easing.InOutQuad; duration: 500 } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|