aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.h
diff options
context:
space:
mode:
authorgubatron <gubatron@gmail.com>2014-06-07 02:20:22 -0400
committergubatron <gubatron@gmail.com>2014-06-25 14:53:05 -0400
commit8969828d069e4e55108618a493749535edc12ec7 (patch)
treeb3e65acdf948412304e2179cb2baac4afaab120b /src/qt/optionsmodel.h
parent343feecf562a39e7d898ece2fd745fcb9d4c90e9 (diff)
downloadbitcoin-8969828d069e4e55108618a493749535edc12ec7.tar.xz
[Qt] New status bar Unit Display Control and related changes.
- New status bar control shows the current Unit of Display. When clicked (left,or right button) it shows a context menu that allows the user to switch the current Unit of Display (BTC, mBTC, uBTC) - Recent Requests and Transaction Table headers are now updated when unit of display is changed, because their "Amount" column now displays the current unit of display. - Takes care of issue #3970 Units in transaction export csv file. - Small refactors for reusability. - Demo Video https://www.youtube.com/watch?v=wwcr0Yh68go&list=UUG3jF2hgofmLWP0tRPisQAQ - changes after Diapolo's feedback. Have not been able to build after last pool, issues with boost on MacOSX, will test on Ubuntu these changes. - removed return statement on switch - renamed onDisplayUnitsChanged(int) to updateDisplayUnit(int) - now getAmountColumnTitle(int unit) takes a simple unit parameter. moved to BitcoinUnits.
Diffstat (limited to 'src/qt/optionsmodel.h')
-rw-r--r--src/qt/optionsmodel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 2596682d07..89c2ec7453 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -52,6 +52,8 @@ public:
int rowCount(const QModelIndex & parent = QModelIndex()) const;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
+ /** Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal */
+ void setDisplayUnit(const QVariant &value);
/* Explicit getters */
bool getMinimizeToTray() { return fMinimizeToTray; }