AddPreset.h

Go to the documentation of this file.
00001  
00002 /******************************************************************************
00003  *       SOFA, Simulation Open-Framework Architecture, version 1.0 beta 3      *
00004  *                (c) 2006-2008 MGH, INRIA, USTL, UJF, CNRS                    *
00005  *                                                                             *
00006  * This program is free software; you can redistribute it and/or modify it     *
00007  * under the terms of the GNU General Public License as published by the Free  *
00008  * Software Foundation; either version 2 of the License, or (at your option)   *
00009  * any later version.                                                          *
00010  *                                                                             *
00011  * This program is distributed in the hope that it will be useful, but WITHOUT *
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       *
00013  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    *
00014  * more details.                                                               *
00015  *                                                                             *
00016  * You should have received a copy of the GNU General Public License along     *
00017  * with this program; if not, write to the Free Software Foundation, Inc., 51  *
00018  * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.                   *
00019  *******************************************************************************
00020  *                            SOFA :: Applications                             *
00021  *                                                                             *
00022  * Authors: M. Adam, J. Allard, B. Andre, P-J. Bensoussan, S. Cotin, C. Duriez,*
00023  * H. Delingette, F. Falipou, F. Faure, S. Fonteneau, L. Heigeas, C. Mendoza,  *
00024  * M. Nesme, P. Neumann, J-P. de la Plata Alcade, F. Poyer and F. Roy          *
00025  *                                                                             *
00026  * Contact information: contact@sofa-framework.org                             *
00027  ******************************************************************************/
00028 #ifndef ADDPRESET_H
00029 #define ADDPRESET_H
00030 
00031 #include <vector>
00032 #include "DialogAddPreset.h"
00033 #include <sofa/simulation/tree/GNode.h>
00034 
00035 namespace sofa
00036 {
00037 
00038   namespace gui
00039   {
00040 
00041     namespace qt
00042     {
00043       using sofa::simulation::tree::GNode;
00044 
00045       class AddPreset : public DialogAddPreset
00046       {
00047     Q_OBJECT
00048       public:
00049     
00050     AddPreset(  QWidget* parent, const char* name= 0,bool *elementPresent=NULL, bool  modal= FALSE, Qt::WFlags f= 0 );
00051     void setParentNode(GNode* parentNode){node=parentNode;}
00052     void setPresetFile(std::string p){presetFile=p;}
00053     void setPath(std::string p){fileName=p;}
00054     
00055     void clear();
00056     
00057     public slots:
00058     void fileOpen();
00059     void accept();
00060     
00061       signals:
00062     void loadPreset(GNode*,std::string,std::string*, std::string*,std::string*,std::string);
00063     
00064 
00065     
00066       protected:
00067     std::string fileName;
00068     std::string presetFile;
00069     GNode *node;
00070       };
00071 
00072     } // namespace qt
00073  
00074   } // namespace gui
00075 
00076 } // namespace sofa
00077 
00078 #endif

Generated on Sun Nov 23 02:28:34 2008 for Sofa by  doxygen 1.5.7.1