pPlotter.h
Go to the documentation of this file.00001 #ifndef __pPlotter_h__
00002 #define __pPlotter_h__
00003
00004
00005
00006
00007
00008
00009 #include <wx/wxprec.h>
00010 #ifdef __BORLANDC__
00011 #pragma hdrstop
00012 #endif
00013 #ifndef WX_PRECOMP
00014 #include <wx/wx.h>
00015 #endif
00016
00017
00018
00019
00020
00021
00022 #include "pColorBar.h"
00023 #include "mBarRange.h"
00024 #include "mathplot.h"
00025 #include "pFunctionPoint.h"
00026 #include "pGraphicalFunction.h"
00027 #include "pPlotterLayer.h"
00028 #include "pPlotterWindow.h"
00029 #include "pPlotterScaleY.h"
00030 #include "pPlotterScaleX.h"
00031 #include <iostream>
00032 #include <vector>
00033
00034
00035
00036
00039
00040
00041
00042
00043
00044
00045
00047 class pPlotter : public wxPanel{
00048
00049 public:
00050
00051
00052
00053
00054
00055
00056
00057
00058 pPlotter (wxWindow *parent,int nWidth, int nHeight);
00059
00060 ~pPlotter ();
00061
00062
00063
00064
00065
00066
00067 void onChangeFunction (wxCommandEvent& event);
00068 void onAddedPoint_Plotter (wxCommandEvent& event);
00069 void onRemovedPoint_Plotter (wxCommandEvent& event);
00070 void onMovePoint_Plotter (wxCommandEvent& event);
00071 void onGuideLines (wxCommandEvent& event);
00072
00073
00074 void onAdded_ColorPoint ( wxCommandEvent& event );
00075 void onRemoved_ColorPoint ( wxCommandEvent& event );
00076 void onMoved_ColorPoint( wxCommandEvent& event );
00077 void onChanged_ColorPoint( wxCommandEvent& event );
00078 void onColorBar( wxCommandEvent& event );
00079
00080
00081 void onBarrange(wxCommandEvent& event);
00082 void onActualChange_Bar(wxCommandEvent& event);
00083 void onStartChange_Bar(wxCommandEvent& event);
00084 void onEndChange_Bar(wxCommandEvent& event);
00085 void onSelectionEnd(wxCommandEvent& event);
00086 void onMovedBar(wxCommandEvent& event);
00087
00088
00089
00090
00091
00092 void sendTMessage(wxString theText);
00093
00094
00095 wxWindow* initialize(wxWindow *parent);
00096
00097
00098
00099
00100
00101 void setTextMessage(wxString nMessage);
00102
00103
00104
00105
00106
00107 wxString getTextMessage();
00111 pGraphicalFunction* getFunctionForVectors( double* vectorX, int sizeX,double * vectorY, int sizeY );
00116 int addFunction(pGraphicalFunction * function);
00117
00118
00119
00120 void setType(int t);
00121
00122
00123
00124 pGraphicalFunction* getFunction(int index);
00125
00126
00127
00128
00129 void OnSize( wxSizeEvent &WXUNUSED(event) );
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144 void moveFunctions(float porcentageMinX,float porcentageMaxX);
00145
00146
00147
00148
00149 int addFunctionToMove(pGraphicalFunction * function);
00150
00151
00152
00153
00154 void setAll();
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00168 int getColorPointsSize();
00169
00170
00171
00172
00173
00174 void getBarColorDataAt(int index,double&x,int& red,int& green,int& blue);
00175
00176
00177
00178
00179
00180 bool addColorPoint (int x,int red,int green, int blue);
00181
00182 void eraseColorPoints();
00183
00184
00185
00186
00187
00188 float getMaxShowedPorcentage();
00189 float getMinShowedPorcentage();
00190 float getActualShowedPorcentage();
00191
00192
00193
00194 void setActual(pGraphicalFunction* nActual);
00195 void update();
00196
00197
00198
00199
00200
00201
00202
00203 void setPopUpMenu(bool startD,bool stopD,bool smooth,bool line, bool zoomIn,
00204 bool zoomOut,bool showPoints,bool noShowPoints,bool changeColor, bool addP,
00205 bool delPoint,bool load,bool save);
00206
00207
00211 void GetValuesPointsFunction(std::vector<double>& greylevel,std::vector<double>& value, int histogramsize);
00212
00217 void GetValuesColorPointsFunction(std::vector<double>& greylevel,
00218 std::vector<double>& red,
00219 std::vector<double>& green,
00220 std::vector<double>& blue);
00221
00222
00223
00224
00225 private:
00226
00227
00228
00229
00230 pPlotterWindow *m_plot;
00231
00232
00233
00234 pColorBar *color_bar;
00235
00236
00237
00238 mBarRange *barrange;
00239
00240
00241
00242 pGraphicalFunction* actualFunction;
00243
00244
00245
00246
00247 wxString text;
00248
00249
00250
00251
00252 DECLARE_CLASS (pPlotter)
00253
00254
00255
00256 DECLARE_EVENT_TABLE()
00257 };
00258
00259 #endif
00260
00261