From: smh Date: Thu, 22 Apr 2004 07:25:38 +0000 (+0000) Subject: Remove unused parameters and methods X-Git-Tag: Merge_300404~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dda9dcf885d0587b46742bd7383d1629b755b4ef;p=modules%2Fvisu.git Remove unused parameters and methods --- diff --git a/src/VISU_I/VISU_Gen_i.cc b/src/VISU_I/VISU_Gen_i.cc index ff03c49a..dc533de5 100644 --- a/src/VISU_I/VISU_Gen_i.cc +++ b/src/VISU_I/VISU_Gen_i.cc @@ -919,7 +919,7 @@ namespace VISU{ */ class TestViewEvent : public SALOME_Event { public: - virtual bool Execute(){ + virtual void Execute(){ QAD_Desktop* desktop = QAD_Application::getDesktop(); QAD_Study* aStudy = desktop->getActiveStudy(); if ( !aStudy ) { @@ -934,13 +934,12 @@ namespace VISU{ else { aStudy->newWindow3d( "", VIEW_VTK ); } - return true; } }; class TestObjectEvent : public SALOME_Event { public: - virtual bool Execute(){ + virtual void Execute(){ float aRadius = 150.0 * random() / RAND_MAX + 10.; float aX = 1000.0 * random() / RAND_MAX - 500.; float aY = 1000.0 * random() / RAND_MAX - 500.; @@ -965,14 +964,12 @@ namespace VISU{ QAD_Desktop* desktop = QAD_Application::getDesktop(); QAD_Study* aStudy = desktop->getActiveStudy(); - if ( !aStudy ) { - return false; - } + if ( !aStudy ) + return ; VTKViewer_ViewFrame* vf = (VTKViewer_ViewFrame*)(desktop->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame()); sphere->SetVisibility( true ); vf->getRenderer()->AddActor(sphere); vf->Repaint(); - return true; } }; diff --git a/src/VISU_I/VISU_ViewManager_i.cc b/src/VISU_I/VISU_ViewManager_i.cc index 7492a7a7..625be7a8 100644 --- a/src/VISU_I/VISU_ViewManager_i.cc +++ b/src/VISU_I/VISU_ViewManager_i.cc @@ -90,14 +90,13 @@ namespace VISU{ TSetBackgroundEvent(TObject* theView, const SALOMEDS::Color& theColor): myView(theView), myColor(theColor) {} - virtual bool Execute(){ + virtual void Execute(){ int aColor[3]; aColor[0] = int(255.0*myColor.R); aColor[1] = int(255.0*myColor.G); aColor[2] = int(255.0*myColor.B); QColor aNewColor(aColor[0],aColor[1],aColor[2]); myView->setBackgroundColor(aNewColor); - return true; } }; @@ -113,7 +112,7 @@ namespace VISU{ myFileName(theFileName), myResult(false) {} - virtual bool Execute(){ + virtual void Execute(){ if(myWidget){ QPixmap px = QPixmap::grabWindow(myWidget->winId()); if (!QString(myFileName).isNull()) { @@ -136,9 +135,8 @@ namespace VISU{ TRepaintViewEvent(QAD_StudyFrame* theStudyFrame): myStudyFrame(theStudyFrame) {} - virtual bool Execute(){ + virtual void Execute(){ RepaintView(myStudyFrame); - return true; } }; @@ -313,7 +311,7 @@ namespace VISU{ TEvent( SALOMEDS::Study_ptr theStudy): myStudyDocument(theStudy) {} - virtual bool Execute(){ + virtual void Execute(){ if(QAD_Study* aStudy = QAD_Application::getDesktop()->findStudy( myStudyDocument )){ if ( QAD_StudyFrame* aStudyFrame = aStudy->getActiveStudyFrame() ) { if(MYDEBUG) @@ -329,7 +327,6 @@ namespace VISU{ } } } - return true; } typedef VISU::View_var TResult; TResult myResult; @@ -362,13 +359,12 @@ namespace VISU{ TCreateViewEvent(theStudy), myResult(TInterface::_nil()) {} - virtual bool Execute(){ + virtual void Execute(){ if(CheckStudy(myStudyDocument)){ TViewFrame* pView = new TViewFrame(myStudyDocument); if(pView->Create(1)) myResult = pView->_this(); } - return true; } }; @@ -394,13 +390,12 @@ namespace VISU{ TCreateViewEvent(theStudy), myTable(theTable) {} - virtual bool Execute(){ + virtual void Execute(){ if ( CheckStudy( myStudyDocument ) ) { VISU::TableView_i* pView = new TableView_i(myStudyDocument); if(pView->Create(myTable) != NULL) myResult = pView->_this(); } - return true; } typedef VISU::TableView_var TResult; TResult myResult; @@ -421,14 +416,13 @@ namespace VISU{ TEvent(View_ptr theView): myView(theView) {} - virtual bool Execute(){ + virtual void Execute(){ if(!CORBA::is_nil(myView)){ if(VISU::View_i* pView = dynamic_cast(VISU::GetServant(myView).in())) { pView->Close(); pView->_remove_ref(); } } - return true; } }; if(MYDEBUG) MESSAGE("ViewManager_i::Destroy - "<_is_nil()); @@ -548,9 +542,8 @@ namespace VISU{ myMajor(theMajor), myNumMajor(theNumMajor), myMinor(theMinor), myNumMinor(theNumMinor) {} - virtual bool Execute(){ + virtual void Execute(){ (myView->*myFun)(myMajor,myNumMajor,myMinor,myNumMinor); - return true; } protected: Plot2d_ViewFrame* myView; @@ -580,9 +573,8 @@ namespace VISU{ TSetScaleModeEvent(Plot2d_ViewFrame* theView, TFun theFun, int theScaling): myView(theView), myFun(theFun), myScaling(theScaling) {} - virtual bool Execute(){ + virtual void Execute(){ (myView->*myFun)(myScaling); - return true; } protected: Plot2d_ViewFrame* myView; @@ -615,9 +607,8 @@ namespace VISU{ TSetTitleEvent(Plot2d_ViewFrame* theView, TFun theFun, const char* theTitle): myView(theView), myFun(theFun), myTitle(theTitle) {} - virtual bool Execute(){ + virtual void Execute(){ (myView->*myFun)(true,myTitle); - return true; } protected: Plot2d_ViewFrame* myView; @@ -687,7 +678,7 @@ namespace VISU{ myPrsObj(thePrsObj), myDisplaing(theDisplaing) {} - virtual bool Execute(){ + virtual void Execute(){ // is it Curve ? if(Curve_i* aCurve = dynamic_cast(VISU::GetServant(myPrsObj).in())) { UpdatePlot2d(myView,myDisplaing,aCurve); @@ -720,7 +711,6 @@ namespace VISU{ myView->Repaint(); } } - return true; } }; @@ -834,7 +824,7 @@ namespace VISU{ TEvent(QAD_StudyFrame* theStudyFrame): myStudyFrame(theStudyFrame) {} - virtual bool Execute(){ + virtual void Execute(){ VTKViewer_ViewFrame* vf = GetViewFrame(myStudyFrame); vtkRenderer* Renderer = vf->getRenderer(); vtkActorCollection* theActors = Renderer->GetActors(); @@ -849,7 +839,6 @@ namespace VISU{ } } } - return true; } }; ProcessVoidEvent(new TEvent(myStudyFrame)); @@ -938,9 +927,8 @@ namespace VISU{ myStudyFrame(theStudyFrame), myName(theName) {} - virtual bool Execute(){ + virtual void Execute(){ myResult = RestoreViewParams(myStudyFrame,myName); - return true; } typedef CORBA::Boolean TResult; TResult myResult; @@ -953,7 +941,7 @@ namespace VISU{ } - void View3D_i::Restore(QAD_StudyFrame* theStudyFrame, const Storable::TRestoringMap& theMap) throw(std::logic_error&){ + void View3D_i::Restore(QAD_StudyFrame* theStudyFrame, const Storable::TRestoringMap& theMap){ SALOMEDS::Color aColor; aColor.R = VISU::Storable::FindValue(theMap,"myColor.R").toDouble(); aColor.G = VISU::Storable::FindValue(theMap,"myColor.G").toDouble(); @@ -990,10 +978,10 @@ namespace VISU{ ScaleView(theStudyFrame,VISU::View3D::YAxis,aScaleFactor[1]); ScaleView(theStudyFrame,VISU::View3D::ZAxis,aScaleFactor[2]); } - Storable* View3D_i::Restore(const Storable::TRestoringMap& theMap) throw(std::logic_error&) { - Restore(myStudyFrame,theMap); - return this; - } + //Storable* View3D_i::Restore(const Storable::TRestoringMap& theMap) throw(std::logic_error&) { + // Restore(myStudyFrame,theMap); + // return this; + //} string View3D_i::ToString(QAD_StudyFrame* theStudyFrame){ @@ -1111,9 +1099,8 @@ namespace VISU{ myPrs3d(thePrs3d), myDisplaing(theDisplaing) {} - virtual bool Execute(){ + virtual void Execute(){ UpdateViewer(myStudyFrame,myDisplaing,myPrs3d); - return true; } }; @@ -1193,9 +1180,8 @@ namespace VISU{ myStudyFrame(theStudyFrame), myParam(theParam) {} - virtual bool Execute(){ + virtual void Execute(){ myFun(myStudyFrame,myParam); - return true; } private: TFun myFun; @@ -1274,9 +1260,8 @@ namespace VISU{ myStudyFrame(theStudyFrame), myParam(theParam) {} - virtual bool Execute(){ + virtual void Execute(){ myFun(myStudyFrame,myParam); - return true; } private: TFun myFun; diff --git a/src/VISU_I/VISU_ViewManager_i.hh b/src/VISU_I/VISU_ViewManager_i.hh index ca653ce0..4acb054e 100644 --- a/src/VISU_I/VISU_ViewManager_i.hh +++ b/src/VISU_I/VISU_ViewManager_i.hh @@ -244,7 +244,7 @@ namespace VISU{ virtual CORBA::Boolean SaveViewParams(const char* theName); static QString GenerateViewParamsName(); - static void Restore(QAD_StudyFrame* theStudyFrame, const Storable::TRestoringMap& theMap) throw(std::logic_error&); + static void Restore(QAD_StudyFrame* theStudyFrame, const Storable::TRestoringMap& theMap); static bool RestoreViewParams(QAD_StudyFrame* theStudyFrame, const char* theName); virtual CORBA::Boolean RestoreViewParams(const char* theName); @@ -256,7 +256,7 @@ namespace VISU{ public: virtual Storable* Create(int theNew); - virtual Storable* Restore(const Storable::TRestoringMap& theMap) throw(std::logic_error&); + //virtual Storable* Restore(const Storable::TRestoringMap& theMap) throw(std::logic_error&); virtual void ToStream(std::ostringstream& theStr); virtual const char* GetComment() const; static const string myComment;