00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2001, 2002, 2003 Stéphane Del Pino 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: MainWindow.hpp,v 1.7 2007/02/20 19:28:36 delpinux Exp $ 00019 00020 #ifndef MAIN_WINDOW_HPP 00021 #define MAIN_WINDOW_HPP 00022 00023 #include <sstream> 00024 00025 // removed stupid VTk warning. Is that ok? 00026 #ifdef __GNUC__ 00027 #define __SGI_STL_STRSTREAM 00028 namespace std { 00029 typedef std::ofstream ostrstream; 00030 typedef std::ifstream istrstream; 00031 typedef std::fstream strstream; 00032 } 00033 #include <QtGui/QMainWindow> 00034 #endif // __GNUC__ 00035 00036 class FFThread; 00037 class EditorWindow; 00038 class QTextEdit; 00039 00040 class MainWindow 00041 : public QMainWindow 00042 { 00043 Q_OBJECT 00044 public: 00045 MainWindow(); 00046 ~MainWindow(); 00047 00048 protected: 00049 void closeEvent(QCloseEvent* event); 00050 00051 private slots: 00052 void newFile(); 00053 void choose(); 00054 void load(const QString &fileName); 00055 void save(); 00056 void saveAs(); 00057 void print(); 00058 00059 void run(); 00060 void pause(); 00061 void resume(); 00062 void stop(); 00063 00064 void aboutff3d(); 00065 void aboutQt(); 00066 void aboutVtk(); 00067 00068 private: 00069 void __buildFileTools(); 00070 void __buildEditorTools(); 00071 void __buildActionTools(); 00072 void __buildHelpTools(); 00073 00074 QPrinter *printer; 00075 EditorWindow* __editor; 00076 QTextEdit* __console; 00077 QString filename; 00078 FFThread* __ffThread; 00079 }; 00080 00081 #endif // MAIN_WINDOW_HPP
1.5.6