50 #include <QStandardItem>
51 #include <QtCore/qmimedata.h>
52 #include <QtGui/qdrag.h>
53 #include <QtOpenGLWidgets/qopenglwidget.h>
54 #include <QtPrintSupport/qprintdialog.h>
55 #include <QtPrintSupport/qprinter.h>
56 #include <QtWidgets/QGraphicsSceneMouseEvent>
57 #include <QtWidgets/qdialog.h>
58 #include <QtWidgets/qgraphicsview.h>
148 view.setViewport(gl);
CustomItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent=nullptr)
int type() const override
void mousePressEvent(QGraphicsSceneMouseEvent *event)
[5]
QStandardItem * clone() const override
The QBrush class defines the fill pattern of shapes drawn by QPainter.
The QDrag class provides support for MIME-based drag and drop data transfer.
Qt::DropAction exec(Qt::DropActions supportedActions=Qt::MoveAction)
void setMimeData(QMimeData *data)
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
QGraphicsRectItem * addRect(const QRectF &rect, const QPen &pen=QPen(), const QBrush &brush=QBrush())
void render(QPainter *painter, const QRectF &target=QRectF(), const QRectF &source=QRectF(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
QGraphicsItem * itemAt(const QPointF &pos, const QTransform &deviceTransform) const
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
The QMimeData class provides a container for data that records information about its MIME type.
The QPainter class performs low-level painting on widgets and other paint devices.
void setRenderHint(RenderHint hint, bool on=true)
The QPen class defines how a QPainter should draw lines and outlines of shapes.
The QPixmap class is an off-screen image representation that can be used as a paint device.
The QPrintDialog class provides a dialog for specifying the printer's configuration.
The QPrinter class is a paint device that paints on a printer.
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QStandardItem class provides an item for use with the QStandardItemModel class.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format