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 ThirdPartyTxUrls, // QString
32 DetachDatabases, // bool
34 CoinControlFeatures, // bool
40 /* Migrate settings from wallet.dat after app initialization */
41 bool Upgrade(); /* returns true if settings upgraded */
43 int rowCount(const QModelIndex & parent = QModelIndex()) const;
44 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
45 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
47 /* Explicit getters */
48 qint64 getTransactionFee();
49 bool getMinimizeToTray();
50 bool getMinimizeOnClose();
52 bool getDisplayAddresses();
53 bool getCoinControlFeatures();
54 QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; }
55 QString getLanguage() { return language; }
59 bool bDisplayAddresses;
61 bool fMinimizeOnClose;
62 bool fCoinControlFeatures;
64 QString strThirdPartyTxUrls;
67 void displayUnitChanged(int unit);
68 void transactionFeeChanged(qint64);
69 void coinControlFeaturesChanged(bool);
72 #endif // OPTIONSMODEL_H