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
16 explicit OptionsModel(QObject *parent = 0);
19 StartAtStartup, // bool
20 MinimizeToTray, // bool
22 MinimizeOnClose, // bool
23 ConnectSOCKS4, // bool
27 DisplayUnit, // BitcoinUnits::Unit
28 DisplayAddresses, // bool
29 DetachDatabases, // bool
35 /* Migrate settings from wallet.dat after app initialization */
36 bool Upgrade(); /* returns true if settings upgraded */
38 int rowCount(const QModelIndex & parent = QModelIndex()) const;
39 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
40 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
42 /* Explicit getters */
43 qint64 getTransactionFee();
44 bool getMinimizeToTray();
45 bool getMinimizeOnClose();
47 bool getDisplayAddresses();
50 bool bDisplayAddresses;
52 bool fMinimizeOnClose;
54 void displayUnitChanged(int unit);
60 #endif // OPTIONSMODEL_H