00001
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 #ifndef _SIM_SENSORY_H_
00036 #define _SIM_SENSORY_H_
00037
00038 #define wxUSE_STD_IOSTREAM 1
00039 #define wxUSE_DEBUGREPORT 1
00040 #define wxUSE_ON_FATAL_EXCEPTION 1
00041
00042 #include <wx/wx.h>
00043 #include <wx/cmdline.h>
00044 #include <wx/debugrpt.h>
00045 #include <wx/filename.h>
00046 #include <vector>
00047
00048 #include "sim_phenomena.h"
00049 #include "SimSensoryFrame.h"
00050
00051
00052
00053 class SimSensory: public wxApp {
00054 private:
00055 wxLogStream *logger;
00056 bool splash;
00057
00058 public:
00059 SimSensory();
00060 bool OnInit();
00061 void OnInitCmdLine(wxCmdLineParser& parser);
00062 bool OnCmdLineParsed(wxCmdLineParser& parser);
00063 void OnFatalException();
00064 void GenerateReport(wxDebugReport::Context ctx);
00065 };
00066
00067
00068 DECLARE_APP(SimSensory)
00069
00070
00071 class SimSensoryExtra : public SimSensoryFrame {
00072 protected:
00073 wxFileName *_file_name;
00074 unsigned int _x_axis, _y_axis;
00075 Phenom _phenom;
00076 bool _on_path;
00077 bool _saved;
00078
00079 public:
00080 SimSensoryExtra(wxWindow* parent, int id=wxID_ANY,
00081 const wxString& title=_("Sensory data for simulation"),
00082 const wxPoint& pos=wxDefaultPosition,
00083 const wxSize& size=wxDefaultSize,
00084 long style=wxDEFAULT_FRAME_STYLE);
00085
00086 std::vector<SensorData> data;
00087
00088 void onNew(wxCommandEvent &event);
00089 void onOpen(wxCommandEvent &event);
00090 void onSave(wxCommandEvent &event);
00091 void onSaveAs(wxCommandEvent &event);
00092 void onCompute(wxCommandEvent &event);
00093 void onExit(wxCommandEvent &event);
00094 void onAbout(wxCommandEvent &event);
00095
00096 void onXAxis(wxCommandEvent &event);
00097 void onYAxis(wxCommandEvent &event);
00098
00099 void onAmbSound(wxCommandEvent &event);
00100 void onAmbLight(wxCommandEvent &event);
00101 void onTemp(wxCommandEvent &event);
00102 void onAmbRad(wxCommandEvent &event);
00103 void onSound(wxCommandEvent &event);
00104 void onLight(wxCommandEvent &event);
00105 void onAccel(wxCommandEvent &event);
00106 void onMag(wxCommandEvent &event);
00107 void onRad(wxCommandEvent &event);
00108
00109 unsigned int getXAxis();
00110 unsigned int getYAxis();
00111 void setFieldPosition(double x, double y);
00112 Phenom getCurrentPhenomType();
00113 void setSaved(bool s);
00114 bool isOnPath();
00115 void putOnPath();
00116 };
00117
00118
00119 #endif // _SIM_SENSORY_H_