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