GnuCash c935c2f+
Loading...
Searching...
No Matches
Public Member Functions
GncGtkCommodityUIItem Class Reference
Inheritance diagram for GncGtkCommodityUIItem:
GncOptionGtkUIItem GncOptionUIItem

Public Member Functions

 GncGtkCommodityUIItem (GtkWidget *widget)
 
void set_ui_item_from_option (GncOption &option) noexcept override
 
void set_option_from_ui_item (GncOption &option) noexcept override
 
- Public Member Functions inherited from GncOptionGtkUIItem
 GncOptionGtkUIItem (GtkWidget *widget, GncOptionUIType type)
 
 GncOptionGtkUIItem (const GncOptionGtkUIItem &item)
 
 GncOptionGtkUIItem (GncOptionGtkUIItem &&)=default
 
virtual void set_selectable (bool) const noexcept override
 Control wether the widget is sensitive.
 
void clear_ui_item () override
 Clear the data from the widget.
 
void set_widget (GtkWidget *widget)
 
virtual GtkWidget * get_widget () const
 
virtual SCM get_widget_scm_value (const GncOption &) const
 
- Public Member Functions inherited from GncOptionUIItem
 GncOptionUIItem (GncOptionUIType type)
 
GncOptionUIType get_ui_type () const noexcept
 
virtual void set_dirty (bool status) noexcept
 
virtual bool get_dirty () const noexcept
 

Detailed Description

Definition at line 334 of file gnc-option-gtk-ui.cpp.

Constructor & Destructor Documentation

◆ GncGtkCommodityUIItem()

GncGtkCommodityUIItem::GncGtkCommodityUIItem ( GtkWidget *  widget)
inline

Definition at line 337 of file gnc-option-gtk-ui.cpp.

337 :
338 GncOptionGtkUIItem{widget, GncOptionUIType::COMMODITY} {}
class GncOptionGtkUIItem Gtk-specific Interface class for Option Widget

Member Function Documentation

◆ set_option_from_ui_item()

void GncGtkCommodityUIItem::set_option_from_ui_item ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

Definition at line 347 of file gnc-option-gtk-ui.cpp.

348 {
349 auto widget{GNC_GENERAL_SELECT(get_widget())};
350 auto commodity{gnc_general_select_get_selected(widget)};
351 option.set_value<gnc_commodity*>(GNC_COMMODITY(commodity));
352 }

◆ set_ui_item_from_option()

void GncGtkCommodityUIItem::set_ui_item_from_option ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

Definition at line 339 of file gnc-option-gtk-ui.cpp.

340 {
341 auto widget{GNC_GENERAL_SELECT(get_widget())};
342 auto commodity{option.get_value<gnc_commodity*>()};
343
344 if (commodity)
345 gnc_general_select_set_selected(widget, GNC_COMMODITY(commodity));
346 }

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