Rosetta
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ui::network::Argument Class Referenceabstract

#include <argument.h>

Inheritance diagram for ui::network::Argument:
Inheritance graph
[legend]

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 QWidgetcreate_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_
 

Detailed 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

Constructor & Destructor Documentation

◆ Argument() [1/2]

ui::network::Argument::Argument ( )
protecteddefault

◆ ~Argument()

ui::network::Argument::~Argument ( )
overridedefault

◆ Argument() [2/2]

ui::network::Argument::Argument ( Argument const &  other)
protected

References description_.

Member Function Documentation

◆ clone()

virtual ArgumentSP ui::network::Argument::clone ( ) const
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.

◆ create()

ArgumentSP ui::network::Argument::create ( json const &  j)
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().

◆ create_input_widget()

virtual QWidget* ui::network::Argument::create_input_widget ( QWidget parent = nullptr) const
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.

◆ description()

std::string ui::network::Argument::description ( ) const
inline

References description_.

◆ encode()

virtual json ui::network::Argument::encode ( ) const
pure virtual

◆ init()

void ui::network::Argument::init ( json const &  j)

◆ operator QString()

virtual ui::network::Argument::operator QString ( ) const
pure virtual

Member Data Documentation

◆ description_

std::string ui::network::Argument::description_
private

Referenced by Argument(), description(), and init().


The documentation for this class was generated from the following files: