00001 //# Copyright (C) 2005 00002 //# Associated Universities, Inc. Washington DC, USA. 00003 //# 00004 //# This library is free software; you can redistribute it and/or modify it 00005 //# under the terms of the GNU Library General Public License as published by 00006 //# the Free Software Foundation; either version 2 of the License, or (at your 00007 //# option) any later version. 00008 //# 00009 //# This library is distributed in the hope that it will be useful, but WITHOUT 00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 //# License for more details. 00013 //# 00014 //# You should have received a copy of the GNU Library General Public License 00015 //# along with this library; if not, write to the Free Software Foundation, 00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00017 //# 00018 //# Correspondence concerning AIPS++ should be addressed as follows: 00019 //# Internet email: aips2-request@nrao.edu. 00020 //# Postal address: AIPS++ Project Office 00021 //# National Radio Astronomy Observatory 00022 //# 520 Edgemont Road 00023 //# Charlottesville, VA 22903-2475 USA 00024 //# 00025 #ifndef ANIMATORWIDGETT_QO_H 00026 #define ANIMATORWIDGETT_QO_H 00027 00028 #include <QtGui/QWidget> 00029 #include <display/QtViewer/AnimatorWidget.ui.h> 00030 00031 namespace casa { 00032 00038 class AnimatorWidget : public QWidget, protected Ui::AnimatorWidget { 00039 Q_OBJECT 00040 00041 public: 00042 AnimatorWidget(QWidget *parent = 0); 00043 00044 void setFrameInformation( int frm, int len ); 00045 void setRateInformation( int minr, int maxr, int rate ); 00046 void setModeEnabled( bool enable ); 00047 void setPlaying( int play ); 00048 bool isPlaying() const; 00049 int getRate() const; 00050 int getFrame() const; 00051 int getFrameCount() const; 00052 int getFrameStart() const; 00053 int getFrameEnd() const; 00054 int getStepSize() const; 00055 ~AnimatorWidget(); 00056 00057 static int heightOpen( ) { return 107; } 00058 static int heightClosed( ) { return 25; } 00059 static int heightHeader( ) { return 27; } 00060 00061 signals: 00062 void goTo(int frame); 00063 void setRate(int); 00064 void toStart(); 00065 void revStep(); 00066 void revPlay(); 00067 void stop(); 00068 void fwdStep(); 00069 void fwdPlay(); 00070 void toEnd(); 00071 void frameNumberEdited( int ); 00072 void lowerBoundChanged( int ); 00073 void upperBoundChanged( int ); 00074 void stepSizeChanged( int ); 00075 00076 public slots: 00077 void stopping(); 00078 00079 private slots: 00080 void frameNumberEdited(); 00081 void movieLimitLowerChanged( int value ); 00082 void movieLimitUpperChanged( int value ); 00083 void sliderControl( int action ); 00084 void endToEndMode( bool mode ); 00085 void starting(); 00086 void revStepping(); 00087 00088 void fwdStepping(); 00089 void ending(); 00090 void revPlaying(); 00091 void fwdPlaying(); 00092 00093 private: 00094 int resetFrameBounded( int frameNumber ) const; 00095 void disableAll(); 00096 void blockSignals( bool block ); 00097 int frameCount; 00098 int play; 00099 bool rateNotSet; 00100 }; 00101 } 00102 #endif // ANIMATORWIDGET_QO_H