53 #if defined(QT_PRINTSUPPORT_LIB)
54 #include <QtPrintSupport/qtprintsupportglobal.h>
55 #if QT_CONFIG(printdialog)
57 #include <QPrintDialog>
63 #if QT_CONFIG(wheelevent)
64 void GraphicsView::wheelEvent(QWheelEvent *
e)
67 if (
e->angleDelta().y() > 0)
73 QGraphicsView::wheelEvent(
e);
114 zoomSliderLayout->
addWidget(zoomOutIcon);
131 rotateSliderLayout->
addWidget(rotateLeftIcon);
132 rotateSliderLayout->
addWidget(rotateSlider);
133 rotateSliderLayout->
addWidget(rotateRightIcon);
142 label2 =
new QLabel(
tr(
"Pointer Mode"));
152 antialiasButton->
setText(
tr(
"Antialiasing"));
160 pointerModeGroup->
addButton(selectModeButton);
161 pointerModeGroup->
addButton(dragModeButton);
166 labelLayout->
addWidget(selectModeButton);
174 topLayout->
addWidget(graphicsView, 1, 0);
175 topLayout->
addLayout(zoomSliderLayout, 1, 1);
176 topLayout->
addLayout(rotateSliderLayout, 2, 0);
184 this, &View::setResetButtonEnabled);
186 this, &View::setResetButtonEnabled);
204 void View::resetView()
214 void View::setResetButtonEnabled()
219 void View::setupMatrix()
228 setResetButtonEnabled();
231 void View::togglePointerMode()
239 void View::toggleAntialiasing()
246 #if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog)
276 void View::rotateLeft()
281 void View::rotateRight()
int value
the slider's current value
void valueChanged(int value)
void setOrientation(Qt::Orientation)
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
void addStretch(int stretch=0)
The QFrame class is the base class of widgets that can have a frame.
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
void setInteractive(bool allowed)
void setTransform(const QTransform &matrix, bool combine=false)
void setDragMode(DragMode mode)
void ensureVisible(const QRectF &rect, int xmargin=50, int ymargin=50)
void setRenderHint(QPainter::RenderHint hint, bool enabled=true)
void render(QPainter *painter, const QRectF &target=QRectF(), const QRect &source=QRect(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
void setTransformationAnchor(ViewportAnchor anchor)
void setOptimizationFlags(OptimizationFlags flags)
void setViewportUpdateMode(ViewportUpdateMode mode)
The QGridLayout class lays out widgets in a grid.
void addWidget(QWidget *w)
void addLayout(QLayout *, int row, int column, Qt::Alignment=Qt::Alignment())
The QHBoxLayout class lines up widgets horizontally.
The QIcon class provides scalable icons in different modes and states.
The QLabel widget provides a text or image display.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
The QPainter class performs low-level painting on widgets and other paint devices.
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 QSize class defines the size of a two-dimensional object using integer point precision.
The QSlider widget provides a vertical or horizontal slider.
void setTickPosition(TickPosition position)
The QString class provides a Unicode character string.
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
The QVBoxLayout class lines up widgets vertically.
QGraphicsView * view() const
void zoomOutBy(int level)
View(const QString &items, const QString &images, QWidget *parent=nullptr)
[0]
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLenum GLuint GLint level
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLsizei const GLchar * label
[43]
GLenum GLenum GLenum GLenum GLenum scale
QFileDialog dialog(this)
[1]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent