<file>assets/images/copy.png</file>
<file>assets/images/cutexmrfox.png</file>
<file>assets/images/edit.png</file>
+ <file>assets/images/external-link.svg</file>
<file>assets/images/exchange.png</file>
<file>assets/images/exchange_white.png</file>
<file>assets/images/expired.png</file>
#include "appcontext.h"
#include "config.h"
+#include "constants.h"
#include "libwalletqt/Coins.h"
#include "libwalletqt/CoinsInfo.h"
#include "libwalletqt/TransactionHistory.h"
#include "libwalletqt/WalletManager.h"
#include "model/ModelUtils.h"
#include "Utils.h"
+#include "utils/Icons.h"
TxInfoDialog::TxInfoDialog(QSharedPointer<AppContext> ctx, TransactionInfo *txInfo, QWidget *parent)
: QDialog(parent)
{
ui->setupUi(this);
+ ui->btn_viewOnBlockExplorer->setIcon(icons()->icon("external-link.svg"));
+ ui->btn_viewOnBlockExplorer->setToolTip("View on block explorer");
+ connect(ui->btn_viewOnBlockExplorer, &QPushButton::clicked, this, &TxInfoDialog::viewOnBlockExplorer);
+
m_txid = txInfo->hash();
ui->label_txid->setText(m_txid);
}
this->adjustSize();
+
+ // Don't autofocus any of the buttons. There is probably a better way for this.
+ ui->label_txid->setFocus();
}
void TxInfoDialog::adjustHeight(QTextEdit *textEdit, qreal docHeight) {
m_txProofDialog->getTxKey();
}
+void TxInfoDialog::viewOnBlockExplorer() {
+ Utils::externalLinkWarning(this, Utils::blockExplorerLink(config()->get(Config::blockExplorer).toString(), constants::networkType, m_txid));
+}
+
TxInfoDialog::~TxInfoDialog() = default;
\ No newline at end of file
void setData(TransactionInfo *tx);
void updateData();
void adjustHeight(QTextEdit *textEdit, qreal docHeight);
+ void viewOnBlockExplorer();
QScopedPointer<Ui::TxInfoDialog> ui;
QSharedPointer<AppContext> m_ctx;
<property name="title">
<string>Transaction ID:</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_txid">
<property name="text">
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btn_viewOnBlockExplorer">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>