4 ViewPump::ViewPump(Glib::ustring _name, int orientacion):ViewItem(_name)
8 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/bomba_e.png");
19 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/bomba_o.png");
38 bool ViewPump::on_image_expose_event(GdkEventExpose *e)
40 Glib::RefPtr<Gdk::Colormap> colormap = Gtk::Widget::get_default_colormap();
41 if (!colormap->alloc_color(color, true, true)) {
42 std::cout << name << ": Error alocando color!" << std::endl;
45 gc->set_foreground(color);
46 gc->set_background(color);
47 gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
48 if (actual_flow == 0) return true;
51 image.get_window()->draw_arc(gc, 1, 8, 8, 16, 16, 0, 360*64);
52 image.get_window()->draw_line(gc, 16, 16, 96, 16);
55 image.get_window()->draw_arc(gc, 1, 72, 8, 16, 16, 0, 360*64);
56 image.get_window()->draw_line(gc, 80, 16, 0, 16);