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

Public Member Functions

 GncGtkCurrencyUIItem (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 299 of file gnc-option-gtk-ui.cpp.

Constructor & Destructor Documentation

◆ GncGtkCurrencyUIItem()

GncGtkCurrencyUIItem::GncGtkCurrencyUIItem ( GtkWidget *  widget)
inline

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

302 :
303 GncOptionGtkUIItem{widget, GncOptionUIType::CURRENCY} {}
class GncOptionGtkUIItem Gtk-specific Interface class for Option Widget

Member Function Documentation

◆ set_option_from_ui_item()

void GncGtkCurrencyUIItem::set_option_from_ui_item ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

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

313 {
314 auto widget{GNC_CURRENCY_EDIT(get_widget())};
315 auto currency = gnc_currency_edit_get_currency(widget);
316 option.set_value<gnc_commodity*>(currency);
317 }
gnc_commodity * gnc_currency_edit_get_currency(GNCCurrencyEdit *gce)
Retrieve the displayed currency of the widget.

◆ set_ui_item_from_option()

void GncGtkCurrencyUIItem::set_ui_item_from_option ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

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

305 {
306 auto widget{GNC_CURRENCY_EDIT(get_widget())};
307 auto currency{option.get_value<gnc_commodity*>()};
308
309 if (currency)
310 gnc_currency_edit_set_currency(widget, GNC_COMMODITY(currency));
311 }
void gnc_currency_edit_set_currency(GNCCurrencyEdit *gce, const gnc_commodity *currency)
Set the widget to display a certain currency name.

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