aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qt/bitcoin.qrc4
-rw-r--r--src/qt/res/icons/tx_inout.pngbin0 -> 631 bytes
-rw-r--r--src/qt/res/icons/tx_input.pngbin0 -> 594 bytes
-rw-r--r--src/qt/res/icons/tx_mined.pngbin0 -> 754 bytes
-rw-r--r--src/qt/res/icons/tx_output.pngbin0 -> 593 bytes
-rw-r--r--src/qt/res/src/bitcoin.svg (renamed from src/qt/res/icons/bitcoin.svg)0
-rw-r--r--src/qt/res/src/clock1.svg (renamed from src/qt/res/icons/clock1.svg)0
-rw-r--r--src/qt/res/src/clock2.svg (renamed from src/qt/res/icons/clock2.svg)0
-rw-r--r--src/qt/res/src/clock3.svg (renamed from src/qt/res/icons/clock3.svg)0
-rw-r--r--src/qt/res/src/clock4.svg (renamed from src/qt/res/icons/clock4.svg)0
-rw-r--r--src/qt/res/src/clock5.svg (renamed from src/qt/res/icons/clock5.svg)0
-rw-r--r--src/qt/res/src/clock_green.svg (renamed from src/qt/res/icons/clock_green.svg)0
-rw-r--r--src/qt/res/src/inout.svg122
-rw-r--r--src/qt/res/src/questionmark.svg (renamed from src/qt/res/icons/questionmark.svg)0
-rw-r--r--src/qt/transactiontablemodel.cpp69
-rw-r--r--src/qt/transactiontablemodel.h5
16 files changed, 167 insertions, 33 deletions
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index 5199a8ea31..8d4bab5462 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -30,6 +30,10 @@
<file alias="export">res/icons/export.png</file>
<file alias="synced">res/icons/synced.png</file>
<file alias="remove">res/icons/remove.png</file>
+ <file alias="tx_mined">res/icons/tx_mined.png</file>
+ <file alias="tx_input">res/icons/tx_input.png</file>
+ <file alias="tx_output">res/icons/tx_output.png</file>
+ <file alias="tx_inout">res/icons/tx_inout.png</file>
</qresource>
<qresource prefix="/images">
<file alias="about">res/images/about.png</file>
diff --git a/src/qt/res/icons/tx_inout.png b/src/qt/res/icons/tx_inout.png
new file mode 100644
index 0000000000..ff6bb1c5c3
--- /dev/null
+++ b/src/qt/res/icons/tx_inout.png
Binary files differ
diff --git a/src/qt/res/icons/tx_input.png b/src/qt/res/icons/tx_input.png
new file mode 100644
index 0000000000..1673d06ad3
--- /dev/null
+++ b/src/qt/res/icons/tx_input.png
Binary files differ
diff --git a/src/qt/res/icons/tx_mined.png b/src/qt/res/icons/tx_mined.png
new file mode 100644
index 0000000000..a336868e8a
--- /dev/null
+++ b/src/qt/res/icons/tx_mined.png
Binary files differ
diff --git a/src/qt/res/icons/tx_output.png b/src/qt/res/icons/tx_output.png
new file mode 100644
index 0000000000..0617239e14
--- /dev/null
+++ b/src/qt/res/icons/tx_output.png
Binary files differ
diff --git a/src/qt/res/icons/bitcoin.svg b/src/qt/res/src/bitcoin.svg
index 96f10178a2..96f10178a2 100644
--- a/src/qt/res/icons/bitcoin.svg
+++ b/src/qt/res/src/bitcoin.svg
diff --git a/src/qt/res/icons/clock1.svg b/src/qt/res/src/clock1.svg
index 793dc7f91c..793dc7f91c 100644
--- a/src/qt/res/icons/clock1.svg
+++ b/src/qt/res/src/clock1.svg
diff --git a/src/qt/res/icons/clock2.svg b/src/qt/res/src/clock2.svg
index 6a78adf700..6a78adf700 100644
--- a/src/qt/res/icons/clock2.svg
+++ b/src/qt/res/src/clock2.svg
diff --git a/src/qt/res/icons/clock3.svg b/src/qt/res/src/clock3.svg
index 09ccc2549f..09ccc2549f 100644
--- a/src/qt/res/icons/clock3.svg
+++ b/src/qt/res/src/clock3.svg
diff --git a/src/qt/res/icons/clock4.svg b/src/qt/res/src/clock4.svg
index 7d9dc37acb..7d9dc37acb 100644
--- a/src/qt/res/icons/clock4.svg
+++ b/src/qt/res/src/clock4.svg
diff --git a/src/qt/res/icons/clock5.svg b/src/qt/res/src/clock5.svg
index 9fd58d9d97..9fd58d9d97 100644
--- a/src/qt/res/icons/clock5.svg
+++ b/src/qt/res/src/clock5.svg
diff --git a/src/qt/res/icons/clock_green.svg b/src/qt/res/src/clock_green.svg
index e31f0e7995..e31f0e7995 100644
--- a/src/qt/res/icons/clock_green.svg
+++ b/src/qt/res/src/clock_green.svg
diff --git a/src/qt/res/src/inout.svg b/src/qt/res/src/inout.svg
new file mode 100644
index 0000000000..bfab8ef6ab
--- /dev/null
+++ b/src/qt/res/src/inout.svg
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg3039"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ width="120"
+ height="120"
+ sodipodi:docname="inout3.svg"
+ inkscape:export-filename="/home/orion/projects2/bitcoin/tx_mined.png"
+ inkscape:export-xdpi="12"
+ inkscape:export-ydpi="12"
+ style="display:inline">
+ <metadata
+ id="metadata3045">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3043" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1127"
+ id="namedview3041"
+ showgrid="false"
+ inkscape:zoom="1"
+ inkscape:cx="87.12655"
+ inkscape:cy="67.287943"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer7" />
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="base"
+ style="display:none">
+ <path
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#afafaf;fill-opacity:1;stroke:none;stroke-width:7;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
+ d="m 45.375,17 c -13.984022,0.241082 -24.968241,3.28976 -37.4375,9.59375 -8.9920665,21.871558 -6.680947,46.393002 -1.96875,69 26.190925,13.15317 55.594909,12.97748 81.75,-0.21875 3.852144,-9.729509 1.599587,-12.800015 2.375,-23.15625 C 83.917272,72.423868 77.129905,67.688094 74.1875,75.25 72.702487,79.722025 76.119709,82.645519 69.15625,83.34375 53.023957,88.536726 37.721719,89.140031 21.875,82.28125 19.715285,68.367979 18.599566,53.65725 22.5,40 c 16.868164,-6.642068 33.121079,-6.120062 50.03125,-0.15625 1.285344,5.854815 1.574746,5.763255 2.375,11.6875 C 80.46378,51.970623 89.644961,53.334736 91.3125,46 91.85305,36.007959 89.372312,31.625095 87.1875,25.6875 73.709743,21.03478 59.804255,16.698888 45.375,17 z"
+ id="path3053"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccccccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="arrow_out"
+ style="display:none">
+ <path
+ style="fill:#6e6e6e;fill-opacity:1;stroke:none;display:inline"
+ d="m 63.983409,65.48134 0.267857,-9.514444 36.161424,-0.194173 -7.414458,-8.757971 3.798312,-7.572721 c 0,0 23.437946,20.796656 22.500436,21.185 -0.93751,0.388345 -23.170094,22.73838 -23.170094,22.73838 l -3.128654,-8.931927 7.548388,-8.5638 z"
+ id="path3844"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccscccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer4"
+ inkscape:label="arrow_in"
+ style="display:none">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4080"
+ d="m 99.28763,65.48134 -0.26786,-9.514444 -36.161422,-0.194173 7.768009,-6.283097 -4.151865,-9.279828 c 0,0 -23.43795,20.028889 -22.500436,20.417233 0.937514,0.388345 23.170094,20.970613 23.170094,20.970613 l 3.482207,-9.639034 -7.901936,-6.088926 z"
+ style="fill:#6e6e6e;fill-opacity:1;stroke:none;display:inline"
+ sodipodi:nodetypes="cccccscccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer7"
+ inkscape:label="mined"
+ style="display:inline">
+ <path
+ style="fill:#a9a9a9;fill-opacity:1;stroke:none;display:inline"
+ d="M 9.4375,99.758169 78.14665,33.110294 73.680556,28.300653 67.153187,8.375 l 18.55147,6.527369 4.80964,3.779003 4.809641,-4.80964 11.680552,12.367647 -6.18382,4.80964 13.74183,14.085377 -12.71119,14.42892 -14.77247,-16.14665 -65.273693,70.770424 z"
+ id="path4103"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccccccc" />
+ <path
+ sodipodi:nodetypes="cccccccccccccc"
+ inkscape:connector-curvature="0"
+ id="path4619"
+ d="M 114.5625,99.758169 45.85335,33.110294 50.319444,28.300653 56.846813,8.375 l -18.55147,6.527369 -4.80964,3.779003 -4.809641,-4.80964 -11.680556,12.367647 6.183825,4.80964 L 9.4375,45.134396 22.148693,59.563316 36.92116,43.416666 102.19485,114.18709 z"
+ style="fill:#a9a9a9;fill-opacity:1;stroke:none;display:inline" />
+ <path
+ style="fill:#6e6e6e;fill-opacity:1;stroke:none"
+ d="M 10.960155,44.693128 38.53732,16.408856 54.093669,10.752002 48.436815,28.076118 22.273864,56.713943 z"
+ id="path5256"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="fill:#6e6e6e;fill-opacity:1;stroke:none"
+ d="M 69.296465,10.398449 85.559921,17.115963 111.72287,45.046681 102.17693,56.713943 74.953319,27.722565 z"
+ id="path5258"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccc" />
+ </g>
+</svg>
diff --git a/src/qt/res/icons/questionmark.svg b/src/qt/res/src/questionmark.svg
index c03c159a5f..c03c159a5f 100644
--- a/src/qt/res/icons/questionmark.svg
+++ b/src/qt/res/src/questionmark.svg
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 27e85cebc5..58ec2c7ace 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -340,58 +340,62 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to
return description;
}
-QVariant TransactionTableModel::formatTxType(const TransactionRecord *wtx) const
+QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const
{
- QString description;
-
switch(wtx->type)
{
case TransactionRecord::RecvWithAddress:
- description = tr("Received with");
- break;
+ return tr("Received with");
case TransactionRecord::RecvFromIP:
- description = tr("Received from IP");
- break;
+ return tr("Received from IP");
case TransactionRecord::SendToAddress:
- description = tr("Sent to");
- break;
+ return tr("Sent to");
case TransactionRecord::SendToIP:
- description = tr("Sent to IP");
- break;
+ return tr("Sent to IP");
case TransactionRecord::SendToSelf:
- description = tr("Payment to yourself");
- break;
+ return tr("Payment to yourself");
case TransactionRecord::Generated:
- description = tr("Mined");
- break;
+ return tr("Mined");
+ default:
+ return QString();
}
- return QVariant(description);
}
-QVariant TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
+QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx) const
{
- QString description;
+ switch(wtx->type)
+ {
+ case TransactionRecord::Generated:
+ return QIcon(":/icons/tx_mined");
+ case TransactionRecord::RecvWithAddress:
+ case TransactionRecord::RecvFromIP:
+ return QIcon(":/icons/tx_input");
+ case TransactionRecord::SendToAddress:
+ case TransactionRecord::SendToIP:
+ return QIcon(":/icons/tx_output");
+ default:
+ return QIcon(":/icons/tx_inout");
+ }
+ return QVariant();
+}
+QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
+{
switch(wtx->type)
{
case TransactionRecord::RecvFromIP:
- description = QString::fromStdString(wtx->address);
- break;
+ return QString::fromStdString(wtx->address);
case TransactionRecord::RecvWithAddress:
case TransactionRecord::SendToAddress:
- description = lookupAddress(wtx->address, tooltip);
- break;
+ return lookupAddress(wtx->address, tooltip);
case TransactionRecord::SendToIP:
- description = QString::fromStdString(wtx->address);
- break;
+ return QString::fromStdString(wtx->address);
case TransactionRecord::SendToSelf:
- description = QString();
- break;
+ return QString();
case TransactionRecord::Generated:
- description = QString();
- break;
+ default:
+ return QString();
}
- return QVariant(description);
}
QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
@@ -478,9 +482,12 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
if(role == Qt::DecorationRole)
{
- if(index.column() == Status)
+ switch(index.column())
{
+ case Status:
return formatTxDecoration(rec);
+ case ToAddress:
+ return txAddressDecoration(rec);
}
}
else if(role == Qt::DisplayRole)
@@ -522,7 +529,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
case Status:
return formatTxStatus(rec);
case ToAddress:
- return formatTxToAddress(rec, true);
+ return formatTxType(rec) + QString(" ") + formatTxToAddress(rec, true);
}
}
else if (role == Qt::TextAlignmentRole)
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 3322ff4af1..71b0644110 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -63,10 +63,11 @@ private:
QVariant addressColor(const TransactionRecord *wtx) const;
QVariant formatTxStatus(const TransactionRecord *wtx) const;
QVariant formatTxDate(const TransactionRecord *wtx) const;
- QVariant formatTxType(const TransactionRecord *wtx) const;
- QVariant formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const;
+ QString formatTxType(const TransactionRecord *wtx) const;
+ QString formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const;
QVariant formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true) const;
QVariant formatTxDecoration(const TransactionRecord *wtx) const;
+ QVariant txAddressDecoration(const TransactionRecord *wtx) const;
private slots:
void update();