Version: 6.3.1

src/VISUGUI/VisuGUI_Slider.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 //  VISU VISUGUI : GUI of VISU component
00024 //  File   : VisuGUI_Slider.h
00025 //  Author : Oleg UVAROV
00026 //  Module : VISU
00027 //
00028 #ifndef VisuGUI_Slider_HeaderFile
00029 #define VisuGUI_Slider_HeaderFile
00030 
00031 #include <QWidget>
00032 #include <QPixmap>
00033 
00034 #include <vector>
00035 
00036 #include "SALOMEconfig.h"
00037 #include CORBA_SERVER_HEADER(VISU_Gen)
00038 
00039 namespace VISU
00040 {
00041   class ColoredPrs3dHolder_i;
00042 }
00043 
00044 class QComboBox;
00045 class QLabel;
00046 class QLineEdit;
00047 class QToolButton;
00048 class QSlider;
00049 class QCheckBox;
00050 class QRadioButton;
00051 class QMainWindow;
00052 class QTimer;
00053 class QAction;
00054 
00055 class SalomeApp_DoubleSpinBox;
00056 class LightApp_SelectionMgr;
00057 class VisuGUI;
00058 
00059 class VisuGUI_Slider : public QWidget
00060 {
00061   Q_OBJECT;
00062 
00063 public:
00064   VisuGUI_Slider( VisuGUI* theModule, 
00065                   QMainWindow* theParent,
00066                   LightApp_SelectionMgr* theSelectionMgr );
00067 
00068   virtual ~VisuGUI_Slider();
00069   
00070   QAction* toggleViewAction();
00071 
00072 public slots:
00073   virtual void     onSelectionChanged();
00074 
00075   virtual void     onTimeStampActivated( int );
00076 
00077   virtual void     onFirst();
00078   virtual void     onPrevious();
00079   virtual void     onPlay( bool );
00080   virtual void     onNext();
00081   virtual void     onLast();
00082 
00083   virtual void     onValueChanged( int );
00084 
00085   virtual void     onSpeedChanged( int );
00086 
00087   virtual void     onTimeout();
00088 
00089   virtual void     onToggleView( bool );
00090 
00091   void onMemoryModeChanged( bool );
00092   void onMemorySizeChanged( double );
00093 
00094 protected slots:
00095   void onModuleDeactivated();
00096   void onModuleActivated();
00097 
00098 protected:
00099   virtual void     enableControls( bool );
00100   virtual void     updateMemoryState();
00101   virtual bool     checkHolderList();
00102 
00103 private:
00104   LightApp_SelectionMgr* mySelectionMgr;
00105   VISU::ViewManager_var  myViewManager;
00106   VisuGUI*               myModule;
00107 
00108   QSlider*         mySlider;
00109   QLabel*          myFirstTimeStamp;
00110   QLabel*          myLastTimeStamp;
00111 
00112   QWidget* myPlayTab;
00113 
00114   QToolButton*     myIsCycled;
00115   QToolButton*     myFirstButton;
00116   QToolButton*     myPreviousButton;
00117   QToolButton*     myPlayButton;
00118   QToolButton*     myNextButton;
00119   QToolButton*     myLastButton;
00120 
00121   QComboBox*       myTimeStampStrings;
00122   QComboBox*       myTimeStampIndexes;
00123 
00124   QSlider*         mySpeedSlider;
00125 
00126   QRadioButton*     myMinimalMemoryButton;
00127   QRadioButton*     myLimitedMemoryButton;
00128   SalomeApp_DoubleSpinBox*  myLimitedMemory;
00129 
00130   QLineEdit*      myUsedMemory;
00131   QLineEdit*      myFreeMemory;
00132 
00133   typedef std::vector<VISU::ColoredPrs3dHolder_var> THolderList;
00134   THolderList     myHolderList;
00135   
00136   QTimer*         myTimer;
00137   QPixmap         myPlayPixmap;
00138   QPixmap         myPausePixmap;
00139   QAction*        myToggleViewAction;
00140 };
00141 
00142 #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