Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
datatools::configuration::ui::variant_registry_tree_model Class Reference

Qt tree model for configuration variant registry. More...

#include <bayeux/datatools/configuration/ui/variant_registry_tree_model.h>

Inheritance diagram for datatools::configuration::ui::variant_registry_tree_model:
datatools::i_tree_dumpable

Public Slots

void slot_broadcast_data_change (const QModelIndex &, const QModelIndex &)
 Slot: broadcast data change. More...
 
void slot_store_to_restore_buffer (std::string *buffer_=0)
 Slot: store the current status to a buffer. More...
 
void slot_load_from_restore_buffer (const std::string *buffer_=0)
 Slot: load the current status from a buffer. More...
 
void slot_store_to_reg_file (const QString &out_reg_filename_) const
 Slot: store the current status to a file. More...
 
void slot_load_from_reg_file (const QString &in_reg_filename_)
 Slot: load the current status from a file. More...
 

Signals

void sig_read_only_changed (bool)
 
void sig_registry_name_changed ()
 
void sig_logging_changed ()
 
void sig_registry_changed (std::string)
 
void sig_registry_data_changed (std::string, std::string)
 

Public Member Functions

 variant_registry_tree_model (QObject *parent_=0)
 Constructor. More...
 
virtual ~variant_registry_tree_model ()
 Destructor. More...
 
bool has_root () const
 Check if the model has a root. More...
 
void set_root (tree_item *node_)
 Set the root node. More...
 
tree_itemgrab_root ()
 Return the root node/item. More...
 
const tree_itemget_root () const
 Return the root node/item. More...
 
QModelIndex rootIndex () const
 Return the model index associated to the root. More...
 
QModelIndex index (int row_, int column_, const QModelIndex &parent_) const
 Return the model index associated to a given row, column and parent. More...
 
QModelIndex parent (const QModelIndex &child_) const
 Return the parent model index associated to a child model index. More...
 
Qt::ItemFlags flags (const QModelIndex &index_) const
 Return the flags associated to a model index. More...
 
int rowCount (const QModelIndex &parent_) const
 Return the number of rows of a model index. More...
 
int columnCount (const QModelIndex &parent_) const
 Return the number of columns of a model index. More...
 
QVariant data (const QModelIndex &index_, int role_) const
 Return the value of the data associated to a given model index and role. More...
 
bool setData (const QModelIndex &index_, const QVariant &value_, int role_=Qt::EditRole)
 Set the value of the data associated to a given model index and role. More...
 
bool unsetData (const QModelIndex &index_, int role_=Qt::EditRole)
 Unset the value of the data associated to a given model index and role. More...
 
QVariant headerData (int section_, Qt::Orientation orientation_, int role_) const
 Return the value of the header data associated to a given role. More...
 
void construct (variant_registry &registry_, const std::string &registry_name_="")
 Construct the model from a registry and a registry name. More...
 
void set_registry_name (const std::string &registry_name_)
 Set the name of the registry. More...
 
const std::string & get_registry_name () const
 
void set_logging (datatools::logger::priority p_)
 Set the logging priority. More...
 
datatools::logger::priority get_logging () const
 Return the logging priority. More...
 
bool is_read_only () const
 Check the read-only flag. More...
 
void set_read_only (bool)
 Set the read-only flag. More...
 
bool has_registry () const
 Check if a registry is handled. More...
 
variant_registrygrab_registry ()
 Return a reference to the mutable registry. More...
 
const variant_registryget_registry () const
 Return a reference to the non mutable registry. More...
 
bool has_restore_buffer () const
 Check if a restore buffer is available. More...
 
void reset_restore_buffer ()
 Reset the restore buffer is available. 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...
 
tree_itemnode_from_index (const QModelIndex &index_) const
 Return the node/item associated to a given model index. 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
 

Static Public Member Functions

static const std::string & default_top_label ()
 Return the default label for top variant. More...
 
- 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_)
 

Additional Inherited Members

- 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...
 

Detailed Description

Qt tree model for configuration variant registry.

Constructor & Destructor Documentation

◆ variant_registry_tree_model()

datatools::configuration::ui::variant_registry_tree_model::variant_registry_tree_model ( QObject *  parent_ = 0)

Constructor.

◆ ~variant_registry_tree_model()

virtual datatools::configuration::ui::variant_registry_tree_model::~variant_registry_tree_model ( )
virtual

Destructor.

Member Function Documentation

◆ columnCount()

int datatools::configuration::ui::variant_registry_tree_model::columnCount ( const QModelIndex &  parent_) const

Return the number of columns of a model index.

◆ construct()

void datatools::configuration::ui::variant_registry_tree_model::construct ( variant_registry registry_,
const std::string &  registry_name_ = "" 
)

Construct the model from a registry and a registry name.

◆ data()

QVariant datatools::configuration::ui::variant_registry_tree_model::data ( const QModelIndex &  index_,
int  role_ 
) const

Return the value of the data associated to a given model index and role.

◆ default_top_label()

static const std::string& datatools::configuration::ui::variant_registry_tree_model::default_top_label ( )
static

Return the default label for top variant.

◆ flags()

Qt::ItemFlags datatools::configuration::ui::variant_registry_tree_model::flags ( const QModelIndex &  index_) const

Return the flags associated to a model index.

◆ get_logging()

datatools::logger::priority datatools::configuration::ui::variant_registry_tree_model::get_logging ( ) const

Return the logging priority.

◆ get_registry()

const variant_registry& datatools::configuration::ui::variant_registry_tree_model::get_registry ( ) const

Return a reference to the non mutable registry.

◆ get_registry_name()

const std::string& datatools::configuration::ui::variant_registry_tree_model::get_registry_name ( ) const

◆ get_root()

const tree_item* datatools::configuration::ui::variant_registry_tree_model::get_root ( ) const

Return the root node/item.

◆ grab_registry()

variant_registry& datatools::configuration::ui::variant_registry_tree_model::grab_registry ( )

Return a reference to the mutable registry.

◆ grab_root()

tree_item* datatools::configuration::ui::variant_registry_tree_model::grab_root ( )

Return the root node/item.

◆ has_registry()

bool datatools::configuration::ui::variant_registry_tree_model::has_registry ( ) const

Check if a registry is handled.

◆ has_restore_buffer()

bool datatools::configuration::ui::variant_registry_tree_model::has_restore_buffer ( ) const

Check if a restore buffer is available.

◆ has_root()

bool datatools::configuration::ui::variant_registry_tree_model::has_root ( ) const

Check if the model has a root.

◆ headerData()

QVariant datatools::configuration::ui::variant_registry_tree_model::headerData ( int  section_,
Qt::Orientation  orientation_,
int  role_ 
) const

Return the value of the header data associated to a given role.

◆ index()

QModelIndex datatools::configuration::ui::variant_registry_tree_model::index ( int  row_,
int  column_,
const QModelIndex &  parent_ 
) const

Return the model index associated to a given row, column and parent.

◆ is_read_only()

bool datatools::configuration::ui::variant_registry_tree_model::is_read_only ( ) const

Check the read-only flag.

◆ node_from_index()

tree_item* datatools::configuration::ui::variant_registry_tree_model::node_from_index ( const QModelIndex &  index_) const

Return the node/item associated to a given model index.

◆ parent()

QModelIndex datatools::configuration::ui::variant_registry_tree_model::parent ( const QModelIndex &  child_) const

Return the parent model index associated to a child model index.

◆ reset_restore_buffer()

void datatools::configuration::ui::variant_registry_tree_model::reset_restore_buffer ( )

Reset the restore buffer is available.

◆ rootIndex()

QModelIndex datatools::configuration::ui::variant_registry_tree_model::rootIndex ( ) const

Return the model index associated to the root.

◆ rowCount()

int datatools::configuration::ui::variant_registry_tree_model::rowCount ( const QModelIndex &  parent_) const

Return the number of rows of a model index.

◆ set_logging()

void datatools::configuration::ui::variant_registry_tree_model::set_logging ( datatools::logger::priority  p_)

Set the logging priority.

◆ set_read_only()

void datatools::configuration::ui::variant_registry_tree_model::set_read_only ( bool  )

Set the read-only flag.

◆ set_registry_name()

void datatools::configuration::ui::variant_registry_tree_model::set_registry_name ( const std::string &  registry_name_)

Set the name of the registry.

◆ set_root()

void datatools::configuration::ui::variant_registry_tree_model::set_root ( tree_item node_)

Set the root node.

◆ setData()

bool datatools::configuration::ui::variant_registry_tree_model::setData ( const QModelIndex &  index_,
const QVariant &  value_,
int  role_ = Qt::EditRole 
)

Set the value of the data associated to a given model index and role.

◆ sig_logging_changed

void datatools::configuration::ui::variant_registry_tree_model::sig_logging_changed ( )
signal

◆ sig_read_only_changed

void datatools::configuration::ui::variant_registry_tree_model::sig_read_only_changed ( bool  )
signal

◆ sig_registry_changed

void datatools::configuration::ui::variant_registry_tree_model::sig_registry_changed ( std::string  )
signal

◆ sig_registry_data_changed

void datatools::configuration::ui::variant_registry_tree_model::sig_registry_data_changed ( std::string  ,
std::string   
)
signal

◆ sig_registry_name_changed

void datatools::configuration::ui::variant_registry_tree_model::sig_registry_name_changed ( )
signal

◆ slot_broadcast_data_change

void datatools::configuration::ui::variant_registry_tree_model::slot_broadcast_data_change ( const QModelIndex &  ,
const QModelIndex &   
)
slot

Slot: broadcast data change.

◆ slot_load_from_reg_file

void datatools::configuration::ui::variant_registry_tree_model::slot_load_from_reg_file ( const QString &  in_reg_filename_)
slot

Slot: load the current status from a file.

◆ slot_load_from_restore_buffer

void datatools::configuration::ui::variant_registry_tree_model::slot_load_from_restore_buffer ( const std::string *  buffer_ = 0)
slot

Slot: load the current status from a buffer.

◆ slot_store_to_reg_file

void datatools::configuration::ui::variant_registry_tree_model::slot_store_to_reg_file ( const QString &  out_reg_filename_) const
slot

Slot: store the current status to a file.

◆ slot_store_to_restore_buffer

void datatools::configuration::ui::variant_registry_tree_model::slot_store_to_restore_buffer ( std::string *  buffer_ = 0)
slot

Slot: store the current status to a buffer.

◆ tree_dump()

virtual void datatools::configuration::ui::variant_registry_tree_model::tree_dump ( std::ostream &  out = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.

◆ unsetData()

bool datatools::configuration::ui::variant_registry_tree_model::unsetData ( const QModelIndex &  index_,
int  role_ = Qt::EditRole 
)

Unset the value of the data associated to a given model index and role.


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