]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/workplace.cpp
Nuevo preview de los caños para el constructor!! ... esperen que ya llegan los
[z.facultad/75.42/plaqui.git] / Constructor / workplace.cpp
index f3874e35cfddbd645119714beb94d1f3b3d3a0ae..519dcd48ac2e17c3da23779804575e048ef7953e 100644 (file)
@@ -1,12 +1,8 @@
-
-
 #include "workplace.h"
-#include "item.h"
+
 WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade):Gtk::Fixed(cobject)
 {
-       
 }
-
 bool WorkPlace::on_expose_event(GdkEventExpose *e)
 {
        int x, y;
@@ -20,3 +16,23 @@ bool WorkPlace::on_expose_event(GdkEventExpose *e)
                }
        return true;
 }
+
+
+bool WorkPlace::on_button_pressed(GdkEventButton *e)
+{
+       return true;
+}
+
+void WorkPlace::delete_item(int id)
+{
+       std::list<CItem*>::iterator i = listaItems->begin();
+       while ( i != listaItems->end() ){
+       CItem *temp = *i;
+               if ( temp->get_id() == id ){
+                       listaItems->erase(i);
+                       delete temp;
+                       break;
+               }
+               i++;
+       }
+}