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

TxqImageFrame.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:    TxqImageFrame.h
00004 //
00005 // Purpose: Loads an image from a file and displays it onto the frame.
00006 //
00007 // Version: $Id: TxqImageFrame.h,v 1.9 2001/10/12 20:08:08 kgl Exp $
00008 //
00009 // Copyright (c) 2000 by Tech-X Corporation.  All rights reserved.
00010 //
00011 // Author:  Kelly G. Luetkemeyer
00012 //
00013 //--------------------------------------------------------------------
00014 
00015 #ifndef TXQ_IMAGE_FRAME_H
00016 #define TXQ_IMAGE_FRAME_H
00017 
00018 // Qt includes
00019 #include <qframe.h>
00020 #include <qwidget.h>
00021 #include <qpixmap.h>
00022 #include <qpaintdevicemetrics.h>
00023 #include <qpainter.h>
00024 
00025 // txmath includes
00026 #include <txc_map.h>
00027 
00028 // Txq includes
00029 #include <TxqFrame.h>
00030 #include <TxqMasterIoFrame.h>
00031 
00042 class TxqImageFrame: public TxqFrame
00043 {
00044   Q_OBJECT
00045 
00046 public:
00047 
00055   TxqImageFrame(QString fileName,
00056                 TxqMasterIoFrame *parent, const char *nm=0, WFlags f = WType_TopLevel);
00057 
00061   virtual ~TxqImageFrame();
00062 
00067   void setPixmap(QPixmap *pm);
00068 
00074   void setPixmapMemory(bool memory);
00075 
00081   void setFileName(const QString fileName);
00082 
00090   void advance(const QString fileName, int frameNumber);
00091 
00096   void setIndex(int indx);
00097 
00102   bool getPixmapMemory() {return memory;}
00103 
00109   void clearMapElements(unsigned int n);
00110 
00114   void clearPixMaps();
00115  
00116 signals:
00117 
00122   void closeSignal(int indx);
00123 
00127   void clearMemory();
00128 
00129 protected:
00130 
00135   void readImage(const QString fileName);
00136 
00140   virtual void addMenuBarItems();
00141 
00147   virtual void addSubMenuBarItems();
00148 
00152   void addWidgets();
00153 
00158   void paintEvent( QPaintEvent * );
00159 
00160 
00161 public slots:
00162 
00166   void print();
00167 
00168 protected slots:
00169 
00174   bool close( bool forceKill = FALSE) ;
00175 
00176 
00177 private:
00178 
00182   TxqImageFrame();
00183 
00187   QPixmap *pixmap;
00188 
00192   TXSTD::map<QString, QPixmap*> pixMaps;
00193 
00197   QWidget *paintWidget;
00198 
00202   int windowIndex;
00203 
00207   bool memory;
00208 
00212   bool memoryExhausted;
00213 
00217   TxqLog *txcout;
00218 
00222   TxqLog *txcerr;
00223 
00227   bool isPainted;
00228 
00233   unsigned int clearElements;
00234 
00238   int frameNumber;
00239 
00243   QString imageFileName;
00244  
00245 
00246 };
00247 
00248 #endif
Copyright Tech-X Corporation, all rights reserved.