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
22 MinimizeOnClose, // bool
26 ProxySocksVersion, // int
33 DisplayUnit, // BitcoinUnits::Unit
34 DisplayAddresses, // bool
35 ThirdPartyTxUrls, // QString
36 DetachDatabases, // bool
38 CoinControlFeatures, // bool
39 ExternalSeeder, // QString
45 int rowCount(const QModelIndex & parent = QModelIndex()) const;
46 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
47 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
49 /* Explicit getters */
50 qint64 getTransactionFee();
51 bool getMinimizeToTray();
52 bool getMinimizeOnClose();
54 bool getDisplayAddresses();
55 bool getCoinControlFeatures();
56 QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; }
57 QString getLanguage() { return language; }
61 bool bDisplayAddresses;
63 bool fMinimizeOnClose;
64 bool fCoinControlFeatures;
66 QString strThirdPartyTxUrls;
69 void displayUnitChanged(int unit);
70 void transactionFeeChanged(qint64);
71 void coinControlFeaturesChanged(bool);
74 #endif // OPTIONSMODEL_H