35 #ifndef ANATOMIST_WINDOW_GLWIDGETMANAGER_H    36 #define ANATOMIST_WINDOW_GLWIDGETMANAGER_H    43 #include <QtOpenGL/QGLWidget>    44 #if QT_VERSION >= 0x040600    74     virtual QSize sizeHint() 
const;
    75     virtual QSize minimumSizeHint() 
const;
    77     virtual void updateGL();
    79     void copyBackBuffer2Texture(
void);
    81     virtual void paintScene();
    84     virtual void initializeGL();
    85     virtual void resizeGL( 
int w, 
int h );
    86     virtual void paintGL();
    87 #if QT_VERSION >= 0x040600    88     virtual void gestureEvent( QGestureEvent *event );
    90     virtual void mousePressEvent( QMouseEvent* me );
    91     virtual void mouseReleaseEvent( QMouseEvent* me );
    92     virtual void mouseMoveEvent( QMouseEvent* me );
    93     virtual void mouseDoubleClickEvent( QMouseEvent * );
    94     virtual void keyPressEvent( QKeyEvent* ev );
    95     virtual void keyReleaseEvent( QKeyEvent* ev );
    96     virtual void focusInEvent( QFocusEvent * );
    97     virtual void focusOutEvent( QFocusEvent * );
    98     virtual void wheelEvent( QWheelEvent * );
   103     friend class ::GLWidgetManager_Private_QObject;
   108     QGLWidget* qglWidget();
   127     void setLightGLList( GLuint l );
   128     GLuint lightGLList() 
const;
   129     void setPreferredSize( 
int, 
int );
   130     void setMinimumSizeHint( 
const QSize & );
   131     virtual bool positionFromCursor( 
int x, 
int y, 
Point3df & position );
   132     virtual bool cursorFromPosition( 
const Point3df & position, 
Point3df & cursor );
   134     virtual void readBackBuffer( 
int x, 
int y, GLubyte & red, GLubyte & green,
   136     GLubyte* getTextureFromBackBuffer (
void);
   138     virtual bool translateCursorPosition( 
float x, 
float y,
   141     virtual std::string name() 
const;
   142     void setZoom( 
float z );
   147     void setQuaternion( 
const Point4df & q );
   149     const float* rotation() 
const;
   150     void setXDirection( 
bool invert );
   151     void setYDirection( 
bool invert );
   152     void setZDirection( 
bool invert );
   153     bool invertedX() 
const;
   154     bool invertedY() 
const;
   155     bool invertedZ() 
const;
   156     void setRotationCenter( 
const Point3df & );
   158     bool perspectiveEnabled() 
const;
   159     void enablePerspective( 
bool );
   160     float perspectiveAngle() 
const;
   161     void setPerspectiveAngle( 
float a );
   162     bool perspectiveAutoFarPlane() 
const;
   163     void setPerspectiveAutoFarPlane( 
bool x );
   164     float perspectiveFarPlane() 
const;
   165     void setPerspectiveFarPlane( 
float d );
   166     float perspectiveNearPlane() 
const;
   167     float perspectiveNearPlaneRatio() 
const;
   168     void setPerspectiveNearPlaneRatio( 
float d );
   169     void setAutoCentering( 
bool );
   170     bool autoCentering() 
const;
   171     virtual void recordStart( 
const QString & basename, 
   172                               const QString & format = QString::null,
   173                               int width=0, 
int height=0 );
   174     void saveContents( 
const QString & filename, 
const QString & format,
   175                        int width=0, 
int height=0 );
   176     QImage snapshotImage( 
int bufmode, 
int width=0, 
int height=0 );
   177     void saveOtherBuffer( 
const QString & filename,
   178                           const QString & format, 
int mode,
   179                           int width=0, 
int height=0 );
   180     void setOtherBuffersSaveMode( 
int mode );
   181     int otherBuffersSaveMode() 
const;
   183     bool hasTransparentObjects() 
const;
   184     void setTransparentObjects( 
bool );
   185     bool depthPeelingAllowed() 
const;
   186     bool depthPeelingEnabled() 
const;
   187     void enableDepthPeeling( 
bool );
   188     unsigned depthPeelingPasses() 
const;
   189     void setDepthPeelingPasses( 
unsigned n );
   190     unsigned numTextureUnits() 
const;
   191     bool recording() 
const;
   193     static QGLWidget* sharedWidget();
   194     void setBackgroundAlpha( 
float a );
   202     const AWindow * aWindow() 
const;
   204     virtual int width() = 0;
   205     virtual int height() = 0;
   208     virtual void saveContents();
   209     void saveContentsWithCustomSize();
   210     virtual void recordStart();
   211     void recordStartWithCustomSize();
   212     virtual void recordStop();
   214     bool hasCameraChanged() 
const;
   229     virtual void project( 
int virtualWidth=0, 
int virtualHeight=0 );
   230     virtual void setupView( 
int virtualWidth=0, 
int virtualHeight=0 );
   231     void drawObjects( 
DrawMode m = Normal );
   232     void depthPeelingRender( 
DrawMode m = Normal );
   236     virtual void paintGL( 
DrawMode m, 
int virtualWidth=0, 
int virtualHeight=0 );
   242     virtual void updateZBuffer();
   243     bool isZBufferUpToDate() 
const;
   244     void setZBufferUpdated( 
bool );
   245     void stopZBufferTimer();
   246     bool isRGBBufferUpToDate() 
const;
   247     void setRGBBufferUpdated( 
bool );
   268   void saveContentsWithCustomSize();
   270   void recordStartWithCustomSize();
   274   void updateZBuffer();
 
Abstract base class Anatomist window. 
 
see http://doc.qt.digia.com/qq/qq26-openglcanvas.html 
 
std::list< RefGLItem > GLPrimitives