wxInstantChooserPanel.h

Go to the documentation of this file.
00001 #ifndef __wxInstantChooserPanel_h_INCLUDED_H__
00002 #define __wxInstantChooserPanel_h_INCLUDED_H__
00003 
00004 
00005 // -----------------------------------------------------------------------------------------------------------
00006 // WX headers inclusion.
00007 // For compilers that support precompilation, includes <wx/wx.h>.
00008 // -----------------------------------------------------------------------------------------------------------
00009 
00010 #include <wx/wxprec.h>
00011 #ifdef __BORLANDC__
00012 #pragma hdrstop
00013 #endif
00014 #ifndef WX_PRECOMP
00015 #include <wx/wx.h>
00016 #endif
00017 
00018 
00019 //------------------------------------------------------------------------------------------------------------
00020 // Includes
00021 //------------------------------------------------------------------------------------------------------------
00022 #include <iostream>
00023 #include <string>
00024 #include <vector>
00025 #include  "wxConceptControl.h"
00026 #include <map>
00027 #include "ConceptDataWrap.h"
00028 #include <wx/event.h>
00029 //------------------------------------------------------------------------------------------------------------
00030 // Events declaration
00031 //------------------------------------------------------------------------------------------------------------
00032 
00033 BEGIN_DECLARE_EVENT_TYPES()
00034         DECLARE_EVENT_TYPE(wxINSTANT_CHOOSER_CHANGE,400)
00035 END_DECLARE_EVENT_TYPES()
00036 
00037 
00041 //------------------------------------------------------------------------------------------------------------
00042 // Class definition
00043 //------------------------------------------------------------------------------------------------------------
00044 
00045 class wxInstantChooserPanel : public wxPanel {
00046 
00047         public:
00048 
00049         //------------------------------------------------------------------------------------------------------------
00050         // Constructors & Destructors
00051         //------------------------------------------------------------------------------------------------------------
00052         
00053         wxInstantChooserPanel (wxWindow * parent, std::string title, bool theOrientation, bool resolutionALL = false, std::string configurationElem="", std::string groupConfig = "");
00054 
00055         wxInstantChooserPanel (wxWindow * parent,wxWindowID id ,std::string title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, bool theOrientation=true, std::string configurationElem="", std::string groupConfig = "");
00056 
00057         ~wxInstantChooserPanel();
00058 
00059         //------------------------------------------------------------------------------------------------------------
00060         // Creational and initialization methods
00061         //------------------------------------------------------------------------------------------------------------
00062         
00070         void addConcept(std::string aConceptName, int minV, int maxV, int actualV);
00071 
00072         void setWxEventHandler( wxEvtHandler * theEventHandler );
00073 
00074         //------------------------------------------------------------------------------------------------------------
00075         // Methods for capturing events
00076         //------------------------------------------------------------------------------------------------------------
00077         void onResolutionSlider( wxScrollEvent& event );
00078 
00079         void onCheckBoxClicked( wxCommandEvent& event );
00080 
00081         void onConceptRelease( wxCommandEvent& event );
00082         //------------------------------------------------------------------------------------------------------------
00083         //  Methods for sending events
00084         //------------------------------------------------------------------------------------------------------------
00085 
00086         //------------------------------------------------------------------------------------------------------------
00087         //  Attributes getters and setters
00088         //------------------------------------------------------------------------------------------------------------
00089         
00090         ConceptDataWrap * getLastConceptData();
00091 
00092         //------------------------------------------------------------------------------------------------------------
00093         //  Other functional methods
00094         //------------------------------------------------------------------------------------------------------------
00095         
00096         void setInstant(std::vector<int> choiceInstant);
00097         
00098         void setInstant(std::map<std::string,int>* _actualInstant );
00099 
00100         void getInstant(std::vector<int> & choiceInstant);
00101 
00102         void getInstantData(std::map<std::string,int> & choiceInstantData);
00103 
00104         std::map<std::string,int>* getInstantData();
00105 
00106         void setResolutionRangeWithLasUpdate();
00107 
00108         void refreshConceptLabels();
00109 
00110         void setConfiguration(std::string aConfiguration);
00111 
00112         std::string getConfiguration();
00113         
00114         void setResolutionOverAll( bool condition );
00115 
00116         bool getIfResolutionOverAll();
00117 
00118         void setConceptValue( std::string theConceptName, int theValue );
00119 
00120         int getConceptValue( std::string theConceptName );
00121 
00122         ConceptDataWrap * getConceptDataOf( std::string theConceptName );
00123 
00124         bool getIfConceptCheckedAt( std::string theConceptName, int atChecksPosition );
00125 
00126         void onChangeInstant( wxCommandEvent& event );
00127 
00128         void addConcepts(std::vector<std::string> conceptNameVect,std::vector<int> conceptSizeVect);
00129 
00130         private:
00131         //------------------------------------------------------------------------------------------------------------
00132         //  Private methods
00133         //------------------------------------------------------------------------------------------------------------
00134         void initializeResolutionSlider();
00135 
00136         void changeResolutionAtConceptControl( wxConceptControl * theConceptToUpdate );
00137 
00138         void setVerticalMaxSelectedNums( std::string groupMaxVertNums );
00139 
00140         //------------------------------------------------------------------------------------------------------------
00141         // Attributtes
00142         //------------------------------------------------------------------------------------------------------------
00143 
00144         std::vector<wxConceptControl *> * _concepts;
00145 
00146         wxConceptControl * _lastConceptUpdated;
00147 
00148         wxSlider * _resolutionSlider;
00149 
00150         wxFlexGridSizer * _outSizer;
00151 
00152         bool _orientation;
00153 
00154         bool _resolutionOverALL;
00155         
00156         std::map<std::string,int>* _actualInstant;
00157 
00158         std::vector<int> _verticalMaxSelected;
00159         
00160         wxEvtHandler * _eventHandler;
00161 
00162         std::string _configuration;
00163     
00164 
00165         //DECLARE_CLASS(wxInstantChooserPanel)
00166         // any class wishing to process wxWindows events must use this macro
00167         //DECLARE_EVENT_TABLE()
00168 
00169 };
00170 
00171 #endif 

Generated on Wed Jun 27 23:28:32 2012 for creaContours_lib by  doxygen 1.5.7.1