00001 /****************************************************************************** 00002 * SOFA, Simulation Open-Framework Architecture, version 1.0 beta 3 * 00003 * (c) 2006-2008 MGH, INRIA, USTL, UJF, CNRS * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify it * 00006 * under the terms of the GNU General Public License as published by the Free * 00007 * Software Foundation; either version 2 of the License, or (at your option) * 00008 * any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, but WITHOUT * 00011 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * 00012 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * 00013 * more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License along * 00016 * with this program; if not, write to the Free Software Foundation, Inc., 51 * 00017 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 00018 ******************************************************************************* 00019 * SOFA :: Applications * 00020 * * 00021 * Authors: M. Adam, J. Allard, B. Andre, P-J. Bensoussan, S. Cotin, C. Duriez,* 00022 * H. Delingette, F. Falipou, F. Faure, S. Fonteneau, L. Heigeas, C. Mendoza, * 00023 * M. Nesme, P. Neumann, J-P. de la Plata Alcade, F. Poyer and F. Roy * 00024 * * 00025 * Contact information: contact@sofa-framework.org * 00026 ******************************************************************************/ 00027 #ifndef SOFA_GUI_QGLVIEWER_GENGRAPHFORM_H 00028 #define SOFA_GUI_QGLVIEWER_GENGRAPHFORM_H 00029 00030 #include "BaseGenGraphForm.h" 00031 #include <sofa/simulation/tree/GNode.h> 00032 00033 #ifdef SOFA_QT4 00034 #include "QProcess" 00035 #include "QStringList" 00036 #else 00037 #include "qprocess.h" 00038 #include "qstringlist.h" 00039 #endif 00040 00041 #include <list> 00042 #include <map> 00043 #include <set> 00044 00045 namespace sofa 00046 { 00047 00048 namespace gui 00049 { 00050 00051 namespace qt 00052 { 00053 00054 class GenGraphForm : public BaseGenGraphForm 00055 { 00056 Q_OBJECT 00057 public: 00058 GenGraphForm(); 00059 00060 void setScene(sofa::simulation::tree::GNode* scene); 00061 00062 public slots: 00063 virtual void change(); 00064 virtual void doBrowse(); 00065 virtual void doExport(); 00066 virtual void doDisplay(); 00067 virtual void doClose(); 00068 virtual void taskFinished(); 00069 virtual void changeFilter(); 00070 virtual void setFilter(); 00071 00072 protected: 00073 QString exportedFile; 00074 sofa::simulation::tree::GNode* graph; 00075 std::list<QStringList> tasks; 00076 QProcess* currentTask; 00077 00078 void addTask(QStringList argv); 00079 void runTask(); 00080 void killAllTasks(); 00081 00082 std::map<std::string, std::set<std::string> > presetFilters; 00083 bool settingFilter; 00084 std::set<std::string> getCurrentFilter(); 00085 }; 00086 00087 } // namespace qt 00088 00089 } // namespace gui 00090 00091 } // namespace sofa 00092 00093 #endif
1.5.7.1