PulseView  0.3.0
A Qt-based sigrok GUI
pv::binding::InputOutput Class Reference

#include <inputoutput.hpp>

Inheritance diagram for pv::binding::InputOutput:
Collaboration diagram for pv::binding::InputOutput:

Public Member Functions

 InputOutput (const std::map< std::string, std::shared_ptr< sigrok::Option >> &options)
 
const std::map< std::string, Glib::VariantBase > & options () const
 
- Public Member Functions inherited from pv::binding::Binding
const std::vector< std::shared_ptr< prop::Property > > & properties ()
 
void commit ()
 
void add_properties_to_form (QFormLayout *layout, bool auto_commit=false) const
 
QWidget * get_property_form (QWidget *parent, bool auto_commit=false) const
 

Private Member Functions

std::shared_ptr< prop::Propertybind_enum (const QString &name, const std::vector< Glib::VariantBase > &values, prop::Property::Getter getter, prop::Property::Setter setter)
 

Private Attributes

std::map< std::string, Glib::VariantBase > options_
 

Additional Inherited Members

- Static Public Member Functions inherited from pv::binding::Binding
static QString print_gvariant (Glib::VariantBase gvar)
 
- Protected Attributes inherited from pv::binding::Binding
std::vector< std::shared_ptr< prop::Property > > properties_
 

Detailed Description

A binding of glibmm variants for sigrok input and output options.

Definition at line 42 of file inputoutput.hpp.

Constructor & Destructor Documentation

pv::binding::InputOutput::InputOutput ( const std::map< std::string, std::shared_ptr< sigrok::Option >> &  options)

Constructs a new InputOutput binding.

Parameters
optionsthe map of options to use as a template.

Definition at line 61 of file inputoutput.cpp.

Here is the call graph for this function:

Member Function Documentation

shared_ptr< Property > pv::binding::InputOutput::bind_enum ( const QString &  name,
const std::vector< Glib::VariantBase > &  values,
prop::Property::Getter  getter,
prop::Property::Setter  setter 
)
private

A helper function to bind an option list to and enum property.

Parameters
namethe name of the property.
valuesthe list of values.
getterthe getter that will read the values out of the map.
setterthe setter that will set the values into the map.

Definition at line 108 of file inputoutput.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const map< string, VariantBase > & pv::binding::InputOutput::options ( ) const

Gets the map of selected options.

Returns
the options.

Definition at line 103 of file inputoutput.cpp.

Here is the caller graph for this function:

Member Data Documentation

std::map<std::string, Glib::VariantBase> pv::binding::InputOutput::options_
private

The current map of options.

Definition at line 75 of file inputoutput.hpp.


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