2020-05-20 00:09:18 +02:00
|
|
|
#ifndef CONTROLLER_USER_INFO_H
|
|
|
|
#define CONTROLLER_USER_INFO_H
|
|
|
|
|
|
|
|
#include "view_user_info.h"
|
|
|
|
#include "session_manager.h"
|
|
|
|
|
|
|
|
class controller_user_info
|
|
|
|
{
|
|
|
|
public:
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief controller_user_info
|
|
|
|
* Controller that expose users info
|
|
|
|
* @param view View to controle
|
|
|
|
* @param session Model that have funcionality
|
|
|
|
* @param container Container of the aplication
|
|
|
|
*/
|
2020-05-23 19:59:55 +02:00
|
|
|
controller_user_info(view_user_info *view, session_manager *session, Gtk::Window *container);
|
2020-05-20 00:09:18 +02:00
|
|
|
private:
|
|
|
|
view_user_info *view;
|
|
|
|
session_manager *sesion;
|
2020-05-23 19:59:55 +02:00
|
|
|
Gtk::Window *container;
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief load_info
|
|
|
|
* Load the info in the table
|
|
|
|
*/
|
2020-05-20 00:09:18 +02:00
|
|
|
void load_info();
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief add_controlers
|
|
|
|
* Add controlers to the bottons
|
|
|
|
*/
|
2020-05-23 19:59:55 +02:00
|
|
|
void add_controlers();
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief on_button_clicked_add
|
|
|
|
* Button add function
|
|
|
|
*/
|
2020-05-23 19:59:55 +02:00
|
|
|
void on_button_clicked_add();
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief on_button_clicked_remove
|
|
|
|
* button remove function
|
|
|
|
*/
|
2020-05-23 19:59:55 +02:00
|
|
|
void on_button_clicked_remove();
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief get_first
|
|
|
|
* Get the firs string until the special character ":"
|
|
|
|
* @param info String to divide, the string have substract the string returned, and the first ":"
|
|
|
|
* @return The string substracted
|
|
|
|
*/
|
2020-05-20 00:09:18 +02:00
|
|
|
std::string get_first(std::string &info);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLLER_USER_INFO_H
|