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
44 int rowCount(const QModelIndex & parent = QModelIndex()) const;
45 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
46 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
48 /* Explicit getters */
49 qint64 getTransactionFee();
50 bool getMinimizeToTray();
51 bool getMinimizeOnClose();
53 bool getDisplayAddresses();
54 bool getCoinControlFeatures();
55 QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; }
56 QString getLanguage() { return language; }
60 bool bDisplayAddresses;
62 bool fMinimizeOnClose;
63 bool fCoinControlFeatures;
65 QString strThirdPartyTxUrls;
68 void displayUnitChanged(int unit);
69 void transactionFeeChanged(qint64);
70 void coinControlFeaturesChanged(bool);
73 #endif // OPTIONSMODEL_H