Revert "Use standard C99 (and Qt) types for 64-bit integers"
[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, // bool
22         MinimizeToTray, // bool
23         MapPortUPnP, // bool
24         MinimizeOnClose, // bool
25         ConnectSOCKS4, // bool
26         ProxyIP, // QString
27         ProxyPort, // QString
28         Fee, // qint64
29         DisplayUnit, // BitcoinUnits::Unit
30         DisplayAddresses, // bool
31         OptionIDRowCount
32     };
33
34     int rowCount(const QModelIndex & parent = QModelIndex()) const;
35     QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
36     bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
37
38     /* Explicit getters */
39     qint64 getTransactionFee();
40     bool getMinimizeToTray();
41     bool getMinimizeOnClose();
42     int getDisplayUnit();
43     bool getDisplayAddresses();
44 private:
45     // Wallet stores persistent options
46     CWallet *wallet;
47     int nDisplayUnit;
48     bool bDisplayAddresses;
49 signals:
50     void displayUnitChanged(int unit);
51
52 public slots:
53
54 };
55
56 #endif // OPTIONSMODEL_H