Documentation


engineGUI.cpp

Go to the documentation of this file.
00001 
00002 //                            engineGUI.cpp                                   //
00004 
00005 
00006 #include "engineGUI.h"
00007 
00008 namespace X3DTK
00009 {
00010   namespace Qt
00011   {
00012 
00013     EngineGUI::EngineGUI( FieldList & fieldList,
00014                           QWidget* parent)
00015         : ObjectGUI(fieldList, parent)
00016     {
00017       setTabLabel(this->page(0), QString("Engine")) ;
00018     }
00019 
00021     QWidget * createEngineNodeQWidget(X3DTK::X3D::EngineNode * engine, QWidget * parent)
00022     {
00023       if (engine)
00024       {
00025         // The list of all the fields to control in the GUI
00026         FieldList fieldList;
00027 
00028         //DrawEngine field
00029         fieldList.push_back(new SFBool("draw", &engine->m_draw));
00030 
00031         //MoveEngine field
00032         fieldList.push_back(new SFBool("animate", &engine->m_animate));
00033 
00034         // The GUI corresponding to a X3DTK::X3D::Transform
00035         EngineGUI * engineGUI = new EngineGUI(fieldList, parent);//, MC);
00036         //         QWidget::connect( engineGUI, SIGNAL( changed() ), MC, SLOT(computeBbox()));
00037         //         QWidget::connect( engineGUI, SIGNAL( changed() ), MC, SLOT(display()));
00038 
00039         return engineGUI;
00040 
00041       }
00042       std::cerr<<"Warning createEngineQWidget(): impossible to create a X3DTK::Qt::EngineGUI because the associated animal::Engine is NULL."<<std::endl;
00043       std::cerr<<"        or the MainController is NULL."<<std::endl;
00044 
00045       return NULL;
00046     }
00047 
00048   } // Qt
00049 } // X3DTK

Generated on Thu Dec 23 13:52:24 2004 by doxygen 1.3.6