Fabcoin Core  0.16.2
P2P Digital Currency
tokenamountfield.h
Go to the documentation of this file.
1 #ifndef TOKENAMOUNTFIELD_H
2 #define TOKENAMOUNTFIELD_H
3 
4 #include <amount.h>
5 #include <QWidget>
6 
7 #include <boost/multiprecision/cpp_int.hpp>
8 using namespace boost::multiprecision;
9 
10 class TokenAmountSpinBox;
11 
14 class TokenAmountField : public QWidget
15 {
16  Q_OBJECT
17 
18  Q_PROPERTY(int256_t value READ value WRITE setValue NOTIFY valueChanged USER true)
19 
20 public:
21  explicit TokenAmountField(QWidget *parent = 0);
22  int256_t value(bool *value=0) const;
23  void setValue(const int256_t& value);
24 
26  void setSingleStep(const int256_t& step);
27 
29  void setReadOnly(bool fReadOnly);
30 
32  void setValid(bool valid);
34  bool validate();
35 
37  void clear();
38 
40  void setEnabled(bool fEnabled);
41 
42  int256_t minimum() const;
43  void setMinimum(const int256_t& min);
44 
45  void setTotalSupply(const int256_t &value);
46  void setDecimalUnits(int value);
47 
48  QString text() const;
49 
50 Q_SIGNALS:
51  void valueChanged();
52 
53 protected:
55  bool eventFilter(QObject *object, QEvent *event);
56 
57 public Q_SLOTS:
58 
59 private:
61 };
62 
63 #endif // TOKENAMOUNTFIELD_H
QSpinBox that uses fixed-point numbers internally and uses our own formatting/parsing functions...
TokenAmountSpinBox * amount
ExecStats::duration min
Definition: ExecStats.cpp:35
Widget for entering token amounts.