AnimatorHolder.qo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef ANIMATORHOLDER_QO_H
00026 #define ANIMATORHOLDER_QO_H
00027
00028 #include <QtGui/QWidget>
00029 #include <display/QtViewer/InActiveDock.qo.h>
00030 #include <display/QtViewer/AnimatorHolder.ui.h>
00031 #include <display/QtViewer/AnimatorWidget.qo.h>
00032
00033 namespace casa {
00034
00035 class QtDisplayPanelGui;
00040 class AnimatorHolder : public InActiveDock, protected Ui::AnimatorHolder {
00041 Q_OBJECT
00042
00043 public:
00044 const static bool BLINK_MODE;
00045 const static bool NORMAL_MODE;
00046 AnimatorHolder( QtDisplayPanelGui *qdp, QWidget *parent = 0 );
00047 void setFrameInformation( bool mode, int frm, int len );
00048 void setRateInformation( bool mode, int minr, int maxr, int rate );
00049 void setModeEnabled( int count );
00050 void setChannelModeEnabled( int count, bool select=true);
00051 int getRate( bool mode ) const;
00052 int getLowerBoundChannel() const;
00053 int getUpperBoundChannel() const;
00054
00055 int getChannelCount() const;
00056 int getImageCount() const;
00057
00058 void setChannelZAxis( const QString& zAxisTite );
00059
00060 void foldChannel( );
00061 void unfoldChannel( );
00062 void foldImage( );
00063 void unfoldImage( );
00064
00065 ~AnimatorHolder();
00066
00067 void dismiss( );
00068
00069 protected:
00070 void closeEvent ( QCloseEvent * event );
00071
00072 signals:
00073
00074
00075
00076
00077 void setChannelMode( );
00078
00079 void goToChannel( int channel );
00080
00081 void channelNumEdited( int frame );
00082
00083 void selectChannel( int channel );
00084
00085 void channelMovieState( int currentFrame, bool direction, int stepSize, int frameStart, int frameEnd );
00086
00087
00088
00089 void setChannelMovieRate( int frame );
00090
00091 void toChannelMovieStart( );
00092
00093 void revStepChannelMovie( );
00094
00095 void revPlayChannelMovie( );
00096
00097 void stopChannelMovie( );
00098
00099 void fwdStepChannelMovie( );
00100
00101 void fwdPlayChannelMovie( );
00102
00103 void toChannelMovieEnd( );
00104
00105
00106
00107
00108 void setImageMode( bool channelCubes );
00109
00110 void goToImage( int image );
00111
00112 void imageNumEdited( int frame );
00113
00114 void selectImage( int channel );
00115
00116 void imageMovieState( int currentFrame, bool direction, int stepSize, int frameStart, int frameEnd );
00117
00118 void stopImageMovie( );
00119
00120 void setImageMovieRate( int frame );
00121
00122 void toImageMovieStart( );
00123
00124 void revStepImageMovie( );
00125
00126 void revPlayImageMovie( );
00127
00128
00129
00130 void fwdStepImageMovie( );
00131
00132 void fwdPlayImageMovie( );
00133
00134 void toImageMovieEnd( );
00135
00136 void lowerBoundAnimatorImageChanged( int );
00137 void upperBoundAnimatorImageChanged(int);
00138 void stepSizeAnimatorImageChanged(int);
00139 void lowerBoundAnimatorChannelChanged( int );
00140 void upperBoundAnimatorChannelChanged(int);
00141 void stepSizeAnimatorChannelChanged(int);
00142 void animationImageChanged(int);
00143
00144 private slots:
00145 void gotochannel_p(int frame);
00146 void setRateChannel(int frame);
00147 void toStartChannel();
00148 void frameNumberEditedChannel( int frame );
00149 void revStepChannel();
00150 void fwdPlayChannel();
00151 void revPlayChannel();
00152 void stopChannel();
00153 void fwdStepChannel();
00154 void toEndChannel();
00155 void upperBoundChangedChannel(int);
00156 void lowerBoundChangedChannel(int);
00157 void stepSizeChangedChannel(int);
00158 void gotoimage_p(int frame);
00159 void setRateImage(int frame);
00160 void toStartImage();
00161 void frameNumberEditedImage( int frame );
00162 void revStepImage();
00163 void revPlayImage();
00164 void stopImage();
00165 void fwdStepImage();
00166 void fwdPlayImage();
00167 void toEndImage();
00168 void lowerBoundChangedImage(int);
00169 void upperBoundChangedImage(int);
00170 void stepSizeChangedImage(int);
00171 void modeChange();
00172
00173 void handle_folding( bool visible );
00174 void handle_visibility(bool);
00175
00176 private:
00177 void initChannel();
00178 void initImage();
00179 void sizeGroupBox( QGroupBox* );
00180 int getAnimationCount() const;
00181 void addRemoveChannelAnimatorBasedOnFrameCount();
00182 int find_height( ) const;
00183
00184 enum Mode {CHANNEL_MODE, IMAGE_MODE, CHANNEL_IMAGES_MODE, END_MODE };
00185 void modeChanged(Mode mode );
00186 void changePalette( QGroupBox* box, QColor color );
00187 void emitMovieChannels( bool direction );
00188 void setSelected( bool mode );
00189
00190
00191
00192
00193 void stopImagePlay();
00194 void stopChannelPlay();
00195
00196 Mode previousMode;
00197 AnimatorWidget* animatorChannel;
00198 AnimatorWidget* animatorImage;
00199 QColor selectedColor;
00200 QColor backgroundColor;
00201
00202 QtDisplayPanelGui *panel_;
00203
00204 bool dismissed;
00205 };
00206 }
00207 #endif // ANIMATORHOLDER_QO_H