23 #ifndef SVTK_VIEWWINDOW_H
24 #define SVTK_VIEWWINDOW_H
27 #pragma warning( disable:4251 )
39 #include <vtkSmartPointer.h>
54 class vtkRenderWindow;
57 class vtkCallbackCommand;
72 class vtkPVAxesWidget;
104 vtkRenderWindow* getRenderWindow();
119 void PopInteractorStyle();
122 vtkRenderer* getRenderer()
const;
137 virtual void setBackgroundColor(
const QColor& );
140 QColor backgroundColor()
const;
149 bool isTrihedronDisplayed();
152 bool isCubeAxesDisplayed();
157 bool theIsHighlight =
true,
158 bool theIsUpdate =
true);
161 virtual void unHighlightAll();
177 bool theImmediatly =
true);
184 bool theImmediatly =
true);
187 virtual void DisplayAll();
190 virtual void EraseAll();
193 virtual void Repaint(
bool theUpdateTrihedron =
true);
197 virtual void SetScale(
double theScale[3] );
200 virtual void GetScale(
double theScale[3] );
204 bool theIsUpdate =
false,
205 bool theIsAdjustActors =
true);
209 bool theIsUpdate =
false,
210 bool theIsAdjustActors =
true);
214 virtual void AdjustTrihedrons(
const bool theIsForced);
223 double GetTrihedronSize()
const;
226 virtual void SetTrihedronSize(
const double,
const bool =
true );
229 virtual void SetIncrementalSpeed(
const int,
const int = 0 );
232 virtual void SetProjectionMode(
const int );
235 virtual void SetStereoType(
const int );
238 virtual void SetAnaglyphFilter(
const int );
241 virtual void SetQuadBufferSupport(
const bool );
244 virtual void SetInteractionStyle(
const int );
247 virtual void SetZoomingStyle(
const int );
253 virtual void SetSelectionEnabled(
bool );
256 virtual void SetSpacemouseButtons(
const int,
const int,
const int );
259 virtual void SetSelectionProp(
const double& theRed = 1,
260 const double& theGreen = 1,
261 const double& theBlue = 0,
262 const int& theWidth = 5);
265 virtual void SetPreselectionProp(
const double& theRed = 0,
266 const double& theGreen = 1,
267 const double& theBlue = 1,
268 const int& theWidth = 5);
271 virtual void SetSelectionTolerance(
const double& theTolNodes = 0.025,
272 const double& theTolCell = 0.001,
273 const double& theTolObjects = 0.025);
276 bool IsStaticTrihedronVisible()
const;
279 virtual void SetStaticTrihedronVisible(
const bool );
288 virtual void RefreshDumpImage();
290 void emitTransformed();
293 void InvokeEvent(
unsigned long theEvent,
void* theCallData);
302 virtual void showEvent( QShowEvent * );
303 virtual void hideEvent( QHideEvent * );
304 virtual void onSelectionChanged();
306 void onChangeRotationPoint(
bool theIsActivate);
308 void activateSetRotationGravity();
309 void activateSetRotationSelected(
void* theData);
312 void onUpdateRate(
bool theIsActivate);
313 void onNonIsometric(
bool theIsActivate);
314 void onGraduatedAxes(
bool theIsActivate);
317 void activateWindowFit();
318 void activateRotation();
319 void activatePanning();
320 void activateGlobalPanning();
322 void onProjectionMode(
QAction* theAction );
323 void onStereoMode(
bool activate );
324 void onProjectionMode();
326 void activateProjectionMode(
int);
328 void activateSetFocalPointGravity();
329 void activateSetFocalPointSelected();
330 void activateStartFocalPointSelection();
331 void activateInteractiveSelection();
332 void deactivateCurrectOperation();
334 void onViewParameters(
bool theIsActivate);
336 void onSwitchInteractionStyle(
bool theOn);
337 void onSwitchZoomingStyle(
bool theOn);
339 void onSwitchPreSelectionMode(
int theMode);
340 void onEnableSelection(
bool theOn);
342 void onStartRecording();
343 void onPlayRecording();
344 void onPauseRecording();
345 void onStopRecording();
355 virtual void onFrontView();
358 virtual void onBackView();
361 virtual void onTopView();
364 virtual void onBottomView();
367 virtual void onRightView();
370 virtual void onLeftView();
373 virtual void onClockWiseView();
376 virtual void onAntiClockWiseView();
379 virtual void onResetView();
382 virtual void onFitAll();
385 virtual void onFitSelection();
391 virtual void onViewTrihedron(
bool);
394 virtual void onViewCubeAxes();
397 virtual void onAdjustTrihedron();
400 virtual void onAdjustCubeAxes();
406 void onKeyPressed(QKeyEvent* event);
407 void onKeyReleased(QKeyEvent* event);
408 void onMousePressed(QMouseEvent* event);
409 void onMouseDoubleClicked(QMouseEvent* event);
410 void onMouseReleased(QMouseEvent* event);
411 void onMouseMoving(QMouseEvent* event);
416 enum StereoType { CrystalEyes, RedBlue, Interlaced, Left, Right, Dresden,
Anaglyph, Checkerboard, SplitViewPortHorizontal };
422 virtual void resizeEvent( QResizeEvent* );
424 virtual void Initialize(
SVTK_View* theView,
428 static void ProcessEvents(
vtkObject*
object,
433 bool isOpenGlStereoSupport()
const;
435 void doSetVisualParameters(
const QString&,
bool =
false );
436 void SetEventDispatcher(
vtkObject* theDispatcher);
438 QImage dumpViewContent();
440 virtual QString
filter()
const;
441 virtual bool dumpViewToFormat(
const QImage& img,
const QString& fileName,
const QString& format );
443 virtual bool action(
const int );
446 void createToolBar();
449 enum {
DumpId, FitAllId, FitRectId, FitSelectionId, ZoomId, PanId, GlobalPanId,
451 FrontId, BackId, TopId, BottomId, LeftId, RightId, ClockWiseId,
AntiClockWiseId, ResetId,
453 ParallelModeId, ProjectionModeId, StereoModeId, ViewParametersId, SynchronizeId, SwitchInteractionStyleId,
499 #pragma warning( default:4251 )
Handle(TDocStd_Application) CAF_Application
Get OCAF application.
Definition: CAF_Application.cxx:97
const QString const bool const double theScale
Definition: OCCViewer_ViewModel.cxx:954
Selection_Mode
Definition: SALOME_Selection.h:27
#define SVTK_EXPORT
Definition: SVTK.h:37
int Preselection_Mode
Preselection modes.
Definition: SVTK_Selection.h:45
For more information see QT documentation.
Definition: SUIT_Application.h:42
Generic action class.
Definition: QtxAction.h:40
Stores background data.
Definition: Qtx.h:178
Definition: SALOME_ListIO.hxx:29
Base class for Camera Properties.
Definition: SUIT_CameraProperties.h:29
Definition: SUIT_Desktop.h:47
Definition: SUIT_ResourceMgr.h:31
Definition: SUIT_ViewWindow.h:42
virtual bool action(const int)
Definition: SUIT_ViewWindow.cxx:225
bool dumpViewToFormat(const QString &fileName, const QString &format)
Definition: SUIT_ViewWindow.cxx:125
virtual void setVisualParameters(const QString ¶meters)
Definition: SUIT_ViewWindow.cxx:259
virtual QString getVisualParameters()
Definition: SUIT_ViewWindow.cxx:250
virtual SUIT_CameraProperties cameraProperties()
Definition: SUIT_ViewWindow.cxx:358
virtual QImage dumpView()
Definition: SUIT_ViewWindow.cxx:92
virtual void synchronize(SUIT_ViewWindow *)
Definition: SUIT_ViewWindow.cxx:372
virtual QString filter() const
Definition: SUIT_ViewWindow.cxx:175
Definition: SVTK_CubeAxesActor2D.h:54
Definition: SVTK_CubeAxesDlg.h:62
Introduce SALOME way of user interaction.
Definition: SVTK_InteractorStyle.h:158
Introduce new style of interaction (keyboard free)
Definition: SVTK_KeyFreeInteractorStyle.h:33
Definition: SVTK_NonIsometricDlg.h:41
Definition: SVTK_Recorder.h:35
Extends QVTK_RenderWindowInteractor functionality.
Definition: SVTK_RenderWindowInteractor.h:141
Definition: SVTK_Renderer.h:66
Define an abstract interface for selection in SVTK package.
Definition: SVTK_Selector.h:58
Definition: SVTK_SetRotationPointDlg.h:56
Definition: SVTK_UpdateRateDlg.h:48
To define minimal interface for SVTK_ViewWindow initialization.
Definition: SVTK_ViewModelBase.h:34
Definition: SVTK_ViewParameterDlg.h:49
Define a container for SALOME VTK view window.
Definition: SVTK_ViewWindow.h:86
void actorAdded(VTKViewer_Actor *)
SVTK_View * myView
Definition: SVTK_ViewWindow.h:459
SVTK_ViewModelBase * myModel
Definition: SVTK_ViewWindow.h:460
QtxAction * myPlayAction
Definition: SVTK_ViewWindow.h:484
vtkSmartPointer< SVTK_KeyFreeInteractorStyle > myKeyFreeInteractorStyle
Definition: SVTK_ViewWindow.h:464
salomevtk::vtkPVAxesWidget * myAxesWidget
Definition: SVTK_ViewWindow.h:491
SVTK_CubeAxesDlg * myCubeAxesDlg
Definition: SVTK_ViewWindow.h:475
int myRecordingToolBar
Definition: SVTK_ViewWindow.h:489
Qtx::BackgroundData myBackground
Definition: SVTK_ViewWindow.h:492
SVTK_RenderWindowInteractor * myInteractor
Definition: SVTK_ViewWindow.h:462
SVTK_ViewParameterDlg * myViewParameterDlg
Definition: SVTK_ViewWindow.h:477
QImage myDumpImage
Definition: SVTK_ViewWindow.h:495
QtxAction * myPauseAction
Definition: SVTK_ViewWindow.h:485
SVTK_NonIsometricDlg * myNonIsometricDlg
Definition: SVTK_ViewWindow.h:473
SVTK_SetRotationPointDlg * mySetRotationPointDlg
Definition: SVTK_ViewWindow.h:476
QtxAction * myStartAction
Definition: SVTK_ViewWindow.h:483
int myToolBar
Definition: SVTK_ViewWindow.h:488
QSize myPreRecordingMaxSize
Definition: SVTK_ViewWindow.h:480
void actorRemoved(VTKViewer_Actor *)
AnaglyphFilter
Definition: SVTK_ViewWindow.h:418
vtkSmartPointer< vtkCallbackCommand > myEventCallbackCommand
Definition: SVTK_ViewWindow.h:471
QSize myPreRecordingMinSize
Definition: SVTK_ViewWindow.h:479
Handle(SALOME_InteractiveObject) FindIObject(const char *theEntry)
Redirect the request to #SVTK_View::FindIObject (to support old code)
vtkSmartPointer< vtkObject > myEventDispatcher
Definition: SVTK_ViewWindow.h:468
SVTK_UpdateRateDlg * myUpdateRateDlg
Definition: SVTK_ViewWindow.h:474
SVTK_Recorder * myRecorder
Definition: SVTK_ViewWindow.h:482
QString myVisualParams
Definition: SVTK_ViewWindow.h:466
StereoType
Definition: SVTK_ViewWindow.h:416
@ Anaglyph
Definition: SVTK_ViewWindow.h:416
void transformed(SVTK_ViewWindow *)
ProjectionType
Definition: SVTK_ViewWindow.h:414
@ Parallel
Definition: SVTK_ViewWindow.h:414
QtxAction * myStopAction
Definition: SVTK_ViewWindow.h:486
@ SwitchZoomingStyleId
Definition: SVTK_ViewWindow.h:454
@ DisablePreselectionId
Definition: SVTK_ViewWindow.h:455
@ ParallelModeId
Definition: SVTK_ViewWindow.h:453
@ EnableSelectionId
Definition: SVTK_ViewWindow.h:456
@ GraduatedAxes
Definition: SVTK_ViewWindow.h:452
@ PauseRecordingId
Definition: SVTK_ViewWindow.h:457
@ DumpId
Definition: SVTK_ViewWindow.h:449
@ AntiClockWiseId
Definition: SVTK_ViewWindow.h:451
@ ChangeRotationPointId
Definition: SVTK_ViewWindow.h:450
vtkSmartPointer< SVTK_InteractorStyle > myDefaultInteractorStyle
Definition: SVTK_ViewWindow.h:463
This class is introduced just for compatibility with old code.
Definition: SVTK_View.h:119
Definition: VTKViewer_Actor.h:79
Definition: VTKViewer_Trihedron.h:145
Definition: SALOME_Actor.cxx:148
int convertAction(const int accelAction)
Definition: SVTK_ViewWindow.cxx:120
Definition: salomevtkPVAxesActor.cxx:60