Browse Source

record checkbox

cl-refactor
arkpar 10 years ago
parent
commit
80ffe1bc4b
  1. 2
      mix/ClientModel.h
  2. 15
      mix/qml/TransactionLog.qml

2
mix/ClientModel.h

@ -72,7 +72,7 @@ class TransactionLogEntry: public QObject
/// Transaction block number /// Transaction block number
Q_PROPERTY(unsigned block MEMBER m_block CONSTANT) Q_PROPERTY(unsigned block MEMBER m_block CONSTANT)
/// Transaction index within the block /// Transaction index within the block
Q_PROPERTY(unsigned index MEMBER m_index CONSTANT) Q_PROPERTY(unsigned tindex MEMBER m_index CONSTANT)
/// Contract name if any /// Contract name if any
Q_PROPERTY(QString contract MEMBER m_contract CONSTANT) Q_PROPERTY(QString contract MEMBER m_contract CONSTANT)
/// Function name if any /// Function name if any

15
mix/qml/TransactionLog.qml

@ -5,8 +5,17 @@ import QtQuick.Dialogs 1.1
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
Item { Item {
TableView { ColumnLayout {
anchors.fill: parent anchors.fill: parent
CheckBox {
id: recording
text: qsTr("Record transactions");
checked: true
Layout.fillWidth: true
}
TableView {
Layout.fillWidth: true
Layout.fillHeight: true
model: logModel model: logModel
TableViewColumn { TableViewColumn {
@ -15,7 +24,7 @@ Item {
width: 40 width: 40
} }
TableViewColumn { TableViewColumn {
role: "index" role: "tindex"
title: qsTr("Index") title: qsTr("Index")
width: 40 width: 40
} }
@ -55,6 +64,7 @@ Item {
} }
} }
} }
}
ListModel { ListModel {
id: logModel id: logModel
@ -66,6 +76,7 @@ Item {
logModel.clear(); logModel.clear();
} }
onNewTransaction: { onNewTransaction: {
if (recording.checked)
logModel.append(_tr); logModel.append(_tr);
} }
} }

Loading…
Cancel
Save