Back to index

libsfml  1.6+dfsg2
QSFMLCanvas.hpp
Go to the documentation of this file.
00001 
00002 #ifndef QSFMLCANVAS_HPP
00003 #define QSFMLCANVAS_HPP
00004 
00006 // Headers
00008 #include <SFML/Graphics.hpp>
00009 #include <QWidget>
00010 #include <QTimer>
00011 
00012 
00013 class QEvent;
00014 
00018 class QSFMLCanvas : public QWidget, public sf::RenderWindow
00019 {
00020 public :
00021 
00030     QSFMLCanvas(const QSize& Size, unsigned int FrameTime = 0, QWidget* Parent = NULL);
00031 
00036     virtual ~QSFMLCanvas();
00037 
00038 private :
00039 
00045     virtual void OnInit();
00046 
00052     virtual void OnUpdate();
00053 
00058     virtual QPaintEngine* paintEngine() const;
00059 
00066     virtual bool event(QEvent* Event);
00067 
00073     virtual void paintEvent(QPaintEvent*);
00074 
00076     // Member data
00078     QTimer myTimer; 
00079 };
00080 
00081 
00082 #endif // QSFMLCANVAS_HPP