00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 // VISU VISUGUI : GUI of VISU component 00021 // File : VisuGUI_Sweep.h 00022 // Author : Oleg UVAROV 00023 // Module : VISU 00024 // 00025 #ifndef VisuGUI_Sweep_HeaderFile 00026 #define VisuGUI_Sweep_HeaderFile 00027 00028 #include "SALOME_GenericObjPointer.hh" 00029 00030 #include <vtkSmartPointer.h> 00031 00032 #include <QWidget> 00033 #include <QPixmap> 00034 00035 class QComboBox; 00036 class QToolButton; 00037 class QSlider; 00038 class QCheckBox; 00039 class QMainWindow; 00040 class QTimer; 00041 class QAction; 00042 00043 class SalomeApp_IntSpinBox; 00044 class SalomeApp_DoubleSpinBox; 00045 00046 class LightApp_SelectionMgr; 00047 class SVTK_ViewWindow; 00048 class VISU_Actor; 00049 class VisuGUI; 00050 00051 00052 namespace VISU 00053 { 00054 class ColoredPrs3d_i; 00055 } 00056 00057 00058 //---------------------------------------------------------------------------- 00059 class VisuGUI_Sweep : public QWidget 00060 { 00061 Q_OBJECT; 00062 00063 public: 00064 VisuGUI_Sweep( VisuGUI* theModule, 00065 QMainWindow* theParent, 00066 LightApp_SelectionMgr* theSelectionMgr ); 00067 00068 virtual ~VisuGUI_Sweep(); 00069 00070 QAction* toggleViewAction(); 00071 00072 public slots: 00073 virtual void onSelectionChanged(); 00074 00075 virtual void onFirst(); 00076 00077 virtual void onPrevious(); 00078 00079 virtual void onPlay( bool ); 00080 00081 virtual void onNext(); 00082 00083 virtual void onLast(); 00084 00085 virtual void onStop(); 00086 00087 virtual void onEnable( bool ); 00088 00089 virtual void onValueChanged( int ); 00090 00091 virtual void onDelayChanged( double ); 00092 00093 virtual void onNumberOfStepsChanged( int ); 00094 00095 virtual void onModeChanged( int ); 00096 00097 virtual void onTimeout(); 00098 00099 virtual void onToggleView( bool ); 00100 00101 void onModuleDeactivated(); 00102 00103 void onModuleActivated(); 00104 00105 private: 00106 QSlider* mySweepSlider; 00107 00108 QToolButton* myFirstButton; 00109 QToolButton* myPreviousButton; 00110 QToolButton* myPlayButton; 00111 QToolButton* myNextButton; 00112 QToolButton* myLastButton; 00113 00114 QCheckBox* myIsCycled; 00115 00116 QComboBox* mySweepMode; 00117 SalomeApp_IntSpinBox* myNumberOfSteps; 00118 00119 QComboBox* myIntervals; 00120 SalomeApp_DoubleSpinBox* myStepDelay; 00121 00122 QTimer* myTimer; 00123 QPixmap myPlayPixmap; 00124 QPixmap myPausePixmap; 00125 QAction* myToggleViewAction; 00126 00127 VisuGUI* myModule; 00128 SVTK_ViewWindow* myViewWindow; 00129 00130 VISU_Actor* myActor; 00131 SALOME::GenericObjPtr< VISU::ColoredPrs3d_i > myColoredPrs3d; 00132 }; 00133 00134 00135 //---------------------------------------------------------------------------- 00136 00137 00138 #endif