GnuCash 7574033+
Loading...
Searching...
No Matches
GncGtkInvReportUIItem Class Reference
Inheritance diagram for GncGtkInvReportUIItem:
GncOptionGtkUIItem GncOptionUIItem

Public Member Functions

 GncGtkInvReportUIItem (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 188 of file business-options-gnome.cpp.

Constructor & Destructor Documentation

◆ GncGtkInvReportUIItem()

GncGtkInvReportUIItem::GncGtkInvReportUIItem ( GtkWidget * widget)
inline

Definition at line 191 of file business-options-gnome.cpp.

191 :
192 GncOptionGtkUIItem(widget, GncOptionUIType::INV_REPORT) {}

Member Function Documentation

◆ set_option_from_ui_item()

void GncGtkInvReportUIItem::set_option_from_ui_item ( GncOption & option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

Definition at line 209 of file business-options-gnome.cpp.

210 {
211 auto report_guid_name = gnc_report_combo_get_active_guid_name (GNC_REPORT_COMBO(get_widget()));
212 option.set_value(std::string{report_guid_name});
213 g_free (report_guid_name);
214 }

◆ set_ui_item_from_option()

void GncGtkInvReportUIItem::set_ui_item_from_option ( GncOption & option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

Definition at line 193 of file business-options-gnome.cpp.

194 {
195 std::string guid_string;
196 auto str{option.get_value<std::string>()};
197
198 if (str.empty())
199 {
200 static const std::string default_guid_string(gnc_get_builtin_default_invoice_print_report ());
201 guid_string = default_guid_string + "/ ";
202 }
203 else
204 guid_string = str;
205
206 gnc_report_combo_set_active_guid_name (GNC_REPORT_COMBO(get_widget()),
207 guid_string.c_str());
208 }

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