AnimaL |
Tutorial |
Documentation |
00001 // 00002 // C++ Implementation: DeformableOctreeParticleSystemQt 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: Matthieu Nesme <>, (C) 2004 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 #include "DeformableOctreeParticleSystemQt.h" 00013 #include <qpushbutton.h> 00014 #include <qcheckbox.h> 00015 #include <qspinbox.h> 00016 #include <qcombobox.h> 00017 #include <qslider.h> 00018 #include <qlabel.h> 00019 #include <animal/X3DTK/Qt/mainControllerGUI/MainController.h> 00020 00021 #include <animal/X3DTK/Qt/engineGUI/engineGUI.h> 00022 00023 namespace X3DTK 00024 { 00025 00026 namespace Qt 00027 { 00028 00029 DeformableOctreeParticleSystemQt::DeformableOctreeParticleSystemQt(X3D::DeformableOctreeParticleSystemNode * DON) 00030 : DeformableOctreeQt(DON) 00031 , _node(DON) 00032 { 00033 DeformableOctreeQt::_node = _node; 00034 } 00035 00036 00037 DeformableOctreeParticleSystemQt::~DeformableOctreeParticleSystemQt() 00038 {} 00039 00040 00041 void DeformableOctreeParticleSystemQt::slotSubdivide() 00042 {_node->slotSubdivide();emit changed();} 00043 00044 void DeformableOctreeParticleSystemQt::slotSimplify() 00045 {_node->slotSimplify(); emit changed();} 00046 00047 00048 QWidget * createDeformableOctreeParticleSystemQWidget(X3D::DeformableOctreeParticleSystemNode * node, QWidget * parent) 00049 { 00050 if (node) 00051 { 00052 DeformableOctreeParticleSystemQt * DOQt = new DeformableOctreeParticleSystemQt(node); 00053 00054 EngineGUI * engineGUI = static_cast<EngineGUI *>(X3DTK::Qt::createEngineNodeQWidget(node, parent); 00055 engineGUI->insertTab(DOQt, "DeformableOctreeParticleSystemNode" ,0); 00056 engineGUI->setCurrentPage(0); 00057 QWidget::connect( DOQt, SIGNAL( changed() ), engineGUI, SLOT(ok())); 00058 00059 return engineGUI; 00060 } 00061 else 00062 std::cerr<<"Warning: impossible to create a DeformableOctreeParticleSystemQt because the associated DeformableOctreeNode is NULL."<<std::endl; 00063 00064 return NULL; 00065 } 00066 00067 00068 00069 00070 }; 00071 00072 };