Rosetta
Public Member Functions | Private Slots | Private Attributes | List of all members
ui::network::StringArgument Class Reference

#include <argument.h>

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

Public Member Functions

bool init (json const &)
 
ArgumentSP clone () const override
 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...
 
QWidgetcreate_input_widget (QWidget *parent=nullptr) const override
 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...
 
json encode () const override
 Encode argument into JSON object. More...
 
 operator QString () const override
 qDebug helper More...
 
void value (std::string const &v)
 
std::string value () const
 
std::string get_default () const
 
- Public Member Functions inherited from ui::network::Argument
 ~Argument () override
 
std::string description () const
 
void init (json const &)
 

Private Slots

void on_text_changed (QString const &)
 

Private Attributes

std::string value_
 
std::string default_
 

Additional Inherited Members

- Static Public Member Functions inherited from ui::network::Argument
static ArgumentSP create (json const &)
 
- Protected Member Functions inherited from ui::network::Argument
 Argument ()
 
 Argument (Argument const &)
 

Member Function Documentation

◆ clone()

ArgumentSP ui::network::StringArgument::clone ( ) const
overridevirtual

clone Argument. Note that underlying QObject is not clonned so you will need to re-connect any signal/slots on a new instance manually

Implements ui::network::Argument.

Reimplemented in ui::network::PathArgument.

◆ create_input_widget()

QWidget * ui::network::StringArgument::create_input_widget ( QWidget parent = nullptr) const
overridevirtual

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.

Implements ui::network::Argument.

Reimplemented in ui::network::PathArgument.

References on_text_changed(), value_, and w.

◆ encode()

json ui::network::StringArgument::encode ( ) const
overridevirtual

Encode argument into JSON object.

Implements ui::network::Argument.

References basic::options::OptionKeys::ddg::json, and value_.

◆ get_default()

std::string ui::network::StringArgument::get_default ( ) const
inline

References default_.

◆ init()

bool ui::network::StringArgument::init ( json const &  j)

◆ on_text_changed

void ui::network::StringArgument::on_text_changed ( QString const &  text)
privateslot

◆ operator QString()

ui::network::StringArgument::operator QString ( ) const
overridevirtual

qDebug helper

Implements ui::network::Argument.

Reimplemented in ui::network::PathArgument.

◆ value() [1/2]

std::string ui::network::StringArgument::value ( ) const
inline

◆ value() [2/2]

void ui::network::StringArgument::value ( std::string const &  v)
inline

Member Data Documentation

◆ default_

std::string ui::network::StringArgument::default_
private

Referenced by get_default(), and init().

◆ value_

std::string ui::network::StringArgument::value_
private

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