1 #ifndef CONTRACTFUNCTIONFIELD_H 2 #define CONTRACTFUNCTIONFIELD_H 3 4 #include <QWidget> 5 #include <QList> 6 #include <QVBoxLayout> 7 8 #include <qt/contractutil.h> 9 10 class PlatformStyle; 11 class ABIParam; 12 13 /** 14 * @brief The ABIParamsField class List of parameters for contract function 15 */ 16 class ABIParamsField : public QWidget 17 { 18 Q_OBJECT 19 public: 20 /** 21 * @brief ABIParamsField Constructor 22 * @param parent Parent windows of the GUI control 23 */ 24 explicit ABIParamsField(const PlatformStyle *platformStyle, QWidget *parent = 0); 25 26 /** 27 * @brief updateParamsField Populate the GUI control with function parameters 28 * @param function Contract function interface 29 */ 30 void updateParamsField(const FunctionABI &function); 31 32 /** 33 * @brief getParamValue Get the value of a specific parameter 34 * @param paramID Number of the parameter into the input list (0, 1, ...) 35 * @return Value of the parameter 36 */ 37 QStringList getParamValue(int paramID); 38 39 /** 40 * @brief getParamsValues Get the values of the whole list of input parameters 41 * @return Values of the parameters 42 */ 43 QList<QStringList> getParamsValues(); 44 45 bool isValid(); 46 47 Q_SIGNALS: 48 49 public Q_SLOTS: 50 51 private: 52 QVBoxLayout *m_mainLayout; 53 QList<ABIParam*> m_listParams; 54 const PlatformStyle *m_platfromStyle; 55 }; 56 57 #endif // CONTRACTFUNCTIONFIELD_H 58