Rosetta
|
#include <argument.h>
Public Member Functions | |
~Argument () override | |
std::string | description () const |
virtual ArgumentSP | clone () const =0 |
clone Argument. Note that underlying QObject is not clonned so you will need to re-connect any signal/slots on a new instance manually More... | |
virtual QWidget * | create_input_widget (QWidget *parent=nullptr) const =0 |
Create widget that could be used to edit Argument value. Created widget will be connection to this instance so this->value could be updated transperently. More... | |
virtual json | encode () const =0 |
Encode argument into JSON object. More... | |
virtual | operator QString () const =0 |
qDebug helper More... | |
void | init (json const &) |
Static Public Member Functions | |
static ArgumentSP | create (json const &) |
Protected Member Functions | |
Argument () | |
Argument (Argument const &) | |
Private Attributes | |
std::string | description_ |
Argument specification for HAL RPC, will be used as prototype
when constructing particular Call we use protected inheritance from QObject so derived classes could create slots if they need to
|
protecteddefault |
|
overridedefault |
|
protected |
References description_.
|
pure virtual |
clone Argument. Note that underlying QObject is not clonned so you will need to re-connect any signal/slots on a new instance manually
Implemented in ui::network::PathArgument, ui::network::StringArgument, ui::network::FloatArgument, ui::network::IntegerArgument, and ui::network::BooleanArgument.
|
static |
factory method: tries to analyze JSON object and build on of Argument's derived class from it. return null on failure
References ui::network::PathArgument::directory, ui::network::PathArgument::file, plot::function, create_a3b_hbs::j, and basic::options::OptionKeys::ddg::json.
Referenced by ui::network::Bowman::on_bowman_thread_specification_received().
|
pure virtual |
Create widget that could be used to edit Argument value. Created widget will be connection to this
instance so this->value
could be updated transperently.
Implemented in ui::network::PathArgument, ui::network::StringArgument, ui::network::FloatArgument, ui::network::IntegerArgument, and ui::network::BooleanArgument.
|
inline |
References description_.
|
pure virtual |
Encode argument into JSON object.
Implemented in ui::network::StringArgument, ui::network::FloatArgument, ui::network::IntegerArgument, and ui::network::BooleanArgument.
void ui::network::Argument::init | ( | json const & | j | ) |
References description_, and create_a3b_hbs::j.
Referenced by ui::network::BooleanArgument::init(), ui::network::IntegerArgument::init(), ui::network::FloatArgument::init(), and ui::network::StringArgument::init().
|
pure virtual |
qDebug helper
Implemented in ui::network::PathArgument, ui::network::StringArgument, ui::network::FloatArgument, ui::network::IntegerArgument, and ui::network::BooleanArgument.
|
private |
Referenced by Argument(), description(), and init().