|
GnuCash
5.6-150-g038405b370+
|
Represents the public interface for an option. More...
#include <gnc-option.hpp>
Public Member Functions | |
| template<typename OptionType , typename std::enable_if_t< is_OptionClassifier_v< OptionType >, int > = 0> | |
| GncOption (OptionType option) | |
| template<typename ValueType , typename std::enable_if_t<!is_OptionClassifier_v< ValueType >, int > = 0> | |
| GncOption (const char *section, const char *name, const char *key, const char *doc_string, ValueType value, GncOptionUIType ui_type=GncOptionUIType::INTERNAL) | |
| template<typename ValueType > | |
| void | set_value (ValueType value) |
| template<typename ValueType > | |
| void | set_default_value (ValueType value) |
| template<typename ValueType > | |
| ValueType | get_default_value () const |
| template<typename ValueType > | |
| ValueType | get_value () const |
| void | reset_default_value () |
| const std::string & | get_section () const |
| const std::string & | get_name () const |
| const std::string & | get_key () const |
| const std::string & | get_docstring () const |
| void | set_ui_item (GncOptionUIItemPtr &&ui_elem) |
| const GncOptionUIType | get_ui_type () const |
| void | set_ui_item_selectable (bool) const noexcept |
| GncOptionUIItem *const | get_ui_item () const |
| void | set_ui_item_from_option () |
| void | set_option_from_ui_item () |
| void | make_internal () |
| bool | is_internal () |
| void | mark_saved () noexcept |
| Mark the option as needing to be saved. More... | |
| bool | is_dirty () const noexcept |
| bool | is_changed () const noexcept |
| bool | is_multiselect () const noexcept |
| template<typename ValueType > | |
| void | get_limits (ValueType &, ValueType &, ValueType &) const noexcept |
| Implemented only for GncOptionNumericRange. | |
| template<typename ValueType > | |
| bool | validate (ValueType value) const |
| Not implemented for GncOptionValue. More... | |
| uint16_t | num_permissible_values () const |
| Implemented only for GncOptionMultiselectValue. More... | |
| uint16_t | permissible_value_index (const char *value) const |
| Implemented only for GncOptionMultiselectValue. More... | |
| const char * | permissible_value (uint16_t index) const |
| Implemented only for GncOptionMultiselectValue. More... | |
| const char * | permissible_value_name (uint16_t index) const |
| Implemented only for GncOptionMultiselectValue. More... | |
| GList * | account_type_list () const noexcept |
| Implemented only for GncOptionAccountListValue. More... | |
| bool | is_alternate () const noexcept |
| void | set_alternate (bool) noexcept |
| std::string | serialize () const |
| Get a string suitable for storage representing the option's value. More... | |
| bool | deserialize (const std::string &str) |
| Set the option's value from a character sequence. More... | |
| std::istream & | in_stream (std::istream &iss) |
| Set the option's value from an input stream. More... | |
| void | set_widget_changed (std::any cb) |
| std::any & | get_widget_changed () |
Friends | |
| GncOptionVariant & | swig_get_option (GncOption *) |
Represents the public interface for an option.
Polymorphism is provided by a std::variant member containing GncOptionValue types.
Definition at line 136 of file gnc-option.hpp.
1.8.14