transaction details dialog on doubleclick

This commit is contained in:
Wladimir J. van der Laan
2011-06-10 15:05:51 +02:00
parent 8e86dca256
commit 66d536ed07
11 changed files with 486 additions and 13 deletions

View File

@@ -4,7 +4,6 @@
#include <QMainWindow>
#include <QSystemTrayIcon>
/* Forward declarations */
class TransactionTableModel;
class ClientModel;
@@ -13,6 +12,7 @@ class QLabel;
class QLineEdit;
class QTableView;
class QAbstractItemModel;
class QModelIndex;
QT_END_NAMESPACE
class BitcoinGUI : public QMainWindow
@@ -66,6 +66,10 @@ public slots:
void setNumBlocks(int count);
void setNumTransactions(int count);
void error(const QString &title, const QString &message);
/* It is currently not possible to pass a return value to another thread through
BlockingQueuedConnection, so use an indirected pointer.
http://bugreports.qt.nokia.com/browse/QTBUG-10440
*/
void askFee(qint64 nFeeRequired, bool *payFee);
private slots:
@@ -77,6 +81,7 @@ private slots:
void newAddressClicked();
void copyClipboardClicked();
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
void transactionDetails(const QModelIndex& idx);
};
#endif

View File

@@ -0,0 +1,15 @@
#ifndef TRANSACTIONDESC_H
#define TRANSACTIONDESC_H
#include <string>
class CWalletTx;
class TransactionDesc
{
public:
/* Provide human-readable extended HTML description of a transaction */
static std::string toHTML(CWalletTx &wtx);
};
#endif // TRANSACTIONDESC_H

View File

@@ -0,0 +1,25 @@
#ifndef TRANSACTIONDESCDIALOG_H
#define TRANSACTIONDESCDIALOG_H
#include <QDialog>
namespace Ui {
class TransactionDescDialog;
}
QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE
class TransactionDescDialog : public QDialog
{
Q_OBJECT
public:
explicit TransactionDescDialog(const QModelIndex &idx, QWidget *parent = 0);
~TransactionDescDialog();
private:
Ui::TransactionDescDialog *ui;
};
#endif // TRANSACTIONDESCDIALOG_H

View File

@@ -23,7 +23,8 @@ public:
} ColumnIndex;
enum {
TypeRole = Qt::UserRole
TypeRole = Qt::UserRole,
LongDescriptionRole = Qt::UserRole+1
} RoleIndex;
/* TypeRole values */