first commit, base client with gtk3
This commit is contained in:
24
controlador.cpp
Normal file
24
controlador.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "controlador.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
controlador::controlador(vista *vis, conexion *con)
|
||||
{
|
||||
this->vis=vis;
|
||||
this->con=con;
|
||||
this->add_controlers();
|
||||
}
|
||||
|
||||
void controlador::add_controlers(){
|
||||
vis->m_button.signal_clicked().connect(sigc::mem_fun(this,
|
||||
&controlador::on_button_clicked));
|
||||
}
|
||||
|
||||
void controlador::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;
|
||||
}
|
||||
Reference in New Issue
Block a user