1- import "./Constants "
2- import "./TableComponents "
1+ import "BaseComponents "
2+ import "Constants "
33import Qt.labs.qmlmodels 1.0
44import QtQuick 2.15
55import QtQuick.Controls 2.15
66import SwiftConsole 1.0
7+ import "TableComponents"
78
89Item {
910 property var logEntries: []
@@ -30,13 +31,43 @@ Item {
3031 anchors .rightMargin : Constants .logPanel .pauseButtonRightMargin
3132 z: Constants .logPanel .zAboveTable
3233
33- RoundButton {
34- id: baselinePauseButton
34+ SwiftButton {
35+ width: Constants .logPanel .pauseButtonWidth
36+ height: Constants .logPanel .pauseButtonWidth
37+ padding: Constants .logPanel .pauseButtonPadding
38+ icon .width : Constants .logPanel .pauseButtonWidth / 3
39+ icon .height : Constants .logPanel .pauseButtonWidth / 3
40+ icon .source : Constants .icons .xPath
41+ icon .color : Constants .materialGrey
42+ anchors .right : parent .right
43+ anchors .top : parent .top
44+ ToolTip .visible : hovered
45+ ToolTip .text : Constants .logPanel .clearButtonTooltip
46+ onClicked: {
47+ tableView .model .clear ();
48+ var new_row = {
49+ };
50+ new_row[Constants .logPanel .timestampHeader ] = " " ;
51+ new_row[Constants .logPanel .levelHeader ] = " " ;
52+ new_row[Constants .logPanel .msgHeader ] = " " ;
53+ logEntries = [new_row];
54+ tableView .model .setRow (0 , new_row);
55+ tableView .forceLayout ();
56+ }
57+ }
3558
59+ }
60+
61+ Item {
62+ anchors .fill : parent
63+ anchors .topMargin : Constants .genericTable .cellHeight * 2
64+ anchors .rightMargin : Constants .logPanel .pauseButtonRightMargin
65+ z: Constants .logPanel .zAboveTable
66+
67+ SwiftButton {
3668 visible: ! consolePaused
3769 width: Constants .logPanel .pauseButtonWidth
3870 height: Constants .logPanel .pauseButtonWidth
39- radius: Constants .logPanel .pauseButtonWidth / 3
4071 padding: Constants .logPanel .pauseButtonPadding
4172 icon .width : Constants .logPanel .pauseButtonWidth / 3
4273 icon .height : Constants .logPanel .pauseButtonWidth / 3
@@ -51,13 +82,10 @@ Item {
5182 }
5283 }
5384
54- RoundButton {
55- id: baselinePlayButton
56-
85+ SwiftButton {
5786 visible: consolePaused
5887 width: Constants .logPanel .pauseButtonWidth
5988 height: Constants .logPanel .pauseButtonWidth
60- radius: Constants .logPanel .pauseButtonWidth / 3
6189 padding: Constants .logPanel .pauseButtonPadding
6290 icon .width : Constants .logPanel .pauseButtonWidth / 3
6391 icon .height : Constants .logPanel .pauseButtonWidth / 3
0 commit comments