]> SALOME platform Git repositories - modules/gui.git/blob - src/SVTK/SVTK_MainWindow.cxx
Salome HOME
145aa9aa5e744970463019e923572518fd1af7a8
[modules/gui.git] / src / SVTK / SVTK_MainWindow.cxx
1 //  SALOME VTKViewer : build VTK viewer into Salome desktop
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : 
25 //  Author : 
26 //  Module : SALOME
27 //  $Header$
28
29 #include "SALOME_Actor.h"
30
31 #include <vtkGenericRenderWindowInteractor.h>
32 #include <vtkRenderer.h>
33
34 #include "QtxAction.h"
35
36 #include "SUIT_ToolButton.h"
37 #include "SUIT_MessageBox.h"
38 #include "SUIT_ViewWindow.h"
39
40 #include "SUIT_Tools.h"
41 #include "SUIT_ResourceMgr.h"
42 #include "SVTK_NonIsometricDlg.h"
43 #include "SVTK_CubeAxesDlg.h"
44
45 #include "SVTK_MainWindow.h"
46 #include "SVTK_Event.h"
47 #include "SVTK_Renderer.h"
48 #include "SVTK_RenderWindowInteractor.h"
49
50 #include "SVTK_Selector.h"
51
52 #include <qimage.h>
53
54
55 //----------------------------------------------------------------------------
56 SVTK_MainWindow
57 ::SVTK_MainWindow(QWidget* theParent, 
58                   const char* theName,
59                   SUIT_ResourceMgr* theResourceMgr,
60                   SUIT_ViewWindow* theViewWindow) :
61   QMainWindow(theParent,theName,0),
62   myViewWindow(theViewWindow)
63 {
64   myToolBar = new QToolBar(this);
65   myToolBar->setCloseMode(QDockWindow::Undocked);
66   myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
67
68   createActions(theResourceMgr);
69   createToolBar();
70 }
71
72 void
73 SVTK_MainWindow
74 ::Initialize(SVTK_RenderWindowInteractor* theInteractor)
75 {
76   myInteractor = theInteractor;
77   SetEventDispatcher(myInteractor->GetDevice());
78
79   setCentralWidget(myInteractor);
80   myInteractor->setBackgroundMode(Qt::NoBackground);
81
82   myInteractor->setFocusPolicy(StrongFocus);
83   myInteractor->setFocus();
84   setFocusProxy(myInteractor);
85 }
86
87
88 //----------------------------------------------------------------------------
89 SVTK_MainWindow
90 ::~SVTK_MainWindow()
91 {
92 }
93
94
95 //----------------------------------------------------------------------------
96 SVTK_RenderWindowInteractor*
97 SVTK_MainWindow
98 ::GetInteractor()
99 {
100   return myInteractor;
101 }
102
103 vtkRenderWindowInteractor*
104 SVTK_MainWindow
105 ::getInteractor()
106 {
107   return GetInteractor()->GetDevice();
108 }
109
110 vtkRenderWindow*
111 SVTK_MainWindow
112 ::getRenderWindow()
113 {
114   return GetInteractor()->getRenderWindow();
115 }
116
117 //----------------------------------------------------------------------------
118 void
119 SVTK_MainWindow
120 ::Repaint(bool theUpdateTrihedron)
121 {
122   if(theUpdateTrihedron) 
123     GetRenderer()->OnAdjustTrihedron();
124
125   GetInteractor()->update();
126 }
127
128 //----------------------------------------------------------------------------
129 void
130 SVTK_MainWindow
131 ::InvokeEvent(unsigned long theEvent, void* theCallData)
132 {
133   GetInteractor()->InvokeEvent(theEvent,theCallData);
134 }
135
136 //----------------------------------------------------------------------------
137 vtkInteractorStyle*
138 SVTK_MainWindow
139 ::GetInteractorStyle()
140 {
141   return GetInteractor()->GetInteractorStyle();
142 }
143
144 void
145 SVTK_MainWindow
146 ::PushInteractorStyle(vtkInteractorStyle* theStyle)
147 {
148   GetInteractor()->PushInteractorStyle(theStyle);
149 }
150
151 void
152 SVTK_MainWindow
153 ::PopInteractorStyle()
154 {
155   GetInteractor()->PopInteractorStyle();
156 }
157
158 //----------------------------------------------------------------------------
159 SVTK_Selector*
160 SVTK_MainWindow
161 ::GetSelector()
162 {
163   return GetInteractor()->GetSelector();
164 }
165
166 Selection_Mode
167 SVTK_MainWindow
168 ::SelectionMode()
169 {
170   return GetSelector()->SelectionMode();
171 }
172
173 void
174 SVTK_MainWindow
175 ::SetSelectionMode(Selection_Mode theMode)
176 {
177   GetSelector()->SetSelectionMode(theMode);
178 }
179
180
181 //----------------------------------------------------------------------------
182 SVTK_Renderer* 
183 SVTK_MainWindow
184 ::GetRenderer()
185 {
186   return GetInteractor()->GetRenderer();
187 }
188
189 vtkRenderer* 
190 SVTK_MainWindow
191 ::getRenderer()
192 {
193   return GetInteractor()->getRenderer();
194 }
195
196 //----------------------------------------------------------------------------
197 void
198 SVTK_MainWindow
199 ::SetBackgroundColor(const QColor& theColor)
200 {
201   getRenderer()->SetBackground(theColor.red()/255.0, 
202                                theColor.green()/255.0,
203                                theColor.blue()/255.0);
204 }
205
206 QColor
207 SVTK_MainWindow
208 ::BackgroundColor()
209 {
210   float aBackgroundColor[3];
211   getRenderer()->GetBackground(aBackgroundColor);
212   return QColor(int(aBackgroundColor[0]*255), 
213                 int(aBackgroundColor[1]*255), 
214                 int(aBackgroundColor[2]*255));
215 }
216
217 //----------------------------------------------------------------------------
218 void
219 SVTK_MainWindow
220 ::GetScale( double theScale[3] ) 
221 {
222   GetRenderer()->GetScale( theScale );
223 }
224
225 void
226 SVTK_MainWindow
227 ::SetScale( double theScale[3] ) 
228 {
229   GetRenderer()->SetScale( theScale );
230   Repaint();
231 }
232
233
234 //----------------------------------------------------------------------------
235 void
236 SVTK_MainWindow
237 ::AddActor(VTKViewer_Actor* theActor, 
238            bool theIsUpdate)
239 {
240   GetRenderer()->AddActor(theActor);
241   if(theIsUpdate) 
242     Repaint();
243 }
244
245 //----------------------------------------------------------------------------
246 void
247 SVTK_MainWindow
248 ::RemoveActor(VTKViewer_Actor* theActor, 
249               bool theIsUpdate)
250 {
251   GetRenderer()->RemoveActor(theActor);
252   if(theIsUpdate) 
253     Repaint();
254 }
255
256
257 //----------------------------------------------------------------------------
258 int
259 SVTK_MainWindow
260 ::GetTrihedronSize()
261 {
262   return GetRenderer()->GetTrihedronSize();
263 }
264
265 //----------------------------------------------------------------------------
266 void 
267 SVTK_MainWindow
268 ::SetTrihedronSize( const int theSize, const bool theRelative )
269 {
270   GetRenderer()->SetTrihedronSize(theSize, theRelative);
271   Repaint();
272 }
273
274
275 //----------------------------------------------------------------------------
276 /*! If parameter theIsForcedUpdate is true, recalculate parameters for
277  *  trihedron and cube axes, even if trihedron and cube axes is invisible.
278  */
279 void
280 SVTK_MainWindow
281 ::AdjustActors()
282 {
283   GetRenderer()->AdjustActors();
284   Repaint();
285 }
286
287 //----------------------------------------------------------------------------
288 bool
289 SVTK_MainWindow
290 ::IsTrihedronDisplayed()
291 {
292   return GetRenderer()->IsTrihedronDisplayed();
293 }
294
295 //----------------------------------------------------------------------------
296 bool
297 SVTK_MainWindow
298 ::IsCubeAxesDisplayed()
299 {
300   return GetRenderer()->IsCubeAxesDisplayed();
301 }
302
303 //----------------------------------------------------------------------------
304 VTKViewer_Trihedron*  
305 SVTK_MainWindow
306 ::GetTrihedron() 
307
308   return GetRenderer()->GetTrihedron(); 
309 }
310
311 //----------------------------------------------------------------------------
312 SVTK_CubeAxesActor2D* 
313 SVTK_MainWindow
314 ::GetCubeAxes() 
315
316   return GetRenderer()->GetCubeAxes(); 
317 }
318
319
320 //----------------------------------------------------------------------------
321 QToolBar* 
322 SVTK_MainWindow
323 ::getToolBar()
324 {
325   return myToolBar;
326 }
327
328 //----------------------------------------------------------------------------
329 void
330 SVTK_MainWindow
331 ::SetEventDispatcher(vtkObject* theDispatcher)
332 {
333   myEventDispatcher = theDispatcher;
334 }
335
336 //----------------------------------------------------------------------------
337 #if defined(WIN32) && !defined(_DEBUG)
338 #pragma optimize( "", off )
339 #endif
340
341 void
342 SVTK_MainWindow
343 ::createActions(SUIT_ResourceMgr* theResourceMgr)
344 {
345   if(!myActionsMap.isEmpty()) 
346     return;
347   
348   QtxAction* anAction;
349
350   // Dump view
351   anAction = new QtxAction(tr("MNU_DUMP_VIEW"), 
352                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ),
353                            tr( "MNU_DUMP_VIEW" ), 0, this);
354   anAction->setStatusTip(tr("DSC_DUMP_VIEW"));
355   connect(anAction, SIGNAL(activated()), myViewWindow, SLOT(onDumpView()));
356   myActionsMap[ DumpId ] = anAction;
357
358   // FitAll
359   anAction = new QtxAction(tr("MNU_FITALL"), 
360                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ),
361                            tr( "MNU_FITALL" ), 0, this);
362   anAction->setStatusTip(tr("DSC_FITALL"));
363   connect(anAction, SIGNAL(activated()), this, SLOT(onFitAll()));
364   myActionsMap[ FitAllId ] = anAction;
365
366   // FitRect
367   anAction = new QtxAction(tr("MNU_FITRECT"), 
368                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ),
369                            tr( "MNU_FITRECT" ), 0, this);
370   anAction->setStatusTip(tr("DSC_FITRECT"));
371   connect(anAction, SIGNAL(activated()), this, SLOT(activateWindowFit()));
372   myActionsMap[ FitRectId ] = anAction;
373
374   // Zoom
375   anAction = new QtxAction(tr("MNU_ZOOM_VIEW"), 
376                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ),
377                            tr( "MNU_ZOOM_VIEW" ), 0, this);
378   anAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
379   connect(anAction, SIGNAL(activated()), this, SLOT(activateZoom()));
380   myActionsMap[ ZoomId ] = anAction;
381
382   // Panning
383   anAction = new QtxAction(tr("MNU_PAN_VIEW"), 
384                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ),
385                            tr( "MNU_PAN_VIEW" ), 0, this);
386   anAction->setStatusTip(tr("DSC_PAN_VIEW"));
387   connect(anAction, SIGNAL(activated()), this, SLOT(activatePanning()));
388   myActionsMap[ PanId ] = anAction;
389
390   // Global Panning
391   anAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), 
392                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ),
393                            tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
394   anAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
395   connect(anAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning()));
396   myActionsMap[ GlobalPanId ] = anAction;
397
398   // Rotation
399   anAction = new QtxAction(tr("MNU_ROTATE_VIEW"), 
400                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ),
401                            tr( "MNU_ROTATE_VIEW" ), 0, this);
402   anAction->setStatusTip(tr("DSC_ROTATE_VIEW"));
403   connect(anAction, SIGNAL(activated()), this, SLOT(activateRotation()));
404   myActionsMap[ RotationId ] = anAction;
405
406   // Projections
407   anAction = new QtxAction(tr("MNU_FRONT_VIEW"), 
408                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ),
409                            tr( "MNU_FRONT_VIEW" ), 0, this);
410   anAction->setStatusTip(tr("DSC_FRONT_VIEW"));
411   connect(anAction, SIGNAL(activated()), this, SLOT(onFrontView()));
412   myActionsMap[ FrontId ] = anAction;
413
414   anAction = new QtxAction(tr("MNU_BACK_VIEW"), 
415                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ),
416                            tr( "MNU_BACK_VIEW" ), 0, this);
417   anAction->setStatusTip(tr("DSC_BACK_VIEW"));
418   connect(anAction, SIGNAL(activated()), this, SLOT(onBackView()));
419   myActionsMap[ BackId ] = anAction;
420
421   anAction = new QtxAction(tr("MNU_TOP_VIEW"), 
422                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ),
423                            tr( "MNU_TOP_VIEW" ), 0, this);
424   anAction->setStatusTip(tr("DSC_TOP_VIEW"));
425   connect(anAction, SIGNAL(activated()), this, SLOT(onTopView()));
426   myActionsMap[ TopId ] = anAction;
427
428   anAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), 
429                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ),
430                            tr( "MNU_BOTTOM_VIEW" ), 0, this);
431   anAction->setStatusTip(tr("DSC_BOTTOM_VIEW"));
432   connect(anAction, SIGNAL(activated()), this, SLOT(onBottomView()));
433   myActionsMap[ BottomId ] = anAction;
434
435   anAction = new QtxAction(tr("MNU_LEFT_VIEW"), 
436                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ),
437                            tr( "MNU_LEFT_VIEW" ), 0, this);
438   anAction->setStatusTip(tr("DSC_LEFT_VIEW"));
439   connect(anAction, SIGNAL(activated()), this, SLOT(onLeftView()));
440   myActionsMap[ LeftId ] = anAction;
441
442   anAction = new QtxAction(tr("MNU_RIGHT_VIEW"), 
443                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ),
444                            tr( "MNU_RIGHT_VIEW" ), 0, this);
445   anAction->setStatusTip(tr("DSC_RIGHT_VIEW"));
446   connect(anAction, SIGNAL(activated()), this, SLOT(onRightView()));
447   myActionsMap[ RightId ] = anAction;
448
449   // Reset
450   anAction = new QtxAction(tr("MNU_RESET_VIEW"), 
451                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ),
452                            tr( "MNU_RESET_VIEW" ), 0, this);
453   anAction->setStatusTip(tr("DSC_RESET_VIEW"));
454   connect(anAction, SIGNAL(activated()), this, SLOT(onResetView()));
455   myActionsMap[ ResetId ] = anAction;
456
457   // onViewTrihedron: Shows - Hides Trihedron
458   anAction = new QtxAction(tr("MNU_SHOW_TRIHEDRON"), 
459                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TRIHEDRON" ) ),
460                            tr( "MNU_SHOW_TRIHEDRON" ), 0, this);
461   anAction->setStatusTip(tr("DSC_SHOW_TRIHEDRON"));
462   connect(anAction, SIGNAL(activated()), this, SLOT(onViewTrihedron()));
463   myActionsMap[ ViewTrihedronId ] = anAction;
464
465   // onNonIsometric: Manage non-isometric params
466   anAction = new QtxAction(tr("MNU_SVTK_SCALING"), 
467                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_SCALING" ) ),
468                            tr( "MNU_SVTK_SCALING" ), 0, this);
469   anAction->setStatusTip(tr("DSC_SVTK_SCALING"));
470   anAction->setToggleAction(true);
471   connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onNonIsometric(bool)));
472   myActionsMap[ NonIsometric ] = anAction;
473
474   myNonIsometricDlg = new SVTK_NonIsometricDlg(this,"SVTK_NonIsometricDlg",anAction);
475
476   // onGraduatedAxes: Manage graduated axes params
477   anAction = new QtxAction(tr("MNU_SVTK_GRADUATED_AXES"), 
478                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_GRADUATED_AXES" ) ),
479                            tr( "MNU_SVTK_GRADUATED_AXES" ), 0, this);
480   anAction->setStatusTip(tr("DSC_SVTK_GRADUATED_AXES"));
481   anAction->setToggleAction(true);
482   connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onGraduatedAxes(bool)));
483   myActionsMap[ GraduatedAxes ] = anAction;
484
485   myCubeAxesDlg = new SVTK_CubeAxesDlg(this,"SVTK_CubeAxesDlg",anAction);
486 }
487
488 #if defined(WIN32) && !defined(_DEBUG)
489 #pragma optimize( "", on )
490 #endif
491
492 //----------------------------------------------------------------------------
493 void
494 SVTK_MainWindow
495 ::createToolBar()
496 {
497   myActionsMap[DumpId]->addTo(myToolBar);
498   myActionsMap[ViewTrihedronId]->addTo(myToolBar);
499
500   SUIT_ToolButton* aScaleBtn = new SUIT_ToolButton(myToolBar);
501   aScaleBtn->AddAction(myActionsMap[FitAllId]);
502   aScaleBtn->AddAction(myActionsMap[FitRectId]);
503   aScaleBtn->AddAction(myActionsMap[ZoomId]);
504
505   SUIT_ToolButton* aPanningBtn = new SUIT_ToolButton(myToolBar);
506   aPanningBtn->AddAction(myActionsMap[PanId]);
507   aPanningBtn->AddAction(myActionsMap[GlobalPanId]);
508
509   myActionsMap[RotationId]->addTo(myToolBar);
510
511   SUIT_ToolButton* aViewsBtn = new SUIT_ToolButton(myToolBar);
512   aViewsBtn->AddAction(myActionsMap[FrontId]);
513   aViewsBtn->AddAction(myActionsMap[BackId]);
514   aViewsBtn->AddAction(myActionsMap[TopId]);
515   aViewsBtn->AddAction(myActionsMap[BottomId]);
516   aViewsBtn->AddAction(myActionsMap[LeftId]);
517   aViewsBtn->AddAction(myActionsMap[RightId]);
518
519   myActionsMap[ResetId]->addTo(myToolBar);
520
521   myActionsMap[NonIsometric]->addTo(myToolBar);
522   myActionsMap[GraduatedAxes]->addTo(myToolBar);
523 }
524
525 //----------------------------------------------------------------------------
526 void
527 SVTK_MainWindow
528 ::activateZoom()
529 {
530   myEventDispatcher->InvokeEvent(SVTK::StartZoom,0);
531 }
532
533 //----------------------------------------------------------------------------
534 void
535 SVTK_MainWindow
536 ::activatePanning()
537 {
538   myEventDispatcher->InvokeEvent(SVTK::StartPan,0);
539 }
540
541 //----------------------------------------------------------------------------
542 void
543 SVTK_MainWindow
544 ::activateRotation()
545 {
546   myEventDispatcher->InvokeEvent(SVTK::StartRotate,0);
547 }
548
549 //----------------------------------------------------------------------------
550 void
551 SVTK_MainWindow
552 ::activateGlobalPanning()
553 {
554   myEventDispatcher->InvokeEvent(SVTK::StartGlobalPan,0);
555 }
556
557 //----------------------------------------------------------------------------
558 void
559 SVTK_MainWindow
560 ::activateWindowFit()
561 {
562   myEventDispatcher->InvokeEvent(SVTK::StartFitArea,0);
563 }
564
565 //----------------------------------------------------------------------------
566 void
567 SVTK_MainWindow
568 ::onFrontView()
569 {
570   GetRenderer()->OnFrontView();
571   Repaint();
572 }
573
574 //----------------------------------------------------------------------------
575 void
576 SVTK_MainWindow
577 ::onBackView()
578 {
579   GetRenderer()->OnBackView();
580   Repaint();
581 }
582
583 //----------------------------------------------------------------------------
584 void
585 SVTK_MainWindow
586 ::onTopView()
587 {
588   GetRenderer()->OnTopView();
589   Repaint();
590 }
591
592 //----------------------------------------------------------------------------
593 void
594 SVTK_MainWindow
595 ::onBottomView()
596 {
597   GetRenderer()->OnBottomView();
598   Repaint();
599 }
600
601 //----------------------------------------------------------------------------
602 void
603 SVTK_MainWindow
604 ::onLeftView()
605 {
606   GetRenderer()->OnLeftView();
607   Repaint();
608 }
609
610 //----------------------------------------------------------------------------
611 void
612 SVTK_MainWindow
613 ::onRightView()
614 {
615   GetRenderer()->OnRightView();
616   Repaint();
617 }
618
619 //----------------------------------------------------------------------------
620 void
621 SVTK_MainWindow
622 ::onResetView()
623 {
624   GetRenderer()->OnResetView();
625   Repaint();
626 }
627
628 //----------------------------------------------------------------------------
629 void
630 SVTK_MainWindow
631 ::onFitAll()
632 {
633   GetRenderer()->OnFitAll();
634   Repaint();
635 }
636
637 //----------------------------------------------------------------------------
638 void 
639 SVTK_MainWindow
640 ::onViewTrihedron()
641 {
642   GetRenderer()->OnViewTrihedron();
643   Repaint();
644 }
645
646 //----------------------------------------------------------------------------
647 void
648 SVTK_MainWindow
649 ::onViewCubeAxes()
650 {
651   GetRenderer()->OnViewCubeAxes();
652   Repaint();
653 }
654
655 //----------------------------------------------------------------------------
656 void
657 SVTK_MainWindow
658 ::onNonIsometric(bool theIsActivate)
659 {
660   if(theIsActivate){
661     myNonIsometricDlg->Update();
662     myNonIsometricDlg->show();
663   }else
664     myNonIsometricDlg->hide();
665 }
666
667 void
668 SVTK_MainWindow
669 ::onGraduatedAxes(bool theIsActivate)
670 {
671   if(theIsActivate){
672     myCubeAxesDlg->Update();
673     myCubeAxesDlg->show();
674   }else
675     myCubeAxesDlg->hide();
676 }
677
678 //----------------------------------------------------------------------------
679 void
680 SVTK_MainWindow
681 ::onAdjustTrihedron()
682 {   
683   GetRenderer()->OnAdjustTrihedron();
684 }
685
686 //----------------------------------------------------------------------------
687 void
688 SVTK_MainWindow
689 ::onAdjustCubeAxes()
690 {   
691   GetRenderer()->OnAdjustCubeAxes();
692 }
693
694 //----------------------------------------------------------------------------
695 QImage
696 SVTK_MainWindow
697 ::dumpView()
698 {
699   QPixmap px = QPixmap::grabWindow( GetInteractor()->winId() );
700   return px.convertToImage();
701 }