]> Creatis software - bbtk.git/commitdiff
2498 BBTK FeatureNewNormal wt-version kernel
authorFelipe Gonzalez <gonzalez@ei-ed-345.creatis.insa-lyon.fr>
Fri, 19 Jun 2015 08:31:48 +0000 (10:31 +0200)
committerFelipe Gonzalez <gonzalez@ei-ed-345.creatis.insa-lyon.fr>
Fri, 19 Jun 2015 08:31:48 +0000 (10:31 +0200)
kernel/src/CMakeLists.txt
kernel/src/bbtkWt.h
kernel/src/bbtkWtBlackBox.cxx
kernel/src/bbtkWtBlackBox.h
packages/itk/src/bbitkImageWriter.cxx
packages/vtk/src/bbvtkPolyDataWriterPlus.cxx

index ae687e5..44e3b2c 100644 (file)
@@ -185,8 +185,9 @@ IF(BBTK_USE_QT)
 # *********Missing if conditional Wt********
    #find_package(Boost COMPONENTS system thread signals)
    #find_library(wt wt)
+   #find_library(wtext wtext)
    #find_library(wthttp wthttp)
-   INCLUDE_DIRECTORIES(/usr/local/include/Wt)
+   INCLUDE_DIRECTORIES(/usr/local/lib/)
 
 
 ENDIF(BBTK_USE_QT)
index 299878e..0828d0b 100644 (file)
@@ -71,6 +71,9 @@
 #include <Wt/WRadioButton>
 #include <Wt/Ext/Splitter>
 #include <Wt/WTabWidget>
+#include <Wt/WFileUpload>
+#include <Wt/WLength>
+
 //typedef boost::signals::trackable SignalObserver;
 // \BBTKWXSIG
 //===========================================================================
@@ -153,7 +156,7 @@ namespace bbtk
     typedef boost::signal<void ()>  Signal_type;
     typedef Signal_type::slot_function_type Slot_function_type;
     // \BBTKWXSIG
-
+               
     /*
     static void ResetCursor();
     static void BeginBusyCursor(); 
@@ -199,6 +202,9 @@ namespace bbtk
   //==================================================================
   
 #ifdef USE_WT
+
+
+       static std::string jScript;
   //==================================================================
   /// Conversion std::string to wxString 
   inline Wt::WString std2wt(const std::string& s)
index 93ef127..d94fa51 100644 (file)
 //#include "bbtkData.h"
 //#include "bbtkFactory.h"
 
-static std::string jScriptLine;
+
+
 
 namespace bbtk
 {
+
+ 
+/*     
+       class jScript
+       {
+               public:
+                       jScript();
+                       std::string jScriptLine;
+       };
+*/
   //=========================================================================
   // wtData structure
   //=========================================================================
@@ -68,13 +79,24 @@ namespace bbtk
                Wt::WString title;              
        };
 
+/*     jScript::jScript()
+       {
+               jScriptLine = "";
+       }
+*/
+//     static bbtk::jScript* js  = new bbtk::jScript();
        static wtData myWtData;
+       static bool loadedJS;
+       //static std::string* jss;
+       
+       
 
   //=========================================================================
   // javaScript Line
   //=========================================================================
        //Contains all the JS statements needed for the bbwt.
        
+       
   //=========================================================================
   // WxFrame
   //=========================================================================
@@ -90,14 +112,14 @@ namespace bbtk
                        const Wt::WEnvironment& env                     
            );
     ~WtWFrame();
-
+               
        
        
        WtBlackBox::WeakPointer mBox; 
-
+       
 
   };   
-
+       
 
        WtWFrame::WtWFrame(
                        const Wt::WEnvironment& env
@@ -106,10 +128,20 @@ namespace bbtk
     Wt::WApplication(env)
   {  
                //std::cout<<"Adding JavaScript --  DELETE ME -- bbtkWtBlackBox.cxx"<<std::endl;
-               this->require("js/xtk.js");
-               //this->require("js/demo/demo2.js");
+               //this->require("/home/gonzalez/Documents/CREATOOLS/wt_library/wt/bbtk_wt_PKG/src/js/xtk.js");
+
+               //this->require("http://get.goXTK.com/xtk.js");
                //this->useStyleSheet("css/demo.css");
-               jScriptLine = "";
+               
+       //      this->require("http://get.goXTK.com/xtk_edge.js");
+       this->require("http://get.goXTK.com/xtk_xdat.gui.js");
+       this->require("xtk.js");
+       //this->require("xtk_xdat.gui.js");
+  this->useStyleSheet("style.css");
+  
+
+               std::cout<<"Cargado------------           "<<loadedJS<<std::endl;
+
                mBox = myWtData.b;
                if(!myWtData.parent)
                        {
@@ -126,8 +158,11 @@ namespace bbtk
                myWtData.b->bbUserCreateWidget(myCont);
                root()->addWidget(myWtData.parent);
                //bbmWindow = myCont;
+               this->refresh();
+               //jss = WtBlackBox::jScript;
                std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.................80%"<<std::endl;
-               this->doJavaScript(jScriptLine); 
+               std::cout<<"Creando WebWIDGET DELETE ME SCRIPT : ---"<<bbtk::jScript<<".................80%"<<std::endl;
+               //this->doJavaScript(bbtk::jScript); 
 
 
   }
@@ -244,7 +279,9 @@ namespace bbtk
   //=========================================================================
   //=========================================================================
   BBTK_BLACK_BOX_IMPLEMENTATION(WtBlackBox,WidgetBlackBox<Wt::WContainerWidget>);
+       
 
+       
   //=========================================================================
   //=========================================================================
   void WtBlackBox::bbUserSetDefaultValues()
index ba56e29..310a854 100644 (file)
@@ -75,12 +75,14 @@ namespace bbtk
   { 
   public:
     BBTK_BLACK_BOX_INTERFACE(WtBlackBox,bbtk::WidgetBlackBox<Wt::WContainerWidget>);
-
+    
          
     //  protected:
     
   public:
-  
+  /*   static std::string* jScript;
+    static void changeJScript(std::string newJScript){jScript=newJScript;};
+    static std::string getJScript(){return jScript;};*/
    //==================================================================    
     /// Callback for creating a Dialog window (modal)
     /// ** Must be defined ** in toolkit specific descendants 
index f553635..f8d3b5c 100644 (file)
@@ -83,6 +83,10 @@ namespace bbitk
                        <<bbtk::TypeName<itkImageType>()
                        <<">()"<<std::endl);
 
+    std::cout<<"bbitk::ImageWriter::Write<"
+                       <<bbtk::TypeName<itkImageType>()
+                       <<">()"<<std::endl;
+
     typedef itk::ImageFileWriter< itkImageType > itkWriterType;
     typename itkWriterType::Pointer writer = itkWriterType::New();
     writer->SetInput(bbGetInputIn().unsafe_get<const itkImageType*>());
index 5181d61..bca2a1c 100755 (executable)
@@ -120,7 +120,6 @@ void PolyDataWriterPlus::Process()
                writer->Delete();
        }
 
-
        std::cout << "Saving Ok!" << std::endl;
 
        InvokeEvent(OBS_POST_WRITER_1);