code format
This commit is contained in:
@@ -1,36 +1,37 @@
|
||||
#include <QWindow>
|
||||
#include <QOpenGLFunctions>
|
||||
#include <QWindow>
|
||||
|
||||
class QPainter;
|
||||
class QOpenGLContext;
|
||||
class QOpenGLPaintDevice;
|
||||
|
||||
|
||||
class OpenGLWindow : public QWindow, protected QOpenGLFunctions
|
||||
{
|
||||
class OpenGLWindow
|
||||
: public QWindow
|
||||
, protected QOpenGLFunctions {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit OpenGLWindow(QWindow *parent = nullptr);
|
||||
explicit OpenGLWindow(QWindow * parent = nullptr);
|
||||
~OpenGLWindow();
|
||||
|
||||
virtual void render(QPainter *painter);
|
||||
virtual void render(QPainter * painter);
|
||||
virtual void render();
|
||||
|
||||
virtual void initialize();
|
||||
|
||||
QOpenGLContext * context() {return m_context;}
|
||||
QOpenGLContext * context() { return m_context; }
|
||||
|
||||
public slots:
|
||||
void renderLater();
|
||||
void renderNow();
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event) override;
|
||||
bool event(QEvent * event) override;
|
||||
|
||||
void exposeEvent(QExposeEvent *event) override;
|
||||
void exposeEvent(QExposeEvent * event) override;
|
||||
|
||||
private:
|
||||
QOpenGLContext *m_context;
|
||||
QOpenGLPaintDevice *m_device;
|
||||
QOpenGLContext * m_context;
|
||||
QOpenGLPaintDevice * m_device;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user