| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
#ifndef VIEW_H |
| 5 |
#define VIEW_H |
| 6 |
#include <QtWidgets/QGraphicsView> |
| 7 |
|
| 8 |
QT_BEGIN_NAMESPACE |
| 9 |
class QGraphicsScene; |
| 10 |
class QResizeEvent; |
| 11 |
QT_END_NAMESPACE |
| 12 |
|
| 13 |
class View: public QGraphicsView |
| 14 |
{ |
| 15 |
public: |
| 16 |
View(QGraphicsScene *scene, QGraphicsWidget *form , QWidget *parent = 0); |
| 17 |
|
| 18 |
protected: |
| 19 |
void resizeEvent(QResizeEvent *event); |
| 20 |
void mouseMoveEvent(QMouseEvent *event); |
| 21 |
void mouseReleaseEvent(QMouseEvent *event); |
| 22 |
|
| 23 |
private: |
| 24 |
QGraphicsWidget *m_form; |
| 25 |
}; |
| 26 |
|
| 27 |
#endif |