Version: 6.3.1

src/SVTK/SVTK_GenericRenderWindowInteractor.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  SALOME VTKViewer : build VTK viewer into Salome desktop
00024 //  File   : 
00025 //  Author : 
00026 //  Module : SALOME
00027 //  $Header: /home/server/cvs/GUI/GUI_SRC/src/SVTK/SVTK_GenericRenderWindowInteractor.h,v 1.6.22.1.12.1 2011-06-01 13:53:40 vsr Exp $
00028 //
00029 #ifndef SVTK_GenericRenderWindowInteractor_h
00030 #define SVTK_GenericRenderWindowInteractor_h
00031 
00032 #include "SVTK.h"
00033 
00034 #include <QObject>
00035 #include <vtkGenericRenderWindowInteractor.h>
00036 #include <vtkSmartPointer.h>
00037 
00038 class QTimer;
00039 class QWidget;
00040 
00041 class SVTK_Selector;
00042 //class SVTK_Renderer;
00043 
00044 #ifdef WIN32
00045 #pragma warning ( disable:4251 )
00046 #endif
00047 
00059 class SVTK_EXPORT QVTK_GenericRenderWindowInteractor: 
00060  public QObject,
00061  public vtkGenericRenderWindowInteractor
00062 {
00063   Q_OBJECT;
00064 
00065  public:
00066   static QVTK_GenericRenderWindowInteractor* New();
00067   vtkTypeMacro(QVTK_GenericRenderWindowInteractor,vtkGenericRenderWindowInteractor);
00068 
00070   virtual
00071   int
00072   CreateTimer( int ) ; 
00073 
00075   virtual
00076   int
00077   DestroyTimer() ; 
00078 
00079  protected slots:
00081   void
00082   OnTimeOut();
00083 
00084  protected:
00085   QVTK_GenericRenderWindowInteractor(); 
00086   ~QVTK_GenericRenderWindowInteractor(); 
00087 
00088   QTimer* myTimer; 
00089 };
00090 
00091 
00099 class SVTK_EXPORT SVTK_GenericRenderWindowInteractor: public QVTK_GenericRenderWindowInteractor
00100 {
00101  public:
00102   static SVTK_GenericRenderWindowInteractor* New();
00103   vtkTypeMacro(SVTK_GenericRenderWindowInteractor,QVTK_GenericRenderWindowInteractor);
00104 
00106   SVTK_Selector* 
00107   GetSelector(); 
00108 
00110   void
00111   SetSelector(SVTK_Selector* theSelector);
00112 
00114   QWidget*
00115   GetRenderWidget();
00116 
00118   void
00119   SetRenderWidget(QWidget* theRenderWidget);
00120 
00121  protected:
00122   SVTK_GenericRenderWindowInteractor();
00123   ~SVTK_GenericRenderWindowInteractor();
00124 
00125   SVTK_Selector* mySelector; 
00126   QWidget* myRenderWidget; 
00127 };
00128 
00129 #ifdef WIN32
00130 #pragma warning ( default:4251 )
00131 #endif
00132 
00133 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS