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

Public Member Functions

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

Constructor & Destructor Documentation

◆ GncGtkDateFormatUIItem()

GncGtkDateFormatUIItem::GncGtkDateFormatUIItem ( GtkWidget *  widget)
inline

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

1686 :
1687 GncOptionGtkUIItem{widget, GncOptionUIType::DATE_FORMAT} {}
class GncOptionGtkUIItem Gtk-specific Interface class for Option Widget

Member Function Documentation

◆ set_option_from_ui_item()

void GncGtkDateFormatUIItem::set_option_from_ui_item ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

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

1698 {
1699 auto widget{GNC_DATE_FORMAT(get_widget())};
1700 GncOptionDateFormat format{
1701 gnc_date_format_get_format(widget),
1702 gnc_date_format_get_months(widget),
1703 gnc_date_format_get_years(widget),
1704 gnc_date_format_get_custom(widget)};
1705 option.set_value(format);
1706 }

◆ set_ui_item_from_option()

void GncGtkDateFormatUIItem::set_ui_item_from_option ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

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

1689 {
1690 auto widget{GNC_DATE_FORMAT(get_widget())};
1691 auto [format, months, years, custom] = option.get_value<GncOptionDateFormat>();
1692 gnc_date_format_set_format(widget, format);
1693 gnc_date_format_set_months(widget, months);
1694 gnc_date_format_set_years(widget, years);
1695 gnc_date_format_set_custom(widget, custom.c_str());
1696 }

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