AnimaL |
Tutorial |
Documentation |
00001 00002 #include "DeformableOctreeShapeQt.h" 00003 #include <qcombobox.h> 00004 #include <animal/X3DTK/Qt/mainControllerGUI/MainController.h> 00005 00006 #include <animal/X3DTK/X4DGUI.h> 00007 00008 00009 namespace X3DTK 00010 { 00011 namespace Qt 00012 { 00013 00014 DeformableOctreeShapeQt::DeformableOctreeShapeQt(X3D::DeformableOctreeShapeNode * DON ) : 00015 DeformableOctreeShapeDesigner(0,"main q object" ), 00016 _node(DON) 00017 { 00018 initButtons(); 00019 } 00020 00021 DeformableOctreeShapeQt::~DeformableOctreeShapeQt() 00022 {} 00023 00024 00025 void DeformableOctreeShapeQt::initButtons() 00026 { 00027 _node->setRenderingMethod( comboBoxMethod->currentItem() ); 00028 } 00029 00030 void DeformableOctreeShapeQt::comboBoxMethod_activated( int method ) 00031 { 00032 _node->setRenderingMethod( method ); 00033 } 00034 00035 00036 //QWidget * createDeformableOctreeShapeQWidget(X3D::DeformableOctreeShapeNode * node, QWidget * parent) 00037 QWidget * createDeformableOctreeShapeQWidget(X3D::DeformableOctreeShapeNode * node, QWidget * parent) 00038 { 00039 if (node) 00040 { 00041 DeformableOctreeShapeQt * DOQt = new DeformableOctreeShapeQt(node); 00042 00043 X4DGUI * myGUI = static_cast<X4DGUI *>(X3DTK::Qt::createX4DNodeQWidget(node, parent)); 00044 myGUI->insertTab(DOQt, "DeformableOctreeShapeNode" ,0); 00045 myGUI->setCurrentPage(0); 00046 QWidget::connect( DOQt, SIGNAL( changed() ), myGUI, SLOT(ok())); 00047 00048 return myGUI; 00049 } 00050 else 00051 std::cerr<<"Warning: impossible to create a DeformableOctreeShapeQt because the associated DeformableOctreeShapeNode is NULL."<<std::endl; 00052 00053 return NULL; 00054 } 00055 00056 00057 } 00058 } 00059