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 DetachDatabases, // bool
38 /* Migrate settings from wallet.dat after app initialization */
39 bool Upgrade(); /* returns true if settings upgraded */
41 int rowCount(const QModelIndex & parent = QModelIndex()) const;
42 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
43 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
45 /* Explicit getters */
46 qint64 getTransactionFee();
47 bool getMinimizeToTray();
48 bool getMinimizeOnClose();
50 bool getDisplayAddresses();
51 QString getLanguage() { return language; }
55 bool bDisplayAddresses;
57 bool fMinimizeOnClose;
61 void displayUnitChanged(int unit);
64 #endif // OPTIONSMODEL_H