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
34 /* Migrate settings from wallet.dat after app initialization */
35 bool Upgrade(); /* returns true if settings upgraded */
37 int rowCount(const QModelIndex & parent = QModelIndex()) const;
38 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
39 bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
41 /* Explicit getters */
42 qint64 getTransactionFee();
43 bool getMinimizeToTray();
44 bool getMinimizeOnClose();
46 bool getDisplayAddresses();
49 bool bDisplayAddresses;
51 bool fMinimizeOnClose;
53 void displayUnitChanged(int unit);
59 #endif // OPTIONSMODEL_H