Mercurial > hg > dmlib
annotate editor/edview.h @ 2294:7f6ba3b32f54
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 03 Jul 2019 10:28:43 +0300 |
parents | e2ac08228a0f |
children |
rev | line source |
---|---|
385 | 1 #ifndef EDVIEW_H |
2 #define EDVIEW_H | |
3 | |
4 #include <QtOpenGL> | |
391 | 5 #include <QImage> |
6 #include "dmengine.h" | |
385 | 7 |
391 | 8 |
403
d34922e6a244
Even more work towards the editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
9 class QEDGLDemoView : public QGLWidget |
385 | 10 { |
11 Q_OBJECT | |
12 | |
13 public: | |
403
d34922e6a244
Even more work towards the editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
14 QEDGLDemoView(QWidget *parent); |
d34922e6a244
Even more work towards the editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
15 ~QEDGLDemoView(); |
385 | 16 |
398 | 17 QSize minimumSizeHint() const; |
18 QSize sizeHint() const; | |
19 | |
391 | 20 virtual void setEngineData(DMEngineData *mengine); |
21 virtual void render(int frameTime); | |
22 void paintEvent(QPaintEvent *); | |
23 | |
24 private: | |
385 | 25 void saveGLState(); |
26 void restoreGLState(); | |
27 | |
391 | 28 protected: |
29 DMEngineData *engine; | |
30 }; | |
31 | |
385 | 32 |
403
d34922e6a244
Even more work towards the editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
33 class QEDSWDemoView : public QEDGLDemoView |
391 | 34 { |
35 Q_OBJECT | |
36 | |
37 public: | |
403
d34922e6a244
Even more work towards the editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
38 QEDSWDemoView(QWidget *parent); |
d34922e6a244
Even more work towards the editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
39 ~QEDSWDemoView(); |
391 | 40 |
41 void setEngineData(DMEngineData *mengine); | |
42 void render(int frameTime); | |
43 void paintEvent(QPaintEvent *); | |
385 | 44 |
45 private: | |
391 | 46 QImage *img; |
385 | 47 }; |
48 | |
391 | 49 |
385 | 50 #endif |