ClienteTFG/controller_install.cpp

26 lines
683 B
C++
Raw Normal View History

2020-05-16 20:52:10 +02:00
#include "controller_install.h"
#include <iostream>
controller_install::controller_install(view_install *vis, session_manager *sesi)
{
this->vis=vis;
this->sesi=sesi;
this->add_controlers();
}
void controller_install::add_controlers(){
vis->m_button.signal_clicked().connect(sigc::mem_fun(this,
&controller_install::on_button_clicked));
}
void controller_install::on_button_clicked(){
std::string text = vis->m_refTextBuffer1->get_text();
/*std::cout << text << std::endl;
this->con->write_string("exec");
this->con->write_string(text);
this->con->read_string(text,10);
std::cout << text << std::endl;*/
this->sesi->install_command(text);
}