guicommon/SimulationRunDialog.hpp

Go to the documentation of this file.
00001 /*
00002   This file is part of OpenFLUID-engine software
00003   Copyright (c) 2007-2010 INRA-Montpellier SupAgro
00004 
00005  == GNU General Public License Usage ==
00006 
00007   OpenFLUID-engine is free software: you can redistribute it and/or modify
00008   it under the terms of the GNU General Public License as published by
00009   the Free Software Foundation, either version 3 of the License, or
00010   (at your option) any later version.
00011 
00012   OpenFLUID-engine is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015   GNU General Public License for more details.
00016 
00017   You should have received a copy of the GNU General Public License
00018   along with OpenFLUID-engine.  If not, see <http://www.gnu.org/licenses/>.
00019 
00020   In addition, as a special exception, INRA gives You the additional right
00021   to dynamically link the code of OpenFLUID-engine with code not covered 
00022   under the GNU General Public License ("Non-GPL Code") and to distribute
00023   linked combinations including the two, subject to the limitations in this
00024   paragraph. Non-GPL Code permitted under this exception must only link to
00025   the code of OpenFLUID-engine dynamically through the ofelib library
00026   interface, and only for building OpenFLUID-engine plugins. The files of
00027   Non-GPL Code may be link to the ofelib library without causing the
00028   resulting work to be covered by the GNU General Public License. You must
00029   obey the GNU General Public License in all respects for all of the
00030   OpenFLUID-engine code and other code used in conjunction with
00031   OpenFLUID-engine except the Non-GPL Code covered by this exception. If
00032   you modify this OpenFLUID-engine, you may extend this exception to your
00033   version of the file, but you are not obligated to do so. If you do not
00034   wish to provide this exception without modification, you must delete this
00035   exception statement from your version and license this OpenFLUID-engine
00036   solely under the GPL without exception.
00037 
00038 
00039  == Other Usage ==
00040 
00041   Other Usage means a use of OpenFLUID-Engine that is inconsistent with
00042   the GPL license, and requires a written agreement between You and INRA.
00043   Licensees for Other Usage of OpenFLUID-engine may use this file in
00044   accordance with the terms contained in the written agreement between
00045   You and INRA.
00046 */
00047 
00048 
00057 #ifndef __SIMULATIONRUNDIALOG_HPP___
00058 #define __SIMULATIONRUNDIALOG_HPP___
00059 
00060 #include <gtkmm.h>
00061 
00062 #include <openfluid/base.hpp>
00063 #include <openfluid/machine.hpp>
00064 #include <openfluid/dllexport.hpp>
00065 
00066 #include <openfluid/guicommon/RunDialogMachineListener.hpp>
00067 #include <openfluid/guicommon/RunStatusWidget.hpp>
00068 
00069 
00070 namespace openfluid { namespace guicommon {
00071 
00072 
00073 class DLLEXPORT SimulationRunDialog : public Gtk::Dialog
00074 {
00075   private:
00076 
00077     Gtk::Label m_TopLabel;
00078 
00079     RunStatusWidget m_RunStatusWidget;
00080 
00081     Gtk::Expander m_DetailsExpander;
00082 
00083     Gtk::TextView m_DetailsTextView;
00084     Gtk::ScrolledWindow m_DetailsSWindow;
00085 
00086     Glib::RefPtr<Gtk::TextBuffer> m_RefDetailsTextBuffer;
00087 
00088     Gtk::Button m_ControlButton;
00089 
00090     bool m_SimulationCompleted;
00091 
00092     openfluid::machine::Engine* mp_Engine;
00093     openfluid::machine::SimulationBlob* mp_SBlob;
00094     openfluid::machine::ModelInstance* mp_Model;
00095     RunDialogMachineListener* mp_MachineListen;
00096 
00097 
00098     std::string m_LastStepStr;
00099     int m_StepsCount;
00100 
00101     void onIgnition();
00102 
00103     void onControlButtonClicked();
00104 
00105     void resetWidgets();
00106 
00107     void runSimulation();
00108 
00109     bool on_delete_event(GdkEventAny*);
00110 
00111   public:
00112 
00113     SimulationRunDialog(openfluid::machine::Engine* Eng);
00114 
00115     ~SimulationRunDialog();
00116 
00117     bool isSimulationCompleted() { return m_SimulationCompleted; };
00118 
00119 };
00120 
00121 } } //namespaces
00122 
00123 
00124 
00125 #endif /* __SIMULATIONRUNDIALOG_HPP___ */

Generated using Doxygen 1.7.3
Creative Commons License Creative Commons By-NC-ND license