GnuCash 7574033+
Loading...
Searching...
No Matches
GncOptionUIItem Class Referenceabstract

Holds a pointer to the UI item which will control the option and an enum representing the type of the option for dispatch purposes; all of that happens in gnucash/gnome-utils/dialog-options and gnucash/gnome/business-option-gnome. More...

#include <gnc-option-ui.hpp>

Inheritance diagram for GncOptionUIItem:
GncOptionGtkUIItem GncGtkAccountListUIItem GncGtkAccountSelUIItem GncGtkBooleanUIItem GncGtkBudgetUIItem GncGtkColorUIItem GncGtkCommodityUIItem GncGtkCurrencyUIItem GncGtkDateFormatUIItem GncGtkFontUIItem GncGtkInvReportUIItem GncGtkInvoiceUIItem GncGtkListUIItem GncGtkMultichoiceUIItem GncGtkNumberRangeUIItem GncGtkOwnerUIItem GncGtkPixmapUIItem GncGtkPlotSizeUIItem GncGtkRadioButtonUIItem GncGtkStringUIItem GncGtkTaxTableUIItem GncGtkTextUIItem GncOptionDateUIItem

Public Member Functions

 GncOptionUIItem (GncOptionUIType type)
GncOptionUIType get_ui_type () const noexcept
virtual void set_dirty (bool status) noexcept
virtual bool get_dirty () const noexcept
virtual void set_selectable (bool selectable) const noexcept=0
virtual void clear_ui_item ()=0
virtual void set_ui_item_from_option (GncOption &option) noexcept=0
virtual void set_option_from_ui_item (GncOption &option) noexcept=0

Detailed Description

Holds a pointer to the UI item which will control the option and an enum representing the type of the option for dispatch purposes; all of that happens in gnucash/gnome-utils/dialog-options and gnucash/gnome/business-option-gnome.

This class takes no ownership responsibility, so calling code is responsible for ensuring that the UI_Item is alive. For convenience the public clear_ui_item function can be used as a weak_ptr's destruction callback to ensure that the ptr will be nulled if the ui_item is destroyed elsewhere.

Definition at line 46 of file gnc-option-ui.hpp.

Constructor & Destructor Documentation

◆ GncOptionUIItem()

GncOptionUIItem::GncOptionUIItem ( GncOptionUIType type)
inline

Definition at line 49 of file gnc-option-ui.hpp.

49: m_type{type} {}

Member Function Documentation

◆ clear_ui_item()

virtual void GncOptionUIItem::clear_ui_item ( )
pure virtual

Implemented in GncOptionGtkUIItem.

◆ get_dirty()

virtual bool GncOptionUIItem::get_dirty ( ) const
inlinevirtualnoexcept

Definition at line 53 of file gnc-option-ui.hpp.

53{ return m_dirty; }

◆ get_ui_type()

GncOptionUIType GncOptionUIItem::get_ui_type ( ) const
inlinenoexcept

Definition at line 51 of file gnc-option-ui.hpp.

51{ return m_type; }

◆ set_dirty()

virtual void GncOptionUIItem::set_dirty ( bool status)
inlinevirtualnoexcept

Definition at line 52 of file gnc-option-ui.hpp.

52{ m_dirty = status; }

◆ set_selectable()

virtual void GncOptionUIItem::set_selectable ( bool selectable) const
pure virtualnoexcept

Implemented in GncOptionGtkUIItem.


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