aboutsummaryrefslogtreecommitdiff
path: root/src/qt/coincontroldialog.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-11-18 14:33:34 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2016-11-20 20:18:24 +0100
commit4231032bfcb9728f0f629b3d67884ba9de63e4ff (patch)
treeb31c824de922400356556f602df62d9dd16fe717 /src/qt/coincontroldialog.h
parent76af4eb876814a916dd4f26cf71faa20bdc54f2d (diff)
[Qt] Clean up and fix coincontrol tree widget handling
- Do sorting for date, amount and confirmations column as longlong, not unsigned longlong. - Use `UserRole` to store our own data. This makes it treated as ancillary data prevents it from being displayed. - Get rid of `getMappedColumn` `strPad` - these are no longer necessary. - Get rid of hidden `_INT64` columns. - Start enumeration from 0 (otherwise values are undefined).
Diffstat (limited to 'src/qt/coincontroldialog.h')
-rw-r--r--src/qt/coincontroldialog.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index 960e92f79b..7c2269b1eb 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -70,13 +70,12 @@ private:
const PlatformStyle *platformStyle;
- QString strPad(QString, int, QString);
void sortView(int, Qt::SortOrder);
void updateView();
enum
{
- COLUMN_CHECKBOX,
+ COLUMN_CHECKBOX = 0,
COLUMN_AMOUNT,
COLUMN_LABEL,
COLUMN_ADDRESS,
@@ -84,32 +83,9 @@ private:
COLUMN_CONFIRMATIONS,
COLUMN_TXHASH,
COLUMN_VOUT_INDEX,
- COLUMN_AMOUNT_INT64,
- COLUMN_DATE_INT64
};
friend class CCoinControlWidgetItem;
- // some columns have a hidden column containing the value used for sorting
- int getMappedColumn(int column, bool fVisibleColumn = true)
- {
- if (fVisibleColumn)
- {
- if (column == COLUMN_AMOUNT_INT64)
- return COLUMN_AMOUNT;
- else if (column == COLUMN_DATE_INT64)
- return COLUMN_DATE;
- }
- else
- {
- if (column == COLUMN_AMOUNT)
- return COLUMN_AMOUNT_INT64;
- else if (column == COLUMN_DATE)
- return COLUMN_DATE_INT64;
- }
-
- return column;
- }
-
private Q_SLOTS:
void showMenu(const QPoint &);
void copyAmount();