aboutsummaryrefslogtreecommitdiff
path: root/src/qt/coincontroldialog.h
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2013-08-12 17:03:03 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2013-11-14 14:25:10 +0100
commit6a86c24db146d9ca5d1d5c83099d935c3feb63bb (patch)
tree84ea08401061e81d178a4c2caf34233281227da4 /src/qt/coincontroldialog.h
parent8dfd8c62dccac96afbda5ad0e66e68ee4820481f (diff)
Coin Control Features
Diffstat (limited to 'src/qt/coincontroldialog.h')
-rw-r--r--src/qt/coincontroldialog.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
new file mode 100644
index 0000000000..2674bab4f2
--- /dev/null
+++ b/src/qt/coincontroldialog.h
@@ -0,0 +1,92 @@
+#ifndef COINCONTROLDIALOG_H
+#define COINCONTROLDIALOG_H
+
+#include <QAbstractButton>
+#include <QAction>
+#include <QDialog>
+#include <QList>
+#include <QMenu>
+#include <QPoint>
+#include <QString>
+#include <QTreeWidgetItem>
+
+namespace Ui {
+ class CoinControlDialog;
+}
+class WalletModel;
+class CCoinControl;
+
+class CoinControlDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit CoinControlDialog(QWidget *parent = 0);
+ ~CoinControlDialog();
+
+ void setModel(WalletModel *model);
+
+ // static because also called from sendcoinsdialog
+ static void updateLabels(WalletModel*, QDialog*);
+ static QString getPriorityLabel(double);
+
+ static QList<qint64> payAmounts;
+ static CCoinControl *coinControl;
+
+private:
+ Ui::CoinControlDialog *ui;
+ WalletModel *model;
+ int sortColumn;
+ Qt::SortOrder sortOrder;
+
+ QMenu *contextMenu;
+ QTreeWidgetItem *contextMenuItem;
+ QAction *copyTransactionHashAction;
+ QAction *lockAction;
+ QAction *unlockAction;
+
+ QString strPad(QString, int, QString);
+ void sortView(int, Qt::SortOrder);
+ void updateView();
+
+ enum
+ {
+ COLUMN_CHECKBOX,
+ COLUMN_AMOUNT,
+ COLUMN_LABEL,
+ COLUMN_ADDRESS,
+ COLUMN_DATE,
+ COLUMN_CONFIRMATIONS,
+ COLUMN_PRIORITY,
+ COLUMN_TXHASH,
+ COLUMN_VOUT_INDEX,
+ COLUMN_AMOUNT_INT64,
+ COLUMN_PRIORITY_INT64
+ };
+
+private slots:
+ void showMenu(const QPoint &);
+ void copyAmount();
+ void copyLabel();
+ void copyAddress();
+ void copyTransactionHash();
+ void lockCoin();
+ void unlockCoin();
+ void clipboardQuantity();
+ void clipboardAmount();
+ void clipboardFee();
+ void clipboardAfterFee();
+ void clipboardBytes();
+ void clipboardPriority();
+ void clipboardLowOutput();
+ void clipboardChange();
+ void radioTreeMode(bool);
+ void radioListMode(bool);
+ void viewItemChanged(QTreeWidgetItem*, int);
+ void headerSectionClicked(int);
+ void buttonBoxClicked(QAbstractButton*);
+ void buttonSelectAllClicked();
+ void updateLabelLocked();
+};
+
+#endif // COINCONTROLDIALOG_H