mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-19 08:03:48 +02:00
Merge pull request #834
f7c883a
Settings: add wallet creation height and log file paths (Jaquee)31f318a
add wallet creation height getter (Jaquee)94c92ba
add daemon/wallet log path getters (Jaquee)8480c70
add textBlock component (Jaquee)
This commit is contained in:
commit
ece743e22a
7
components/TextBlock.qml
Normal file
7
components/TextBlock.qml
Normal file
@ -0,0 +1,7 @@
|
||||
import QtQuick 2.0
|
||||
|
||||
TextEdit {
|
||||
wrapMode: Text.Wrap
|
||||
readOnly: true
|
||||
selectByMouse: true
|
||||
}
|
@ -473,7 +473,7 @@ Rectangle {
|
||||
RowLayout {
|
||||
Label {
|
||||
color: "#4A4949"
|
||||
text: qsTr("Version") + translationManager.emptyString
|
||||
text: qsTr("Debug info") + translationManager.emptyString
|
||||
fontSize: 16
|
||||
anchors.topMargin: 30
|
||||
Layout.topMargin: 30
|
||||
@ -485,19 +485,28 @@ Rectangle {
|
||||
color: "#DEDEDE"
|
||||
}
|
||||
|
||||
Label {
|
||||
id: guiVersion
|
||||
TextBlock {
|
||||
Layout.topMargin: 8
|
||||
color: "#4A4949"
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("GUI version: ") + Version.GUI_VERSION + translationManager.emptyString
|
||||
fontSize: 16
|
||||
}
|
||||
|
||||
Label {
|
||||
TextBlock {
|
||||
id: guiMoneroVersion
|
||||
color: "#4A4949"
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Embedded Monero version: ") + Version.GUI_MONERO_VERSION + translationManager.emptyString
|
||||
fontSize: 16
|
||||
}
|
||||
TextBlock {
|
||||
Layout.fillWidth: true
|
||||
text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet creation height: ") + currentWallet.walletCreationHeight + translationManager.emptyString
|
||||
}
|
||||
TextBlock {
|
||||
Layout.fillWidth: true
|
||||
text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet log path: ") + currentWallet.walletLogPath + translationManager.emptyString
|
||||
}
|
||||
TextBlock {
|
||||
Layout.fillWidth: true
|
||||
text: (typeof currentWallet == "undefined") ? "" : qsTr("Daemon log path: ") + currentWallet.daemonLogPath + translationManager.emptyString
|
||||
}
|
||||
}
|
||||
|
||||
|
1
qml.qrc
1
qml.qrc
@ -141,5 +141,6 @@
|
||||
<file>components/QRCodeScanner.qml</file>
|
||||
<file>components/Notifier.qml</file>
|
||||
<file>components/MobileHeader.qml</file>
|
||||
<file>components/TextBlock.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -599,6 +599,16 @@ bool Wallet::useForkRules(quint8 required_version, quint64 earlyBlocks) const
|
||||
}
|
||||
}
|
||||
|
||||
QString Wallet::getDaemonLogPath() const
|
||||
{
|
||||
return QString::fromStdString(m_walletImpl->getDefaultDataDir()) + "/bitmonero.log";
|
||||
}
|
||||
|
||||
QString Wallet::getWalletLogPath() const
|
||||
{
|
||||
return QCoreApplication::applicationDirPath() + "/monero-wallet-gui.log";
|
||||
}
|
||||
|
||||
Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_walletImpl(w)
|
||||
|
@ -45,6 +45,9 @@ class Wallet : public QObject
|
||||
Q_PROPERTY(QString publicViewKey READ getPublicViewKey)
|
||||
Q_PROPERTY(QString secretSpendKey READ getSecretSpendKey)
|
||||
Q_PROPERTY(QString publicSpendKey READ getPublicSpendKey)
|
||||
Q_PROPERTY(QString daemonLogPath READ getDaemonLogPath CONSTANT)
|
||||
Q_PROPERTY(QString walletLogPath READ getWalletLogPath CONSTANT)
|
||||
Q_PROPERTY(quint64 walletCreationHeight READ getWalletCreationHeight CONSTANT)
|
||||
|
||||
public:
|
||||
|
||||
@ -241,6 +244,10 @@ public:
|
||||
QString getSecretSpendKey() const {return QString::fromStdString(m_walletImpl->secretSpendKey());}
|
||||
QString getPublicSpendKey() const {return QString::fromStdString(m_walletImpl->publicSpendKey());}
|
||||
|
||||
quint64 getWalletCreationHeight() const {return m_walletImpl->getRefreshFromBlockHeight();}
|
||||
QString getDaemonLogPath() const;
|
||||
QString getWalletLogPath() const;
|
||||
|
||||
// TODO: setListenter() when it implemented in API
|
||||
signals:
|
||||
// emitted on every event happened with wallet
|
||||
|
Loading…
Reference in New Issue
Block a user