casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AnimatorHolder.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005,2013
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 #ifndef ANIMATORHOLDER_QO_H
26 #define ANIMATORHOLDER_QO_H
27 
28 #include <QWidget>
30 #include <display/QtViewer/AnimatorHolder.ui.h>
32 
33 namespace casa {
34 
35  class QtDisplayPanelGui;
40  class AnimatorHolder : public InActiveDock, protected Ui::AnimatorHolder {
41  Q_OBJECT
42 
43  public:
44  const static bool BLINK_MODE;
45  const static bool NORMAL_MODE;
46  AnimatorHolder( QtDisplayPanelGui *qdp, QWidget *parent = 0 );
47  void setFrameInformation( bool mode, int frm, int len );
48  void setRateInformation( bool mode, int minr, int maxr, int rate );
49  void setModeEnabled( int count );
50  void setChannelModeEnabled( int count, bool select=true);
51  int getRate( bool mode ) const;
52  int getLowerBoundChannel() const;
53  int getUpperBoundChannel() const;
54 
55  int getChannelCount() const;
56  int getImageCount() const;
57 
58  void setChannelZAxis( const QString& zAxisTite );
59 
60  void foldChannel( );
61  void unfoldChannel( );
62  void foldImage( );
63  void unfoldImage( );
64 
66 
67  void dismiss( );
68 
69  protected:
70  void closeEvent ( QCloseEvent * event );
71 
72  signals:
73 
74  //--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
75  // animation for channels
76  //--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
77  void setChannelMode( );
78 /*goTo*///displayPanel
79  void goToChannel( int channel );
80 /*frameNumberEdited*/
81  void channelNumEdited( int frame );
82 /*channelSelect*/
83  void selectChannel( int channel );
84 /*movieChannels*/
85  void channelMovieState( int currentFrame, bool direction, int stepSize, int frameStart, int frameEnd );
86 /*stopMovie*///display
87  //void stopChannelMovie( );
88 /*setRate*///displayPanel
89  void setChannelMovieRate( int frame );
90 /*toStart*///displayPanel
91  void toChannelMovieStart( );
92 /*revStep*///displayPanel
93  void revStepChannelMovie( );
94 /*revPlay*/
95  void revPlayChannelMovie( );
96 /*stop*///displayPanel
97  void stopChannelMovie( );
98 /*fwdStep*///displayPanel
99  void fwdStepChannelMovie( );
100 /*fwdPlay*/
101  void fwdPlayChannelMovie( );
102 /*toEnd*///displayPanel
103  void toChannelMovieEnd( );
104 
105  //--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
106  // animation for images
107  //--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
108  void setImageMode( bool channelCubes );
109 /*goTo*///displayPanel
110  void goToImage( int image );
111 /*frameNumberEdited*/
112  void imageNumEdited( int frame );
113 /*channelSelect*/
114  void selectImage( int channel );
115 /*movieChannels*/
116  void imageMovieState( int currentFrame, bool direction, int stepSize, int frameStart, int frameEnd );
117 /*stopMovie*/
118  void stopImageMovie( );
119 /*setRate*///setImageMovieRate
120  void setImageMovieRate( int frame );
121 /*toStart*///displayPanel
122  void toImageMovieStart( );
123 /*revStep*///displayPanel
124  void revStepImageMovie( );
125 /*revPlay*/
126  void revPlayImageMovie( );
127 /*stop*///displayPanel
128  //void stopImageMovie( );
129 /*fwdStep*///displayPanel
130  void fwdStepImageMovie( );
131 /*fwdPlay*/
132  void fwdPlayImageMovie( );
133 /*toEnd*///displayPanel
134  void toImageMovieEnd( );
135 
136  void lowerBoundAnimatorImageChanged( int );
142  void animationImageChanged(int);
143 
144  private slots:
145  void gotochannel_p(int frame);
146  void setRateChannel(int frame);
147  void toStartChannel();
148  void frameNumberEditedChannel( int frame );
149  void revStepChannel();
150  void fwdPlayChannel();
151  void revPlayChannel();
152  void stopChannel();
153  void fwdStepChannel();
154  void toEndChannel();
155  void upperBoundChangedChannel(int);
156  void lowerBoundChangedChannel(int);
157  void stepSizeChangedChannel(int);
158  void gotoimage_p(int frame);
159  void setRateImage(int frame);
160  void toStartImage();
161  void frameNumberEditedImage( int frame );
162  void revStepImage();
163  void revPlayImage();
164  void stopImage();
165  void fwdStepImage();
166  void fwdPlayImage();
167  void toEndImage();
168  void lowerBoundChangedImage(int);
169  void upperBoundChangedImage(int);
170  void stepSizeChangedImage(int);
171  void modeChange();
172 
173  void handle_folding( bool visible );
174  void handle_visibility(bool);
175 
176  private:
177  void initChannel();
178  void initImage();
179  void sizeGroupBox( QGroupBox* );
180  int getAnimationCount() const;
182  int find_height( ) const;
183 
185  void modeChanged(Mode mode );
186  void changePalette( QGroupBox* box, QColor color );
187  void emitMovieChannels( bool direction );
188  void setSelected( bool mode );
189 
190  //Because the user can switch between image and channel mode by
191  //just pressing the play button, there must be a way to turn a previous
192  //play off if one was running. The following two methods do that.
193  void stopImagePlay();
194  void stopChannelPlay();
195 
201 
203 
204  bool dismissed;
205  };
206 }
207 #endif // ANIMATORHOLDER_QO_H
void stepSizeChangedChannel(int)
void setImageMovieRate(int frame)
void lowerBoundChangedChannel(int)
void stepSizeAnimatorChannelChanged(int)
void sizeGroupBox(QGroupBox *)
void setChannelMovieRate(int frame)
void stopChannelMovie();
void setSelected(bool mode)
void upperBoundChangedImage(int)
Manages an individual panel of the viewer animator.
void selectChannel(int channel)
void channelNumEdited(int frame)
void setRateImage(int frame)
void changePalette(QGroupBox *box, QColor color)
void goToImage(int image)
void setChannelModeEnabled(int count, bool select=true)
void imageNumEdited(int frame)
void upperBoundChangedChannel(int)
void addRemoveChannelAnimatorBasedOnFrameCount()
static const bool NORMAL_MODE
Manages the Animator display on the viewer that allows users to scroll through either the channels wi...
void handle_folding(bool visible)
QtDisplayPanelGui * panel_
void lowerBoundChangedImage(int)
void emitMovieChannels(bool direction)
void fwdStepImageMovie()
void stopImageMovie();
void stepSizeChangedImage(int)
int getLowerBoundChannel() const
void setModeEnabled(int count)
void setFrameInformation(bool mode, int frm, int len)
void imageMovieState(int currentFrame, bool direction, int stepSize, int frameStart, int frameEnd)
void setRateInformation(bool mode, int minr, int maxr, int rate)
static const bool BLINK_MODE
void gotoimage_p(int frame)
void setImageMode(bool channelCubes)
animation for images
void setChannelZAxis(const QString &zAxisTite)
void channelMovieState(int currentFrame, bool direction, int stepSize, int frameStart, int frameEnd)
The main display window for the Qt version of the viewer.
int getUpperBoundChannel() const
void handle_visibility(bool)
void animationImageChanged(int)
void setChannelMode()
animation for channels
void gotochannel_p(int frame)
void setRateChannel(int frame)
void frameNumberEditedChannel(int frame)
AnimatorWidget * animatorChannel
void upperBoundAnimatorImageChanged(int)
void frameNumberEditedImage(int frame)
void stepSizeAnimatorImageChanged(int)
int find_height() const
void selectImage(int channel)
void stopImagePlay()
Because the user can switch between image and channel mode by just pressing the play button...
AnimatorWidget * animatorImage
int getRate(bool mode) const
void modeChanged(Mode mode)
void goToChannel(int channel)
void upperBoundAnimatorChannelChanged(int)
Allows the dock widget z-position to be behind the main window instead of the default behavior of alw...
int getChannelCount() const
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the color(i.e.,"000000"for black) and
AnimatorHolder(QtDisplayPanelGui *qdp, QWidget *parent=0)
void lowerBoundAnimatorImageChanged(int)
void lowerBoundAnimatorChannelChanged(int)
int getAnimationCount() const
void closeEvent(QCloseEvent *event)
int getImageCount() const