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
34 DisplayUnit, // BitcoinUnits::Unit
35 DisplayAddresses, // bool
36 ThirdPartyTxUrls, // QString
37 DetachDatabases, // bool
39 CoinControlFeatures, // bool
45 /* Migrate settings from wallet.dat after app initialization */
46 bool Upgrade(); /* returns true if settings upgraded */
48 int rowCount(const QModelIndex & parent = QModelIndex()) const;
49 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
50 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
52 /* Explicit getters */
53 qint64 getTransactionFee();
54 bool getMinimizeToTray();
55 bool getMinimizeOnClose();
57 bool getDisplayAddresses();
58 bool getCoinControlFeatures();
59 QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; }
60 QString getLanguage() { return language; }
64 bool bDisplayAddresses;
66 bool fMinimizeOnClose;
67 bool fCoinControlFeatures;
69 QString strThirdPartyTxUrls;
72 void displayUnitChanged(int unit);
73 void transactionFeeChanged(qint64);
74 void coinControlFeaturesChanged(bool);
77 #endif // OPTIONSMODEL_H