]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Client/src/item.cpp
* Se completa el cliente. Ya muestra todas las propiedades y el ultimo item que
[z.facultad/75.42/plaqui.git] / Client / src / item.cpp
index 18c2fee409cbede7e6137e876c44d7879d98d492..4ce5846dfa7d2904b2b4745e49977e42b0d45b26 100644 (file)
@@ -1,37 +1,49 @@
 #include "item.h"
 #include "item.h"
+#include <sstream>
+#include <string>
 
 
-
-Item::Item(Glib::ustring _name):Gtk::DrawingArea()
+ViewItem::ViewItem(Glib::ustring _name):Gtk::EventBox(),image()
 {
 {
-       //image = Gdk::Pixbuf::create_from_file(filename);
        name = _name;
        name = _name;
-       //set_size_request(image->get_width(), image->get_height());
+       set_events(Gdk::BUTTON_PRESS_MASK);
+       actual_flow = -1;
+       add(image);
 }
 
 }
 
-Item::~Item()
+ViewItem::~ViewItem()
 {
 }
 {
 }
-
-bool Item::on_expose_event(GdkEventExpose* event)
+/*
+bool ViewItem::on_expose_event(GdkEventExpose* event)
 {
        image->render_to_drawable ( get_window(),  get_style()->get_black_gc(), 0,  0,  0,  0,  image->get_width() ,image->get_height() , 
                                                                                                                                Gdk::RGB_DITHER_NONE, 0, 0);
        return true;
 }
 {
        image->render_to_drawable ( get_window(),  get_style()->get_black_gc(), 0,  0,  0,  0,  image->get_width() ,image->get_height() , 
                                                                                                                                Gdk::RGB_DITHER_NONE, 0, 0);
        return true;
 }
-
-void Item::set_position(int _x, int _y)
+*/
+void ViewItem::set_position(int _x, int _y)
 {
        x = _x;
        y = _y;
 }
 
 {
        x = _x;
        y = _y;
 }
 
-void Item::set_name(Glib::ustring _name)
+void ViewItem::set_name(Glib::ustring _name)
 {
        name = _name;
 }
 
 {
        name = _name;
 }
 
-Glib::ustring Item::get_name()
+Glib::ustring ViewItem::get_name()
 {
        return name;
 }
 
 {
        return name;
 }
 
+std::string ViewItem::get_actual_flow()
+{
+       std::stringstream ss;
+       std::string s;
+
+       ss << actual_flow;
+       ss >> s;
+       return s;
+}
+