update core to d0d80170a2ca73004e08fb85007fe055cbf4e411 (CWallet class)
[novacoin.git] / src / qt / optionsmodel.h
1 #ifndef OPTIONSMODEL_H
2 #define OPTIONSMODEL_H
3
4 #include <QAbstractListModel>
5
6 class CWallet;
7
8 /* Interface from QT to configuration data structure for bitcoin client.
9    To QT, the options are presented as a list with the different options
10    laid out vertically.
11    This can be changed to a tree once the settings become sufficiently
12    complex.
13  */
14 class OptionsModel : public QAbstractListModel
15 {
16     Q_OBJECT
17 public:
18     explicit OptionsModel(CWallet *wallet, QObject *parent = 0);
19
20     enum OptionID {
21         StartAtStartup,
22         MinimizeToTray,
23         MapPortUPnP,
24         MinimizeOnClose,
25         ConnectSOCKS4,
26         ProxyIP,
27         ProxyPort,
28         Fee,
29         OptionIDRowCount
30     };
31
32     int rowCount(const QModelIndex & parent = QModelIndex()) const;
33     QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
34     bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
35
36     /* Explicit getters */
37     qint64 getTransactionFee();
38     bool getMinimizeToTray();
39     bool getMinimizeOnClose();
40 private:
41     // Wallet stores persistent options
42     CWallet *wallet;
43 signals:
44
45 public slots:
46
47 };
48
49 #endif // OPTIONSMODEL_H