Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Node/item of the tree model wrapping a variant registry record. More...
#include <bayeux/datatools/configuration/ui/variant_registry_tree_model.h>
Public Types | |
enum | column_index { CI_KEY = 0, CI_TYPE = 1, CI_VALUE = 2, CI_DESCRIPTION = 3 } |
Index of the column for record rendering. More... | |
Public Types inherited from datatools::i_tree_dumpable | |
enum | ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 } |
Enumeration for standard output streams. More... | |
Public Member Functions | |
tree_item (variant_record &vr_, tree_item *parent_=0) | |
Default constructor. More... | |
virtual | ~tree_item () |
Destructor. More... | |
void | append_child (tree_item *child_) |
Append a child item. More... | |
tree_item * | grab_child (int row_) |
Return a mutable child per row. More... | |
const tree_item * | get_child (int row_) const |
Return a non mutable child per row. More... | |
int | get_child_count () const |
Return the number of children. More... | |
int | get_column_count () const |
Return the number of column. More... | |
variant_record & | grab_record () |
Return the mutable handled variant record. More... | |
const variant_record & | get_record () const |
Return the non mutable handled variant record. More... | |
int | get_row () const |
Return the current row for this item. More... | |
bool | has_parent () const |
Check if the node has a parent. More... | |
tree_item * | grab_parent () |
Return the mutable parent item. More... | |
const tree_item * | get_parent () const |
Return the non mutable parent item. More... | |
QVariant | data (int column_) const |
Return the data stored at a given column. More... | |
bool | setData (int column_, const QVariant &value_) |
Set the data stored at a given column. More... | |
bool | unsetData (int column_) |
Unset the data stored at a given column. More... | |
void | set_parent (tree_item *parent_) |
Set the parent tree item. More... | |
void | set_logging (datatools::logger::priority p_) |
Set the logging priority. More... | |
datatools::logger::priority | get_logging () const |
Return the logging priority. More... | |
QList< tree_item * > & | grab_children () |
Return the mutable list of children. More... | |
const QList< tree_item * > & | get_children () const |
Return the non mutable list of children. More... | |
virtual void | tree_dump (std::ostream &out=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const |
Main new interface method for printing. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
Printing with jsonized options. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
Printing with jsonized options. More... | |
void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Friends | |
class | variant_registry_tree_model |
Additional Inherited Members | |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
static const boost::property_tree::ptree & | empty_options () |
static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
static std::ostream & | last_skip_tag (std::ostream &out_) |
static std::ostream & | skip_tag (std::ostream &out_) |
static std::ostream & | last_tag (std::ostream &out_) |
static std::ostream & | tag (std::ostream &out_) |
Node/item of the tree model wrapping a variant registry record.
datatools::configuration::ui::tree_item::tree_item | ( | variant_record & | vr_, |
tree_item * | parent_ = 0 |
||
) |
Default constructor.
|
virtual |
Destructor.
void datatools::configuration::ui::tree_item::append_child | ( | tree_item * | child_ | ) |
Append a child item.
QVariant datatools::configuration::ui::tree_item::data | ( | int | column_ | ) | const |
Return the data stored at a given column.
Return a non mutable child per row.
int datatools::configuration::ui::tree_item::get_child_count | ( | ) | const |
Return the number of children.
Return the non mutable list of children.
int datatools::configuration::ui::tree_item::get_column_count | ( | ) | const |
Return the number of column.
datatools::logger::priority datatools::configuration::ui::tree_item::get_logging | ( | ) | const |
Return the logging priority.
Return the non mutable parent item.
const variant_record& datatools::configuration::ui::tree_item::get_record | ( | ) | const |
Return the non mutable handled variant record.
int datatools::configuration::ui::tree_item::get_row | ( | ) | const |
Return the current row for this item.
tree_item* datatools::configuration::ui::tree_item::grab_child | ( | int | row_ | ) |
Return a mutable child per row.
QList<tree_item *>& datatools::configuration::ui::tree_item::grab_children | ( | ) |
Return the mutable list of children.
tree_item* datatools::configuration::ui::tree_item::grab_parent | ( | ) |
Return the mutable parent item.
variant_record& datatools::configuration::ui::tree_item::grab_record | ( | ) |
Return the mutable handled variant record.
bool datatools::configuration::ui::tree_item::has_parent | ( | ) | const |
Check if the node has a parent.
void datatools::configuration::ui::tree_item::set_logging | ( | datatools::logger::priority | p_ | ) |
Set the logging priority.
void datatools::configuration::ui::tree_item::set_parent | ( | tree_item * | parent_ | ) |
Set the parent tree item.
bool datatools::configuration::ui::tree_item::setData | ( | int | column_, |
const QVariant & | value_ | ||
) |
Set the data stored at a given column.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
bool datatools::configuration::ui::tree_item::unsetData | ( | int | column_ | ) |
Unset the data stored at a given column.
|
friend |