Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00057 #ifndef __SIMULATIONRUNDIALOG_HPP___
00058 #define __SIMULATIONRUNDIALOG_HPP___
00059
00060 #include <gtkmm/dialog.h>
00061 #include <gtkmm/label.h>
00062 #include <gtkmm/expander.h>
00063 #include <gtkmm/textview.h>
00064 #include <gtkmm/scrolledwindow.h>
00065
00066 #include <openfluid/dllexport.hpp>
00067 #include <openfluid/guicommon/RunStatusWidget.hpp>
00068
00069 namespace openfluid { namespace machine {
00070 class Engine;
00071 class SimulationBlob;
00072 class ModelInstance;
00073 }
00074 }
00075
00076 namespace openfluid { namespace guicommon {
00077
00078 class RunDialogMachineListener;
00079
00080 class DLLEXPORT SimulationRunDialog : public Gtk::Dialog
00081 {
00082 private:
00083
00084 Gtk::Label m_TopLabel;
00085
00086 RunStatusWidget m_RunStatusWidget;
00087
00088 Gtk::Expander m_DetailsExpander;
00089
00090 Gtk::TextView m_DetailsTextView;
00091 Gtk::ScrolledWindow m_DetailsSWindow;
00092
00093 Glib::RefPtr<Gtk::TextBuffer> m_RefDetailsTextBuffer;
00094
00095 Gtk::Button m_ControlButton;
00096
00097 bool m_SimulationCompleted;
00098
00099 openfluid::machine::Engine* mp_Engine;
00100 openfluid::machine::SimulationBlob* mp_SBlob;
00101 openfluid::machine::ModelInstance* mp_Model;
00102 RunDialogMachineListener* mp_MachineListen;
00103
00104
00105 std::string m_LastStepStr;
00106 int m_StepsCount;
00107
00108 sigc::signal<void> m_signal_SimulationStopped;
00109 sigc::signal<void> m_signal_SimulationStarted;
00110
00111 void onIgnition();
00112
00113 void onControlButtonClicked();
00114
00115 void resetWidgets();
00116
00117 void runSimulation();
00118
00119 bool on_delete_event(GdkEventAny*);
00120
00121 public:
00122
00123 SimulationRunDialog(openfluid::machine::Engine* Eng);
00124
00125 ~SimulationRunDialog();
00126
00127 bool isSimulationCompleted() { return m_SimulationCompleted; };
00128
00129 sigc::signal<void> signal_SimulationStopped()
00130 { return m_signal_SimulationStopped; }
00131
00132 sigc::signal<void> signal_SimulationStarted()
00133 { return m_signal_SimulationStarted; }
00134
00135 };
00136
00137 } }
00138
00139
00140
00141 #endif