<glade-interface>
<widget class="GtkWindow" id="wnd_constructor">
- <property name="width_request">738</property>
- <property name="height_request">689</property>
+ <property name="width_request">799</property>
+ <property name="height_request">742</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Constuctor</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
</child>
<child>
- <widget class="GtkStatusbar" id="statusbar1">
+ <widget class="GtkStatusbar" id="status_bar">
<property name="visible">True</property>
<property name="has_resize_grip">True</property>
</widget>
Gtk::Combo *combo_entry;
Gtk::Dialog *dlg_connect;
Gtk::Label *dlg_label;
+ Gtk::Statusbar *status_bar;
Glib::RefPtr<Gdk::Pixbuf> ico_canio, ico_y, ico_codo, ico_tanque, ico_bomba, ico_exclusa, ico_drain, ico_and, ico_or, ico_not;
Glib::RefPtr<Gdk::Pixbuf> ico_last;
std::list<Gtk::TargetEntry> listTargets;
///Puntero al cuadro de texto de la ventana principal
Gtk::Combo *combo_entry;
+ ///Puntero a la barra de estado
+ Gtk::Statusbar *status_bar;
+
///Puntero a la lista de items
std::list<CItem *> *listaItems;
}
i++;
}
- return true;
+ return true; //out_connected;
}
ConnectorType And::detect_click_position(int _a, int _b)
in_y = y+16;
out_x = x + 48;
out_y = y + 64;
- capacidad = 100;
+ capacidad = 100.0;
+ contenido_inicial = 0;
imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_e.png");
imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_o.png");
null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_null.png");
}
CItem::gate_id = -1;
}
+ char f[10], g[10];
+ Glib::ustring text;
+ sprintf(f,"%.1f ",capacidad);
+ sprintf(g,"%.1f",contenido_inicial);
+ text = name+" Capacidad: ";
+ text += f;
+ text += "Contenido Inicial: ";
+ text += g;
+ status_bar->push ( text, 0);
}
if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==2)){
WorkPlace::pointed = ID;
combo_entry->get_entry()->set_text (name);
workplace->queue_draw();
+ char f[10];
+ Glib::ustring text;
+ sprintf(f,"%.1f",caudal_max);
+ text = name+" Caudal Maximo: ";
+ text += f;
+ status_bar->push ( text, 0);
}
if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==2)){
refGlade->get_widget("quick_btn_open", quick_btn_open);
refGlade->get_widget("edit_menu_delete_all", edit_menu_delete_all);
refGlade->get_widget("btn_find", btn_find);
+ refGlade->get_widget("status_bar", status_bar);
refGlade->get_widget_derived("workplace", workplace); //fixed
current->listaItems = &listaItems;
//Apunto a la lista de items logicos
current->lista_logic_Items = &lista_logic_Items;
+ //Apunto a la barra de estado
+ current->status_bar = status_bar;
// Conecto las señales
current->signal_drag_data_get().connect( SigC::slot(*this, &Constructor::on_item_drag_data_get));
current->signal_drag_begin().connect(SigC::bind( SigC::slot(*this, &Constructor::on_item_drag_begin), current));
a->list_pointed = &list_pointed;
//Apunto a la listaItems.
a->listaItems = &listaItems;
+ //Apunto a la barra de estado
+ a->status_bar = status_bar;
//Apunto a la lista de items logicos
a->lista_logic_Items = &lista_logic_Items;
//Seteo la posicion del item
}
CItem::gate_id = -1;
}
+ Glib::ustring text;
+ if(estado) text = name+" Estado: ABIERTO";
+ else text = name+" Estado: CERRADO";
+ status_bar->push ( text, 0);
}
if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==2)){
}
i++;
}
-
- //FIXME la not tiene que tener una sola salida y una sola entrada!!!!!
- return true;// (cant_in == cant_out );
+ return true;// (in_connected == out_connected ) ==true;
}
ConnectorType Not::detect_click_position(int _a, int _b)
i++;
}
- //FIXME la or tiene n entradas y una salida!!!!!!!!!!!!!!!!!!
- return true;// (cant_in == cant_out );
+
+ return true;// out_connected;
}
ConnectorType Or::detect_click_position(int _a, int _b)
}
CItem::gate_id = -1;
}
+ char f[10];
+ Glib::ustring text;
+ sprintf(f,"%.1f",entrega);
+ text = name+" Entrega: ";
+ text += f;
+ status_bar->push ( text, 0);
}
if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==2)){
combo_entry->get_entry()->set_text (name);
workplace->queue_draw();
WorkPlace::pointed = ID;
+ char f[10];
+ Glib::ustring text;
+ sprintf(f,"%.1f",caudal_max);
+ text = name+" Caudal Maximo: ";
+ text += f;
+ status_bar->push ( text, 0);
}
if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 2)){
combo_entry->get_entry()->set_text (name);
workplace->queue_draw();
WorkPlace::pointed = ID;
+ char f[10];
+ Glib::ustring text;
+ sprintf(f,"%.1f",caudal_max);
+ text = name+" Caudal Maximo: ";
+ text += f;
+ status_bar->push ( text, 0);
}
if ((event->type == GDK_BUTTON_PRESS) && (event->button == 2 )){