-// Copyright (C) 2003 CEA/DEN, EDF R&D
+// VISU OBJECT : interactive object for VISU entities implementation
//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
-// File : VISU_ViewManager_i.cxx
+// File : VISU_ViewManager_i.cc
// Author : Alexey PETROV
// Module : VISU
-using namespace std;
#include "VISU_ViewManager_i.hh"
+
#include "VISU_PrsObject_i.hh"
+#include "VISU_Result_i.hh"
+
+#include "VISU_Prs3d_i.hh"
+#include "VISU_Mesh_i.hh"
+#include "VISU_ScalarMap_i.hh"
+#include "VISU_IsoSurfaces_i.hh"
+#include "VISU_DeformedShape_i.hh"
+#include "VISU_CutPlanes_i.hh"
+#include "VISU_CutLines_i.hh"
+#include "VISU_Vectors_i.hh"
+#include "VISU_StreamLines_i.hh"
+
#include "VISU_Table_i.hh"
#include "VISU_ScalarBarActor.hxx"
#include "VISU_Actor.h"
#include "QAD_Study.h"
#include "QAD_RightFrame.h"
#include "QAD_StudyFrame.h"
-#include <qstring.h>
-#include <qfileinfo.h>
+#include "VTKViewer_ViewFrame.h"
#include "SALOMEGUI_TableDlg.h"
#include "Plot2d_CurveContainer.h"
#include "Plot2d_ViewFrame.h"
-//#include "SALOMEGUI_SetupCurveDlg.h"
-//#include "SALOMEGUI_SetupPlot2dDlg.h"
-#include "VTKViewer_ViewFrame.h"
+#include <memory>
+
+#include <qstring.h>
+#include <qfileinfo.h>
+
#include <vtkTransformPolyDataFilter.h>
#include <vtkDataSetMapper.h>
#include <vtkRenderer.h>
#include <vtkCamera.h>
-#include <memory>
+using namespace std;
-#ifdef DEBUG
+#ifdef _DEBUG_
static int MYDEBUG = 0;
#else
static int MYDEBUG = 0;
for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL;){
if(anActor->IsA("VISU_Actor")){
anVISUActor = VISU_Actor::SafeDownCast(anActor);
- if (thePrs == anVISUActor->getPrs3d()) {
+ if (thePrs == anVISUActor->GetPrs3d()) {
aResActor = anVISUActor->GetParent();
if(theDisplaing < eErase)
aResActor->VisibilityOn();
return aResActor;
}
if(thePrs != NULL && theDisplaing < eErase){
- anVISUActor = thePrs->CreateActor();
- if(anVISUActor)
+ try{
+ anVISUActor = thePrs->CreateActor();
vf->AddActor(anVISUActor);
- else{
- MESSAGE ("Null actor is created");
+ }catch(std::runtime_error& exc){
+ INFOS("Null actor is created");
return NULL;
}
}
return;
}
}
+
+
+ void ViewManager_i::ProcessEvents() {
+ while (true) {
+ qApp->lock();
+ qApp->syncX();
+ qApp->flushX();
+ qApp->processEvents();
+ qApp->unlock();
+ //sleep(1);
+ }
+ }
+
+
//===========================================================================
View_i::View_i(SALOMEDS::Study_ptr theStudy) {
if(MYDEBUG) MESSAGE("View_i::View_i");
void XYPlot_i::Update() {
if(MYDEBUG) MESSAGE("XYPlot_i::Update");
Mutex mt(myMutex,qApp,MYDELAY);
- myName = myStudyFrame->title();
+ myName = (const char*)(myStudyFrame->title());
myView->Repaint();
}
void XYPlot_i::Close(){
vtkActor *actor;
while(actor = theActors->GetNextActor()){
if(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(actor)){
- VISU::Prs3d_i* aPrs3d = anActor->getPrs3d();
+ VISU::Prs3d_i* aPrs3d = anActor->GetPrs3d();
if(anActor->GetVisibility() && aPrs3d){
aPrs3d->Update();
aPrs3d->UpdateActor(anActor);