Somewhat confident now, tested on GNOME+KDE, with all types of transactions. Next...
[novacoin.git] / gui / include / optionsmodel.h
1 #ifndef OPTIONSMODEL_H
2 #define OPTIONSMODEL_H
3
4 #include <QAbstractListModel>
5
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
8    laid out vertically.
9    This can be changed to a tree once the settings become sufficiently
10    complex.
11  */
12 class OptionsModel : public QAbstractListModel
13 {
14     Q_OBJECT
15 public:
16     explicit OptionsModel(QObject *parent = 0);
17
18     enum OptionID {
19         StartAtStartup,
20         MinimizeToTray,
21         MapPortUPnP,
22         MinimizeOnClose,
23         ConnectSOCKS4,
24         ProxyIP,
25         ProxyPort,
26         Fee,
27         OptionIDRowCount
28     };
29
30     int rowCount(const QModelIndex & parent = QModelIndex()) const;
31     QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
32     bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
33
34     /* Explicit getters */
35     qint64 getTransactionFee();
36     bool getMinimizeToTray();
37     bool getMinimizeOnClose();
38 signals:
39
40 public slots:
41
42 };
43
44 #endif // OPTIONSMODEL_H