You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

optionsmodel.h 1.2KB

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