Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqMovieFrame.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:    TxqMovieFrame.h
00004 //
00005 // Purpose: This class is a movie control frame that allows the user
00006 //          to select multiple files or a config file to display and animate
00007 //          images.
00008 //
00009 // Version: $Id: TxqMovieFrame.h,v 1.14 2001/10/12 22:46:21 kgl Exp $
00010 //
00011 // Copyright (c) 2001 by Tech-X Corporation.  All rights reserved.
00012 //
00013 // Author:  Kelly G. Luetkemeyer
00014 //
00015 //--------------------------------------------------------------------
00016 
00017 #ifndef TXQ_MOVIE_FRAME_H
00018 #define TXQ_MOVIE_FRAME_H
00019 
00020 // model defines
00021 #include <TxModelDefines.h>
00022 
00023 // Txq includes
00024 #include <TxqVcrFrame.h>
00025 #include <TxqSciNumberPattern.h>
00026 #include <TxqSciNumberFormat.h>
00027 #include "TxqImageFrame.h"
00028 #include "TxqMovieConfigSet.h"
00029 #include "TxqMovieCntrlDlog.h"
00030 
00031 // Qt includes
00032 #include <qtimer.h>
00033 #include <qstatusbar.h>
00034 #include <qlabel.h>
00035 #include <qtooltip.h>
00036 #include <qinputdialog.h>
00037 
00049 class TxqMovieFrame : public TxqVcrFrame
00050 {
00051   Q_OBJECT
00052 
00053 public:
00054 
00065   TxqMovieFrame(QWidget* parent=0, const char *nm=0, WFlags f = WType_TopLevel);
00066 
00070   virtual ~TxqMovieFrame();
00071 
00075   void setInitialState();
00076 
00081   void updateStatusBar(const QString &label);
00082 
00086   void start();
00087 
00091   void stop();
00092 
00097   void timerEvent(QTimerEvent *t);
00098 
00102   void destroy();
00103 
00109   void destroy(bool destroyWindow , bool destroySubWindows ) {
00110     QWidget::destroy(destroyWindow, destroySubWindows);
00111   }
00112 
00117   int getModelState();
00118 
00119 public slots:
00120 
00126   virtual void startBrowser(const QString &home, const QString &title);
00127 
00132   void setPixmapMemory(int id);
00133 
00138   void openControlDlog(int indx);
00139 
00143   void runModel();
00144 
00148   void stepModel();
00149 
00153   void stopModel();
00154 
00158   void restartModel();
00159 
00163   void openInputFile();
00164 
00168   void openConfigFile();
00169 
00173   void openInputTextFile();
00174 
00181   void getMaxMovieIters();
00182 
00186   void getMovieConfigFileDlog();
00187 
00191   void getMovieImageFileDlog();
00192 
00198   void removeWindow(int index);
00199 
00200 protected slots:
00201 
00205   void changeDir();
00206 
00210   void clearImageMemory();
00211 
00215   void applyOptions();
00216 
00217 signals:
00218 
00222   void restartEvent();
00223 
00227   void startEvent();
00228 
00229 protected:
00230 
00235   void moveImageFrame(int index);
00236 
00240   virtual void addMenuBarItems();
00241 
00245   void addOpenMenuItems();
00246 
00250   void addEditMenuItems();
00251 
00255   void addViewMenuItems();
00256 
00260   void enableOpenMenu();
00261 
00265   void disableOpenMenu();
00266 
00270   void createOpenMenu();
00271 
00275   void addDirButton();
00276 
00280   void addButtonSlots();
00281 
00285   void addStatusObjects();
00286 
00290   void addFileMenuItems();
00291 
00298   QStringList getMovieImageFiles(QDir d, QString prefix, QString ext);
00299 
00304   void setImageNames();
00305 
00309   void setMovieState();
00310 
00314   void addMovieFrames();
00315 
00320   int maxIters;
00321 
00326   int iterPerUpdate;
00327 
00332   int maxMovieIters;
00333 
00337   QPushButton *dirButton;
00338 
00339 private:
00340 
00344   void execLoop();
00345 
00351   int frameAdvance;
00352 
00356   int frameLoop;
00357 
00361   int frameStep;
00362 
00366   int frameNumber;
00367 
00371   int startFrame;
00372 
00376   int endFrame;
00377 
00381   TxAttributeSet *cntrlOptions;
00382 
00386   int timer_id;
00387 
00391   QPopupMenu *openMenu;
00392 
00396   QString movieConfigFileName;
00397 
00401   QString imageFileName;
00402 
00406   vector<QStringList> imageFileNames;
00407 
00411   vector<TxqImageFrame*> imageFrames;
00412 
00417   QString imageExt;
00418 
00422   QString imagePrefix;
00423 
00427   QDir imageDir;
00428 
00432   QString baseName;
00433 
00437   int modelState;
00438 
00442   int movieFrameCount;
00443 
00447   int maxFrameCount;
00448 
00452   QString startDirName; 
00453 
00457   int memoryId;
00458 
00462   int cntrlId;
00463  
00464 };
00465 
00466 
00467 #endif
Copyright Tech-X Corporation, all rights reserved.