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;
}
};
myFileName(theFileName),
myResult(false)
{}
- virtual bool Execute(){
+ virtual void Execute(){
if(myWidget){
QPixmap px = QPixmap::grabWindow(myWidget->winId());
if (!QString(myFileName).isNull()) {
TRepaintViewEvent(QAD_StudyFrame* theStudyFrame):
myStudyFrame(theStudyFrame)
{}
- virtual bool Execute(){
+ virtual void Execute(){
RepaintView(myStudyFrame);
- return true;
}
};
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)
}
}
}
- return true;
}
typedef VISU::View_var TResult;
TResult myResult;
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;
}
};
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;
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::View_i*>(VISU::GetServant(myView).in())) {
pView->Close();
pView->_remove_ref();
}
}
- return true;
}
};
if(MYDEBUG) MESSAGE("ViewManager_i::Destroy - "<<theView->_is_nil());
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;
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;
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;
myPrsObj(thePrsObj),
myDisplaing(theDisplaing)
{}
- virtual bool Execute(){
+ virtual void Execute(){
// is it Curve ?
if(Curve_i* aCurve = dynamic_cast<Curve_i*>(VISU::GetServant(myPrsObj).in())) {
UpdatePlot2d(myView,myDisplaing,aCurve);
myView->Repaint();
}
}
- return true;
}
};
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();
}
}
}
- return true;
}
};
ProcessVoidEvent(new TEvent(myStudyFrame));
myStudyFrame(theStudyFrame),
myName(theName)
{}
- virtual bool Execute(){
+ virtual void Execute(){
myResult = RestoreViewParams(myStudyFrame,myName);
- return true;
}
typedef CORBA::Boolean TResult;
TResult myResult;
}
- 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();
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){
myPrs3d(thePrs3d),
myDisplaing(theDisplaing)
{}
- virtual bool Execute(){
+ virtual void Execute(){
UpdateViewer(myStudyFrame,myDisplaing,myPrs3d);
- return true;
}
};
myStudyFrame(theStudyFrame),
myParam(theParam)
{}
- virtual bool Execute(){
+ virtual void Execute(){
myFun(myStudyFrame,myParam);
- return true;
}
private:
TFun myFun;
myStudyFrame(theStudyFrame),
myParam(theParam)
{}
- virtual bool Execute(){
+ virtual void Execute(){
myFun(myStudyFrame,myParam);
- return true;
}
private:
TFun myFun;