4 #include <QAbstractListModel>
6 /** Interface from Qt to configuration data structure for Bitcoin client.
7 To Qt, the options are presented as a list with the different options
9 This can be changed to a tree once the settings become sufficiently
12 class OptionsModel : public QAbstractListModel
17 explicit OptionsModel(QObject *parent = 0);
20 StartAtStartup, // bool
21 MinimizeToTray, // bool
23 MinimizeOnClose, // bool
27 ProxySocksVersion, // int
29 DisplayUnit, // BitcoinUnits::Unit
30 DisplayAddresses, // bool
31 DetachDatabases, // bool
33 CoinControlFeatures, // bool
39 /* Migrate settings from wallet.dat after app initialization */
40 bool Upgrade(); /* returns true if settings upgraded */
42 int rowCount(const QModelIndex & parent = QModelIndex()) const;
43 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
44 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
46 /* Explicit getters */
47 qint64 getTransactionFee();
48 bool getMinimizeToTray();
49 bool getMinimizeOnClose();
51 bool getDisplayAddresses();
52 bool getCoinControlFeatures();
53 QString getLanguage() { return language; }
57 bool bDisplayAddresses;
59 bool fMinimizeOnClose;
60 bool fCoinControlFeatures;
64 void displayUnitChanged(int unit);
65 void transactionFeeChanged(qint64);
66 void coinControlFeaturesChanged(bool);
69 #endif // OPTIONSMODEL_H