]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/itemptywnd.cpp
El Transmitter ya anda bien (se puede escuchar con un nc -p [puerto] -l -u :).
[z.facultad/75.42/plaqui.git] / Constructor / itemptywnd.cpp
index 44d7392aa06d107cdd4f557203d423fffa790f7e..b550ba5567a5769c4aed3f88726f5cdac65faf8d 100644 (file)
@@ -8,7 +8,7 @@ ItemPtyWnd::ItemPtyWnd(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
        refGlade->get_widget("rd_btn_division", rd_btn_division);
        refGlade->get_widget("rd_btn_union", rd_btn_union);
        refGlade->get_widget("lb_type", lb_type);
-       
+       refGlade->get_widget("lb_max_fluid", lb_max_fluid);
        rd_btn_division->signal_clicked().connect(SigC::slot(*this,&ItemPtyWnd::on_rd_btn_division_clicked));
        rd_btn_union->signal_clicked().connect(SigC::slot(*this,&ItemPtyWnd::on_rd_btn_union_clicked));
 }
@@ -37,10 +37,30 @@ void ItemPtyWnd::on_btn_cancel_clicked()
 
 void ItemPtyWnd::on_rd_btn_union_clicked()
 {
+       Glib::ustring name;
+       char char_id[10];
+       sprintf(char_id,"%d",item->get_id());
+       name = "union";
+       name += char_id;
+       item->connect_vec[0].type = IN;
+       item->connect_vec[1].type = IN; 
+       item->connect_vec[2].type = OUT;
+       item->set_name(name);
+       txt_item_name->set_text( item->get_name() );
        item->is_union = true;
 }
 
 void ItemPtyWnd::on_rd_btn_division_clicked()
 {
+       Glib::ustring name;
+       char char_id[10];
+       sprintf(char_id,"%d",item->get_id());
+       name = "division";
+       name += char_id;
+       item->connect_vec[0].type = OUT;
+       item->connect_vec[1].type = OUT;
+       item->connect_vec[2].type = IN;
+       item->set_name(name);
+       txt_item_name->set_text( item->get_name() );
        item->is_union = false;
 }