, m_ctx(std::move(ctx))
, m_exportUnsignedMenu(new QMenu(this))
, m_exportSignedMenu(new QMenu(this))
+ , m_exportTxKeyMenu(new QMenu(this))
{
ui->setupUi(this);
m_exportSignedMenu->addAction("Save to file", this, &TxConfAdvDialog::signedSaveFile);
ui->btn_exportSigned->setMenu(m_exportSignedMenu);
+ m_exportTxKeyMenu->addAction("Copy to clipboard", this, &TxConfAdvDialog::txKeyCopy);
+ ui->btn_exportTxKey->setMenu(m_exportTxKeyMenu);
+
if (m_ctx->wallet->viewOnly()) {
ui->btn_exportSigned->hide();
ui->btn_send->hide();
ui->btn_exportUnsigned->hide();
ui->btn_exportSigned->hide();
+ ui->btn_exportTxKey->hide();
ui->btn_sign->show();
ui->btn_send->hide();
Utils::copyToClipboard(m_tx->signedTxToHex(0));
}
+void TxConfAdvDialog::txKeyCopy() {
+ Utils::copyToClipboard(m_tx->transaction(0)->txKey());
+}
+
void TxConfAdvDialog::signedQrCode() {
}
void signedQrCode();
void signedSaveFile();
+ void txKeyCopy();
+
QScopedPointer<Ui::TxConfAdvDialog> ui;
QSharedPointer<AppContext> m_ctx;
PendingTransaction *m_tx = nullptr;
UnsignedTransaction *m_utx = nullptr;
QMenu *m_exportUnsignedMenu;
QMenu *m_exportSignedMenu;
+ QMenu *m_exportTxKeyMenu;
};
#endif //FEATHER_TXCONFADVDIALOG_H
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Transaction ID:</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Transaction ID:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="txid">
+ <property name="text">
+ <string>txid</string>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
- <widget class="QLineEdit" name="txid">
- <property name="text">
- <string>txid</string>
- </property>
- <property name="readOnly">
- <bool>true</bool>
+ <widget class="Line" name="line_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</property>
</widget>
</item>
+ <item>
+ <widget class="QToolButton" name="btn_exportTxKey">
+ <property name="text">
+ <string>Export tx key</string>
+ </property>
+ <property name="popupMode">
+ <enum>QToolButton::InstantPopup</enum>
+ </property>
+ </widget>
+ </item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
</widget>
</item>
<item>
- <widget class="QPushButton" name="btn_send">
+ <widget class="QPushButton" name="btn_close">
<property name="text">
- <string>Send</string>
+ <string>Cancel</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="btn_close">
+ <widget class="QPushButton" name="btn_send">
<property name="text">
- <string>Close</string>
+ <string>Send</string>
</property>
</widget>
</item>