C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
ModelBargraph Class Reference

the Model used by Bargraph GraphicWidget More...

#include <widget_bargraph.h>

Inheritance diagram for ModelBargraph:
Inheritance graph
Collaboration diagram for ModelBargraph:
Collaboration graph

Public Member Functions

std::vector< int > get_values ()
 get internal values of the bargraph model
 
void update_values (std::vector< int > values)
 update internal values of the bargraph and set_change_flag
 
 ModelBargraph (size_t number_of_bar, int min_value, int max_value)
 conctructor of ModelBargraph
 
 ~ModelBargraph ()
 Destroy the Model Bargraph object.
 
- Public Member Functions inherited from Model
 Model ()
 Construct the Model object.
 
 ~Model ()
 Destroy the Model object.
 
void update_attached_widgets (Widget *new_widget)
 add a new widget to the set of attached_widgets
 
int get_number_of_attached_widget ()
 get the number of attached widgets
 
bool has_changed ()
 get the change flag status
 
void set_change_flag ()
 Set the change flag object to true.
 
void draw_widget_done ()
 Set the change flag object to false.
 
uint32_t get_time_since_last_change ()
 compute time since the last status change
 
virtual void draw_refresh_all_attached_widgets ()
 update drawing for each attached widgets
 

Public Attributes

size_t number_of_bar
 the number of bar in the bargraph (and the number of values)
 
int min_value
 the min value of the range of values
 
int max_value
 the max value of the range of values
 

Protected Attributes

std::vector< int > values
 the vector of values displayed by the bargraph
 
- Protected Attributes inherited from Model
std::set< Widget * > attached_widgets
 the set of widgets that are in charge of viewing this model.
 

Detailed Description

the Model used by Bargraph GraphicWidget

Constructor & Destructor Documentation

◆ ModelBargraph()

ModelBargraph::ModelBargraph ( size_t number_of_bar,
int min_value,
int max_value )

conctructor of ModelBargraph

Parameters
number_of_barthe number of bar in the bargraph
min_valuethe min value of the range of values
max_valuethe max value of the range of values
Here is the call graph for this function:

Member Function Documentation

◆ get_values()

std::vector< int > ModelBargraph::get_values ( )

get internal values of the bargraph model

Returns
internal values

◆ update_values()

void ModelBargraph::update_values ( std::vector< int > values)

update internal values of the bargraph and set_change_flag

Parameters
values
Here is the call graph for this function:

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