Definition at line 1888 of file gnc-option-gtk-ui.cpp.
◆ GncGtkBudgetUIItem()
| GncGtkBudgetUIItem::GncGtkBudgetUIItem |
( |
GtkWidget * |
widget | ) |
|
|
inline |
Definition at line 1891 of file gnc-option-gtk-ui.cpp.
1891 :
class GncOptionGtkUIItem Gtk-specific Interface class for Option Widget
◆ set_option_from_ui_item()
| void GncGtkBudgetUIItem::set_option_from_ui_item |
( |
GncOption & |
option | ) |
|
|
inlineoverridevirtualnoexcept |
Implements GncOptionUIItem.
Definition at line 1906 of file gnc-option-gtk-ui.cpp.
1907 {
1908 GtkTreeIter iter;
1909 auto widget{GTK_COMBO_BOX(get_widget())};
1910 if (gtk_combo_box_get_active_iter(widget, &iter))
1911 {
1912 auto tree_model{gtk_combo_box_get_model(widget)};
1913 auto budget{gnc_tree_model_budget_get_budget(tree_model, &iter)};
1914 option.set_value(qof_instance_cast(budget));
1915 }
1916 }
◆ set_ui_item_from_option()
| void GncGtkBudgetUIItem::set_ui_item_from_option |
( |
GncOption & |
option | ) |
|
|
inlineoverridevirtualnoexcept |
Implements GncOptionUIItem.
Definition at line 1893 of file gnc-option-gtk-ui.cpp.
1894 {
1895 GtkTreeIter iter;
1896 auto widget{GTK_COMBO_BOX(get_widget())};
1897 auto instance{option.get_value<
const QofInstance*>()};
1898 if (instance)
1899 {
1900 auto tree_model{gtk_combo_box_get_model(widget)};
1901 if (gnc_tree_model_budget_get_iter_for_budget(tree_model, &iter,
1902 GNC_BUDGET(instance)))
1903 gtk_combo_box_set_active_iter(widget, &iter);
1904 }
1905 }
The documentation for this class was generated from the following file: