30 lines
479 B
C++
30 lines
479 B
C++
#ifndef QUESTVIEW_H
|
|
#define QUESTVIEW_H
|
|
|
|
#include <QGraphicsView>
|
|
#include "qw_scene.h"
|
|
|
|
/* QWView
|
|
* The same QGraphicsView but this one ignores wheel events,
|
|
* because wheels are for loosers. */
|
|
|
|
class QWView final : public QGraphicsView
|
|
{
|
|
Q_OBJECT
|
|
Q_DISABLE_COPY_MOVE(QWView)
|
|
private:
|
|
QWScene *scene;
|
|
|
|
protected:
|
|
|
|
void wheelEvent(QWheelEvent *ev) override
|
|
{
|
|
ev->ignore();
|
|
}
|
|
|
|
public:
|
|
explicit QWView(QWScene *sc);
|
|
};
|
|
|
|
#endif // QUESTVIEW_H
|