Main Page | Namespace List | Class List | File List | Class Members | File Members

glview.h

Go to the documentation of this file.
00001 
00004 #ifndef GLVIEW_H
00005 #define GLVIEW_H
00006 
00007 #include <qstring.h>
00008 
00009 #include <qgl.h>
00010 #include <datafile.h>
00011 #include <bar.h>
00012 
00019 class GLView : public QGLWidget
00020 {
00021     Q_OBJECT
00022 public:
00023     GLView( QWidget* parent, const char* name );
00024     ~GLView();
00025     DataFile& GetDataFile();
00026 public slots:
00027     void setXRotation(int degrees);
00028     void setYRotation(int degrees);
00029     void setZRotation(int degrees);
00030     void setXTranslation(int xTrans);
00031     void setYTranslation(int yTrans);
00032     void setZTranslation(int zTrans);
00033     void setScaling(int scaling);
00034     void setOxId(int iOxId);
00035     void setOyId(int iOyId);
00036     void setColorId(int iColorId);
00037     void init(QString& sFilename);
00038     void enableBrushing(bool bEnableBrushing);
00039     void clearBrush();
00040     void setBrushWidth(int iBrushWidth);
00041     void setBrushHardness(int iBrushHardness);
00042 protected:
00043     void paintGL();
00044     void resizeGL( int w, int h );
00045     void mouseMoveEvent ( QMouseEvent * e );
00046     void mousePressEvent(QMouseEvent* e);
00047     void mouseReleaseEvent ( QMouseEvent * e );
00048     void TrackData();
00049     void Brush();
00050 private:
00051     GLfloat xRot, yRot, zRot, scale;
00052     GLfloat xTrans, yTrans;
00053 
00054     int m_iOldMouseX;
00055     int m_iOldMouseY;
00056 
00057     int m_iWidth;
00058     int m_iHeight;
00059 
00060     DataFile m_DataFile;
00061 
00062     int m_iNumTimeSteps;
00063     int m_iNumData;
00064     
00065     int m_iCurrentTimeStep;
00066     int m_iCurrentData;
00067 
00068     int m_iBarIncrement;
00069     int m_iPBCBorder;
00070     int m_iBarWidth;
00071     int m_iBarHeight;
00072     
00073     DataChannel* m_pOxData;
00074     DataChannel* m_pOyData;
00075     DataChannel* m_pColorData;
00076     
00077     float* m_pBrush;
00078     bool m_bEnableBrushing;
00079     int m_iBrushWidth;
00080     float m_fBrushHardness;
00081     
00082     bool m_bDisplayData;
00083     bool m_bInit;
00084     
00085     vector<Bar*>  m_vBars;
00086 };
00087 
00088 #endif // GLVIEW_H

Generated on Fri Jun 18 18:53:15 2004 for PBC by doxygen 1.3.6