Remove unused compatibility code.
[novacoin.git] / src / qt / 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
16 public:
17     explicit OptionsModel(QObject *parent = 0);
18
19     enum OptionID {
20         StartAtStartup,    // bool
21         MinimizeToTray,    // bool
22         MapPortUPnP,       // bool
23         MinimizeOnClose,   // bool
24         ProxyUse,          // bool
25         ProxyIP,           // QString
26         ProxyPort,         // int
27         ProxySocksVersion, // int
28         TorUse,            // bool
29         TorIP,             // QString
30         TorPort,           // int
31         TorOnly,           // bool
32         TorName,           // QString
33         Fee,               // qint64
34         DisplayUnit,       // BitcoinUnits::Unit
35         DisplayAddresses,  // bool
36         ThirdPartyTxUrls,  // QString
37         DetachDatabases,   // bool
38         Language,          // QString
39         CoinControlFeatures, // bool
40         OptionIDRowCount,
41     };
42
43     void Init();
44
45     int rowCount(const QModelIndex & parent = QModelIndex()) const;
46     QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
47     bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
48
49     /* Explicit getters */
50     qint64 getTransactionFee();
51     bool getMinimizeToTray();
52     bool getMinimizeOnClose();
53     int getDisplayUnit();
54     bool getDisplayAddresses();
55     bool getCoinControlFeatures();
56     QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; }
57     QString getLanguage() { return language; }
58
59 private:
60     int nDisplayUnit;
61     bool bDisplayAddresses;
62     bool fMinimizeToTray;
63     bool fMinimizeOnClose;
64     bool fCoinControlFeatures;
65     QString language;
66     QString strThirdPartyTxUrls;
67
68 signals:
69     void displayUnitChanged(int unit);
70     void transactionFeeChanged(qint64);
71     void coinControlFeaturesChanged(bool);
72 };
73
74 #endif // OPTIONSMODEL_H