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

#include <argument.h>

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

Public Types

enum class  Kind { file , directory }
 

Public Member Functions

 PathArgument (Kind kind)
 
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...
 
 operator QString () const override
 Encode argument into JSON object. More...
 
- Public Member Functions inherited from ui::network::StringArgument
bool init (json const &)
 
json encode () const override
 Encode argument into JSON object. 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_button_clicked (bool)
 

Private Member Functions

void update_label_text (QString const &) const
 

Private Attributes

QPointer< QLabel > label_
 
Kind kind_ = Kind::file
 

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 Enumeration Documentation

◆ Kind

Enumerator
file 
directory 

Constructor & Destructor Documentation

◆ PathArgument()

ui::network::PathArgument::PathArgument ( Kind  kind)

PathArgument

References kind_.

Member Function Documentation

◆ clone()

ArgumentSP ui::network::PathArgument::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

Reimplemented from ui::network::StringArgument.

◆ create_input_widget()

QWidget * ui::network::PathArgument::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.

Reimplemented from ui::network::StringArgument.

References label_, on_button_clicked(), update_label_text(), ui::network::StringArgument::value(), and w.

◆ init()

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

◆ on_button_clicked

void ui::network::PathArgument::on_button_clicked ( bool  )
privateslot

◆ operator QString()

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

Encode argument into JSON object.

Reimplemented from ui::network::StringArgument.

References evaluate_beta_mutants::file, and value.

◆ update_label_text()

void ui::network::PathArgument::update_label_text ( QString const &  v) const
private

Member Data Documentation

◆ kind_

Kind ui::network::PathArgument::kind_ = Kind::file
private

◆ label_

QPointer<QLabel> ui::network::PathArgument::label_
mutableprivate

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