X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2FCutModule%2Finterface%2FCutModelMainPanel.h;h=e291c8b7469abb333fc581a0726058a11a9cfa53;hb=1e68cd7b706bf3b775b959d51f2fd5d83299220c;hp=8eb3d66d804ee8894b5d438d910163e894d05604;hpb=2d5984d688d7b149aa7706a0a0bf8c4b4556d788;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.h b/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.h index 8eb3d66..e291c8b 100644 --- a/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.h +++ b/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.h @@ -1,17 +1,17 @@ /*========================================================================= - Program: wxMaracas - Module: $RCSfile: CutModelMainPanel.h,v $ - Language: C++ - Date: $Date: 2009/08/31 08:46:09 $ - Version: $Revision: 1.1 $ +Program: wxMaracas +Module: $RCSfile: CutModelMainPanel.h,v $ +Language: C++ +Date: $Date: 2010/02/24 13:56:06 $ +Version: $Revision: 1.5 $ - Copyright: (c) 2002, 2003 - License: +Copyright: (c) 2002, 2003 +License: - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notice for more information. =========================================================================*/ @@ -23,6 +23,7 @@ #include #include "wx/aui/aui.h" #include + #include #include "marTypes.h" @@ -34,17 +35,27 @@ #include "vtkImageData.h" #include "vtkRenderWindowInteractor.h" +//RaC 02-2010 Add tabs +#include +#include +#include +#include +#include +#include +#include + + class creaMaracasVisu_EXPORT CutModelMainPanel : public wxPanel { public: - CutModelMainPanel( wxWindow* parent); - ~CutModelMainPanel( ); - static CutModelMainPanel* getInstance(wxWindow* parent); + ~CutModelMainPanel( ); + + static CutModelMainPanel* getInstance(wxWindow* parent=NULL, std::string path =""); - static CutModelMainPanel* getInstance(); + //static CutModelMainPanel* getInstance(); void setImageData(vtkImageData* img); @@ -52,7 +63,13 @@ public: void setRenderer(vtkRenderer* renderer); - void initialize(); + void initialize(std::string path); + + //RaC PolygonCutter changes + void onCheckChanged(); + void onExecuteCutPolygon(); + void UpdatePolygon(bool isChecked); + void UpdatePolygon(); void onAddCutModel(); @@ -65,7 +82,7 @@ public: void ShowViewBox(int id,bool check); void ChangeShape(int id,int selection); - + void changeColor(int id,double r,double g,double b); void updateActorDirection(int id); @@ -81,7 +98,18 @@ public: void ShowCurrentPanel(int id); void ShowPopUpMenu(int id); + + void ShowStatistics(int id); + + void SetType(int type); + + int GetType(); + + private: + + CutModelMainPanel( wxWindow* parent, std::string path); + static CutModelMainPanel* instance; CutModelManager* cutmanager; @@ -90,41 +118,73 @@ private: void showErrorDialog(std::string str); + void SaveCutModelData(std::string filename); + + void LoadCutModelData(std::string filename); + std::vector viewpanels; wxAuiManager* _wxauimanager; + int addNewViewPanel()throw( CutModelException); + + CutModelView* getModelView(int id)throw( CutModelException); - int addNewViewPanel()throw( CutModelException); + int _panelid; - CutModelView* getModelView(int id)throw( CutModelException); + int _type; + + //RaC 02-2010 Add tabs + wxAuiNotebook* _notebook; + + //RaC Adds Tab to cut a prism with the polygon as the base + void addPolygonCutterTab(); + + bool _isCheck; + + bool _isFirstTime; + + wxButton *btnExecutePolygonCut; + wxStaticText* lblMessagePolygon; + wxRadioBox* _radioinsideout; - int _panelid; }; class ToolBarEventHandlerCutModel : public wxEvtHandler{ - public: - ToolBarEventHandlerCutModel(); - ~ToolBarEventHandlerCutModel(); +public: + ToolBarEventHandlerCutModel(); + ~ToolBarEventHandlerCutModel(); + + void onAdd(wxCommandEvent& event); + + void onUndo(wxCommandEvent& event); - void onAdd(wxCommandEvent& event); + void onRedo(wxCommandEvent& event); - void onUndo(wxCommandEvent& event); + void onExecuteAll(wxCommandEvent& event); - void onRedo(wxCommandEvent& event); +private: + + DECLARE_EVENT_TABLE() +}; + +class PolygonCutterEventHandlerCutModel : public wxEvtHandler{ +public: + + PolygonCutterEventHandlerCutModel(): wxEvtHandler(){}; + ~PolygonCutterEventHandlerCutModel(){}; - void onExecuteAll(wxCommandEvent& event); + void onCheckChanged(wxCommandEvent& event); + void onExecuteCutPolygon(wxCommandEvent& event); - private: +}; - DECLARE_EVENT_TABLE() - }; class ToolBarCutModel : public wxToolBar{ - + public: ToolBarCutModel(wxWindow * parent); ~ToolBarCutModel(void);