X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/8cd57f66ca12d475f479f0f816270f9833926088..a0481d50f6da9cac5efd3502c3657b3fc461ec0d:/Client/src/dlg_conectar.cpp diff --git a/Client/src/dlg_conectar.cpp b/Client/src/dlg_conectar.cpp index 8af1482..47d2c86 100644 --- a/Client/src/dlg_conectar.cpp +++ b/Client/src/dlg_conectar.cpp @@ -1,32 +1,40 @@ #include "dlg_conectar.h" -DlgConectar::DlgConectar(BaseObjectType *co, const Glib::RefPtr &rg):Gtk::Window(co),refXml(rg) +DlgConectar::DlgConectar(BaseObjectType *co, const Glib::RefPtr &rg):Gtk::Dialog(co),refXml(rg) { - Gtk::Button *btn_ok=0, *btn_cancel=0; - refXml->get_widget("btn_ok", btn_ok); - refXml->get_widget("btn_cancel", btn_cancel); + ok = cancel = 0; + refXml->get_widget("btn_cancel", cancel); + refXml->get_widget("btn_ok", ok); - btn_ok->signal_clicked().connect( SigC::slot(*this, &DlgConectar::on_btn_ok_clicked) ); - btn_cancel->signal_clicked().connect( SigC::slot(*this, &DlgConectar::on_btn_cancel_clicked) ); + cancel->signal_clicked().connect( SigC::slot(*this, &DlgConectar::on_cancel_clicked) ); } DlgConectar::~DlgConectar() { } -void DlgConectar::on_btn_ok_clicked() +void DlgConectar::on_cancel_clicked() { - /* Aca tengo que iniciarl el thread que se trata de conectar - * al servidor, que descarga el modelo e inicia la - * actualizacion. - * - * Tendre que ver como se hara toda la comunicacion - */ + hide(); } -void DlgConectar::on_btn_cancel_clicked() +Gtk::Button *DlgConectar::get_ok_button() { - hide(); + return ok; +} + +Glib::ustring DlgConectar::get_server_name() +{ + Gtk::Entry *server_name = 0; + refXml->get_widget("server_name", server_name); + return server_name->get_text(); +} + +int DlgConectar::get_server_port() +{ + Gtk::SpinButton *server_port = 0; + refXml->get_widget("server_port", server_port); + return server_port->get_value_as_int(); }