]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWt.h
#3472 merge vtk8itk5wx3-mingw64
[bbtk.git] / kernel / src / bbtkWt.h
index 0828d0b9f0bbb36b797e1cca3682f646306fa59b..011f5980a8f1d4a014c56afb81c67e0a009f5441 100644 (file)
 // SIGNAL/SLOT MECHANISM 
 // FOR bbtk WINDOWS CREATION/DESTRUCTION OBSERVATION 
 // BBTKWXSIG
-#include <boost/signal.hpp>
+
+//EED 2020-03-17
+//#include <boost/signal.hpp>
+#include <boost/signals2/signal.hpp>
+
 #include <boost/bind.hpp>
 
+//typedef boost::signals::trackable SignalObserver;
+// \BBTKWXSIG
+//===========================================================================
+
+
+//===========================================================================
+// Wt headers
+// DEFINIR LOS HEADERS Wt que se necesitan  *-*-*-*-*-*-*-*-*-*
+#ifdef USE_WT
 
 //TODO Include libs in the CMake escription
 #include <Wt/WApplication>
 #include <Wt/WFileUpload>
 #include <Wt/WLength>
 
-//typedef boost::signals::trackable SignalObserver;
-// \BBTKWXSIG
-//===========================================================================
-
 
-//===========================================================================
-// Qt headers
-// DEFINIR LOS HEADERS Wt que se necesitan  *-*-*-*-*-*-*-*-*-*
-/*
-#ifdef USE_WT
-#include "qwidget.h"
-// EO Qt headers
+#else //USE_WT
 
-#else //USE_QT
+#endif // EO USE_WT
 
-// define QWidget
-typedef void QWidget;
-typedef void QBusyCursor;
 
-#endif // EO USE_WXWIDGETS
 
-//-*-*-*-* JFGA 
 
-*/
 #ifdef USE_WT
 
 
@@ -152,8 +149,14 @@ namespace bbtk
     // BBTKWXSIG
     // The keyword 'signals' is also a macro in qt
     //    typedef boost::signals::trackable SignalObserver;
-    typedef boost::signals::trackable SignalObserver;
-    typedef boost::signal<void ()>  Signal_type;
+
+//EED 2020-04-21
+//    typedef boost::signals::trackable SignalObserver;
+//    typedef boost::signal<void ()>  Signal_type;
+      
+    typedef boost::signals2::trackable SignalObserver;
+    typedef boost::signals2::signal<void ()>  Signal_type;
+
     typedef Signal_type::slot_function_type Slot_function_type;
     // \BBTKWXSIG
                
@@ -175,10 +178,13 @@ namespace bbtk
 
 
     static void ProcessPendingEvents();
+
+#ifdef USE_WT
     /// Sets the parent of all bbtk windows
     static void SetTopWindow(Wt::WContainerWidget*);
     /// Returns the parent of all bbtk windows 
     static Wt::WContainerWidget* GetTopWindow();
+#endif // EO USE_WT
 
     
     static void IncNbWindowsAlive();