QtBase  v6.3.1
qprintpreviewwidget.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #include "qprintpreviewwidget.h"
41 #include "private/qwidget_p.h"
42 #include <private/qprinter_p.h>
43 
44 #include <QtCore/qmath.h>
45 #include <QtWidgets/qboxlayout.h>
46 #include <QtWidgets/qgraphicsitem.h>
47 #include <QtWidgets/qgraphicsview.h>
48 #include <QtWidgets/qscrollbar.h>
49 #include <QtWidgets/qstyleoption.h>
50 
52 
53 namespace {
54 class PageItem : public QGraphicsItem
55 {
56 public:
57  PageItem(int _pageNum, const QPicture* _pagePicture, QSize _paperSize, QRect _pageRect)
58  : pageNum(_pageNum), pagePicture(_pagePicture),
59  paperSize(_paperSize), pageRect(_pageRect)
60  {
61  qreal border = qMax(paperSize.height(), paperSize.width()) / 25;
62  brect = QRectF(QPointF(-border, -border),
63  QSizeF(paperSize)+QSizeF(2*border, 2*border));
64  setCacheMode(DeviceCoordinateCache);
65  }
66 
67  QRectF boundingRect() const override
68  { return brect; }
69 
70  inline int pageNumber() const
71  { return pageNum; }
72 
74 
75 private:
76  int pageNum;
77  const QPicture* pagePicture;
78  QSize paperSize;
79  QRect pageRect;
80  QRectF brect;
81 };
82 
84 {
86 
87 #if 0
88  // Draw item bounding rect, for debugging
89  painter->save();
90  painter->setPen(QPen(Qt::red, 0));
92  painter->drawRect(QRectF(-border()+1.0, -border()+1.0, boundingRect().width()-2, boundingRect().height()-2));
93  painter->restore();
94 #endif
95 
96  QRectF paperRect(0,0, paperSize.width(), paperSize.height());
97 
98  // Draw shadow
99  painter->setClipRect(option->exposedRect);
100  qreal shWidth = paperRect.width()/100;
101  QRectF rshadow(paperRect.topRight() + QPointF(0, shWidth),
102  paperRect.bottomRight() + QPointF(shWidth, 0));
103  QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight());
104  rgrad.setColorAt(0.0, QColor(0,0,0,255));
105  rgrad.setColorAt(1.0, QColor(0,0,0,0));
106  painter->fillRect(rshadow, QBrush(rgrad));
107  QRectF bshadow(paperRect.bottomLeft() + QPointF(shWidth, 0),
108  paperRect.bottomRight() + QPointF(0, shWidth));
109  QLinearGradient bgrad(bshadow.topLeft(), bshadow.bottomLeft());
110  bgrad.setColorAt(0.0, QColor(0,0,0,255));
111  bgrad.setColorAt(1.0, QColor(0,0,0,0));
112  painter->fillRect(bshadow, QBrush(bgrad));
113  QRectF cshadow(paperRect.bottomRight(),
114  paperRect.bottomRight() + QPointF(shWidth, shWidth));
115  QRadialGradient cgrad(cshadow.topLeft(), shWidth, cshadow.topLeft());
116  cgrad.setColorAt(0.0, QColor(0,0,0,255));
117  cgrad.setColorAt(1.0, QColor(0,0,0,0));
118  painter->fillRect(cshadow, QBrush(cgrad));
119 
120  painter->setClipRect(paperRect & option->exposedRect);
121  painter->fillRect(paperRect, Qt::white);
122  if (!pagePicture)
123  return;
124  painter->drawPicture(pageRect.topLeft(), *pagePicture);
125 
126  // Effect: make anything drawn in the margins look washed out.
128  path.addRect(paperRect);
129  path.addRect(pageRect);
131  painter->setBrush(QColor(255, 255, 255, 180));
133 
134 #if 0
135  // Draw frame around paper.
138  painter->drawRect(paperRect);
139 #endif
140 
141  // todo: drawtext "Page N" below paper
142 }
143 
145 {
146  Q_OBJECT
147 public:
150  {
151 #ifdef Q_OS_MAC
153 #endif
154  }
155 signals:
156  void resized();
157 
158 protected:
159  void resizeEvent(QResizeEvent* e) override
160  {
161  {
162  const QSignalBlocker blocker(verticalScrollBar()); // Don't change page, QTBUG-14517
164  }
165  emit resized();
166  }
167 
168  void showEvent(QShowEvent* e) override
169  {
171  emit resized();
172  }
173 };
174 
175 } // anonymous namespace
176 
178 {
179  Q_DECLARE_PUBLIC(QPrintPreviewWidget)
180 public:
182  : scene(nullptr), curPage(1),
183  viewMode(QPrintPreviewWidget::SinglePageView),
184  zoomMode(QPrintPreviewWidget::FitInView),
186  {}
187 
188  // private slots
189  void _q_fit(bool doFitting = false);
190  void _q_updateCurrentPage();
191 
192  void init();
193  void populateScene();
194  void layoutPages();
195  void generatePreview();
196  void setCurrentPage(int pageNumber);
197  void zoom(qreal zoom);
199  int calcCurrentPage();
200 
203 
204  int curPage;
207 
214  bool fitting;
215 };
216 
218 {
219  Q_Q(QPrintPreviewWidget);
220 
221  if (curPage < 1 || curPage > pages.count())
222  return;
223 
224  if (!doFitting && !fitting)
225  return;
226 
227  if (doFitting && fitting) {
228  QRect viewRect = graphicsView->viewport()->rect();
230  const QList<QGraphicsItem*> containedItems = graphicsView->items(viewRect, Qt::ContainsItemBoundingRect);
231  for (QGraphicsItem* item : containedItems) {
232  PageItem* pg = static_cast<PageItem*>(item);
233  if (pg->pageNumber() == curPage)
234  return;
235  }
236  }
237 
238  int newPage = calcCurrentPage();
239  if (newPage != curPage)
240  curPage = newPage;
241  }
242 
245  // fit two pages
246  if (curPage % 2)
247  target.setLeft(target.left() - target.width());
248  else
249  target.setRight(target.right() + target.width());
252  }
253 
255  QTransform t;
256  qreal scale = graphicsView->viewport()->width() / target.width();
257  t.scale(scale, scale);
259  if (doFitting && fitting) {
260  QRectF viewSceneRect = graphicsView->viewportTransform().mapRect(graphicsView->viewport()->rect());
261  viewSceneRect.moveTop(target.top());
262  graphicsView->ensureVisible(viewSceneRect); // Nah...
263  }
264  } else {
268  graphicsView->verticalScrollBar()->setSingleStep(step);
269  graphicsView->verticalScrollBar()->setPageStep(step);
270  }
271  }
272 
273  zoomFactor = graphicsView->transform().m11() * (float(printer->logicalDpiY()) / q->logicalDpiY());
274  emit q->previewChanged();
275 }
276 
278 {
279  Q_Q(QPrintPreviewWidget);
280 
282  return;
283 
284  int newPage = calcCurrentPage();
285  if (newPage != curPage) {
286  curPage = newPage;
287  emit q->previewChanged();
288  }
289 }
290 
292 {
293  int maxArea = 0;
294  int newPage = curPage;
295  QRect viewRect = graphicsView->viewport()->rect();
296  const QList<QGraphicsItem*> items = graphicsView->items(viewRect);
297  for (auto *item : items) {
298  PageItem* pg = static_cast<PageItem*>(item);
299  QRect overlap = graphicsView->mapFromScene(pg->sceneBoundingRect()).boundingRect() & viewRect;
300  int area = overlap.width() * overlap.height();
301  if (area > maxArea) {
302  maxArea = area;
303  newPage = pg->pageNumber();
304  } else if (area == maxArea && pg->pageNumber() < newPage) {
305  newPage = pg->pageNumber();
306  }
307  }
308  return newPage;
309 }
310 
312 {
313  Q_Q(QPrintPreviewWidget);
314 
319  QObject::connect(graphicsView->verticalScrollBar(), SIGNAL(valueChanged(int)),
321  QObject::connect(graphicsView, SIGNAL(resized()), q, SLOT(_q_fit()));
322 
326 
328  layout->setContentsMargins(0, 0, 0, 0);
330 }
331 
333 {
334  // remove old pages
335  for (auto *page : qAsConst(pages))
337  qDeleteAll(pages);
338  pages.clear();
339 
342 
343  int page = 1;
344  for (auto *picture : qAsConst(pictures)) {
345  PageItem* item = new PageItem(page++, picture, paperSize, pageRect);
346  scene->addItem(item);
347  pages.append(item);
348  }
349 }
350 
352 {
353  int numPages = pages.count();
354  if (numPages < 1)
355  return;
356 
357  int numPagePlaces = numPages;
358  int cols = 1; // singleMode and default
361  cols = qCeil(qSqrt((float) numPages));
362  else
363  cols = qFloor(qSqrt((float) numPages));
364  cols += cols % 2; // Nicer with an even number of cols
365  }
367  cols = 2;
368  numPagePlaces += 1;
369  }
370  int rows = qCeil(qreal(numPagePlaces) / cols);
371 
372  qreal itemWidth = pages.at(0)->boundingRect().width();
373  qreal itemHeight = pages.at(0)->boundingRect().height();
374  int pageNum = 1;
375  for (int i = 0; i < rows && pageNum <= numPages; i++) {
376  for (int j = 0; j < cols && pageNum <= numPages; j++) {
378  // Front page doesn't have a facing page
379  continue;
380  } else {
381  pages.at(pageNum-1)->setPos(QPointF(j*itemWidth, i*itemHeight));
382  pageNum++;
383  }
384  }
385  }
387 }
388 
390 {
391  //### If QPrinter::setPreviewMode() becomes public, handle the
392  //### case that we have been constructed with a printer that
393  //### _already_ has been preview-painted to, so we should
394  //### initially just show the pages it already contains, and not
395  //### emit paintRequested() until the user changes some parameter
396 
397  Q_Q(QPrintPreviewWidget);
398  printer->d_func()->setPreviewMode(true);
399  emit q->paintRequested(printer);
400  printer->d_func()->setPreviewMode(false);
401  pictures = printer->d_func()->previewPages();
402  populateScene(); // i.e. setPreviewPrintedPictures() e.l.
403  layoutPages();
404  curPage = pages.count() > 0 ? qBound(1, curPage, pages.count()) : 1;
405  if (fitting)
406  _q_fit();
407  emit q->previewChanged();
408 }
409 
411 {
412  if (pageNumber < 1 || pageNumber > pages.count())
413  return;
414 
415  int lastPage = curPage;
416  curPage = pageNumber;
417 
418  if (lastPage != curPage && lastPage > 0 && lastPage <= pages.count()) {
420  QScrollBar *hsc = graphicsView->horizontalScrollBar();
421  QScrollBar *vsc = graphicsView->verticalScrollBar();
423  vsc->setValue(int(pt.y()) - 10);
424  hsc->setValue(int(pt.x()) - 10);
425  } else {
427  }
428  }
429 }
430 
432 {
433  zoomFactor *= zoom;
435 }
436 
438 {
439  Q_Q(QPrintPreviewWidget);
440  zoomFactor = _zoomFactor;
442  int dpi_y = q->logicalDpiY();
443  int printer_dpi_y = printer->logicalDpiY();
444  graphicsView->scale(zoomFactor*(dpi_y/float(printer_dpi_y)),
445  zoomFactor*(dpi_y/float(printer_dpi_y)));
446 }
447 
449 
525 {
526  Q_D(QPrintPreviewWidget);
527  d->printer = printer;
528  d->ownPrinter = false;
529  d->init();
530 }
531 
541 {
542  Q_D(QPrintPreviewWidget);
543  d->printer = new QPrinter;
544  d->ownPrinter = true;
545  d->init();
546 }
547 
548 
553 {
554  Q_D(QPrintPreviewWidget);
555  if (d->ownPrinter)
556  delete d->printer;
557 }
558 
563 {
564  Q_D(const QPrintPreviewWidget);
565  return d->viewMode;
566 }
567 
573 {
574  Q_D(QPrintPreviewWidget);
575  d->viewMode = mode;
576  d->layoutPages();
577  if (d->viewMode == AllPagesView) {
578  d->graphicsView->fitInView(d->scene->itemsBoundingRect(), Qt::KeepAspectRatio);
579  d->fitting = false;
581  d->zoomFactor = d->graphicsView->transform().m11() * (float(d->printer->logicalDpiY()) / logicalDpiY());
583  } else {
584  d->fitting = true;
585  d->_q_fit();
586  }
587 }
588 
594 {
595  Q_D(const QPrintPreviewWidget);
596  return d->printer->pageLayout().orientation();
597 }
598 
604 {
605  Q_D(QPrintPreviewWidget);
606  d->printer->setPageOrientation(orientation);
607  d->generatePreview();
608 }
609 
614 {
615  Q_D(QPrintPreviewWidget);
616  // ### make use of the generated pages
617  emit paintRequested(d->printer);
618 }
619 
625 {
626  Q_D(QPrintPreviewWidget);
627  d->fitting = false;
629  d->zoom(factor);
630 }
631 
637 {
638  Q_D(QPrintPreviewWidget);
639  d->fitting = false;
641  d->zoom(1/factor);
642 }
643 
648 {
649  Q_D(const QPrintPreviewWidget);
650  return d->zoomFactor;
651 }
652 
661 {
662  Q_D(QPrintPreviewWidget);
663  d->fitting = false;
665  d->setZoomFactor(factor);
666 }
667 
673 {
674  Q_D(const QPrintPreviewWidget);
675  return d->pages.size();
676 }
677 
682 {
683  Q_D(const QPrintPreviewWidget);
684  return d->curPage;
685 }
686 
692 {
693  Q_D(QPrintPreviewWidget);
694  d->setCurrentPage(page);
695 }
696 
702 {
704 }
705 
711 {
713 }
714 
721 {
722  Q_D(QPrintPreviewWidget);
723  d->zoomMode = zoomMode;
724  if (d->zoomMode == FitInView || d->zoomMode == FitToWidth) {
725  d->fitting = true;
726  d->_q_fit(true);
727  } else {
728  d->fitting = false;
729  }
730 }
731 
738 {
739  Q_D(const QPrintPreviewWidget);
740  return d->zoomMode;
741 }
742 
748 {
750 }
751 
757 {
759 }
760 
766 {
768 }
769 
775 {
777 }
778 
784 {
786 }
787 
788 
794 {
795  Q_D(QPrintPreviewWidget);
796  d->initialized = true;
797  d->generatePreview();
798  d->graphicsView->updateGeometry();
799 }
800 
804 {
805  Q_D(QPrintPreviewWidget);
806  if (visible && !d->initialized)
807  updatePreview();
809 }
810 
828 
829 #include "moc_qprintpreviewwidget.cpp"
830 #include "qprintpreviewwidget.moc"
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:66
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
@ NoFrame
Definition: qframe.h:75
void setColorAt(qreal pos, const QColor &color)
Definition: qbrush.cpp:1596
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
Definition: qgraphicsitem.h:83
QPointF pos() const
QRectF sceneBoundingRect() const
virtual QRectF boundingRect() const =0
void setPos(const QPointF &pos)
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
void removeItem(QGraphicsItem *item)
void addItem(QGraphicsItem *item)
QRectF itemsBoundingRect() const
void setSceneRect(const QRectF &rect)
void setBackgroundBrush(const QBrush &brush)
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
Definition: qgraphicsview.h:60
void setInteractive(bool allowed)
QList< QGraphicsItem * > items() const
void centerOn(const QPointF &pos)
void setTransform(const QTransform &matrix, bool combine=false)
void setDragMode(DragMode mode)
QTransform transform() const
void ensureVisible(const QRectF &rect, int xmargin=50, int ymargin=50)
void scale(qreal sx, qreal sy)
void fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
QTransform viewportTransform() const
void resizeEvent(QResizeEvent *event) override
void setScene(QGraphicsScene *scene)
void showEvent(QShowEvent *event) override
QPoint mapFromScene(const QPointF &point) const
void setViewportUpdateMode(ViewportUpdateMode mode)
void addWidget(QWidget *w)
Definition: qlayout.cpp:223
void setContentsMargins(int left, int top, int right, int bottom)
Definition: qlayout.cpp:325
The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush.
Definition: qbrush.h:430
const_reference at(qsizetype i) const noexcept
Definition: qlist.h:457
qsizetype count() const noexcept
Definition: qlist.h:415
void append(parameter_type t)
Definition: qlist.h:469
void clear()
Definition: qlist.h:445
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Definition: qobject.cpp:2772
Orientation orientation() const
QRect paintRectPixels(int resolution) const
QRect fullRectPixels(int resolution) const
QPageLayout pageLayout() const
int logicalDpiY() const
Definition: qpaintdevice.h:82
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:82
void drawRect(const QRectF &rect)
Definition: qpainter.h:554
void drawPath(const QPainterPath &path)
Definition: qpainter.cpp:3171
void setClipRect(const QRectF &, Qt::ClipOperation op=Qt::ReplaceClip)
Definition: qpainter.cpp:2717
void setPen(const QColor &color)
Definition: qpainter.cpp:3640
void restore()
Definition: qpainter.cpp:1611
void save()
Definition: qpainter.cpp:1577
void setBrush(const QBrush &brush)
Definition: qpainter.cpp:3755
void drawPicture(const QPointF &p, const QPicture &picture)
Definition: qpainter.cpp:6532
void fillRect(const QRectF &, const QBrush &)
Definition: qpainter.cpp:6644
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Definition: qpainterpath.h:65
The QPen class defines how a QPainter should draw lines and outlines of shapes.
Definition: qpen.h:61
The QPicture class is a paint device that records and replays QPainter commands.
Definition: qpicture.h:55
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:242
constexpr qreal x() const noexcept
Definition: qpoint.h:361
constexpr qreal y() const noexcept
Definition: qpoint.h:366
The QPrintPreviewWidget class provides a widget for previewing page layouts for printer output.
QPrintPreviewWidget(QPrinter *printer, QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
void zoomIn(qreal zoom=1.1)
void setViewMode(ViewMode viewMode)
void setOrientation(QPageLayout::Orientation orientation)
void zoomOut(qreal zoom=1.1)
void paintRequested(QPrinter *printer)
void setVisible(bool visible) override
void setCurrentPage(int pageNumber)
void setZoomFactor(qreal zoomFactor)
void setZoomMode(ZoomMode zoomMode)
QPageLayout::Orientation orientation() const
QPrintPreviewWidget::ZoomMode zoomMode
void _q_fit(bool doFitting=false)
QList< const QPicture * > pictures
void setZoomFactor(qreal zoomFactor)
QList< QGraphicsItem * > pages
QPrintPreviewWidget::ViewMode viewMode
void setCurrentPage(int pageNumber)
The QPrinter class is a paint device that paints on a printer.
Definition: qprinter.h:64
int resolution() const
Definition: qprinter.cpp:1080
The QRadialGradient class is used in combination with QBrush to specify a radial gradient brush.
Definition: qbrush.h:448
The QRectF class defines a finite rectangle in the plane using floating point precision.
Definition: qrect.h:511
constexpr void setLeft(qreal pos) noexcept
Definition: qrect.h:684
constexpr qreal height() const noexcept
Definition: qrect.h:741
constexpr qreal width() const noexcept
Definition: qrect.h:738
constexpr QPointF bottomLeft() const noexcept
Definition: qrect.h:541
constexpr QPointF topLeft() const noexcept
Definition: qrect.h:538
constexpr QPointF bottomRight() const noexcept
Definition: qrect.h:539
constexpr void moveTop(qreal pos) noexcept
Definition: qrect.h:714
constexpr QPointF topRight() const noexcept
Definition: qrect.h:540
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:59
constexpr int height() const noexcept
Definition: qrect.h:266
constexpr QSize size() const noexcept
Definition: qrect.h:269
constexpr int width() const noexcept
Definition: qrect.h:263
The QResizeEvent class contains event parameters for resize events. \inmodule QtGui.
Definition: qevent.h:612
The QScrollBar widget provides a vertical or horizontal scroll bar.
Definition: qscrollbar.h:56
The QShowEvent class provides an event that is sent when a widget is shown.
Definition: qevent.h:647
Exception-safe wrapper around QObject::blockSignals().
Definition: qobject.h:527
The QSizeF class defines the size of a two-dimensional object using floating point precision.
Definition: qsize.h:235
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:55
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
Definition: qstyleoption.h:684
void resizeEvent(QResizeEvent *e) override
void showEvent(QShowEvent *e) override
GraphicsView(QWidget *parent=nullptr)
QRectF boundingRect() const override
PageItem(int _pageNum, const QPicture *_pagePicture, QSize _paperSize, QRect _pageRect)
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:56
QPoint map(const QPoint &p) const
qreal m11() const
Definition: qtransform.h:226
QRect mapRect(const QRect &) const
The QVBoxLayout class lines up widgets vertically.
Definition: qboxlayout.h:127
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:133
virtual void setVisible(bool visible)
Definition: qwidget.cpp:8198
bool visible
whether the widget is visible
Definition: qwidget.h:178
QLayout * layout
Definition: qwidget_p.h:670
float step
float factor
QOpenGLWidget * widget
[1]
QPainter paint
qDeleteAll(list.begin(), list.end())
double e
#define true
Definition: ftrandom.c:51
@ KeepAspectRatio
Definition: qnamespace.h:1213
@ gray
Definition: qnamespace.h:64
@ white
Definition: qnamespace.h:62
@ black
Definition: qnamespace.h:61
@ red
Definition: qnamespace.h:66
@ NoPen
Definition: qnamespace.h:1112
@ ContainsItemBoundingRect
Definition: qnamespace.h:1340
@ NoBrush
Definition: qnamespace.h:1140
int qRound(qfloat16 d) noexcept
Definition: qfloat16.h:227
QT_END_INCLUDE_NAMESPACE typedef double qreal
Definition: qglobal.h:341
auto qSqrt(T v)
Definition: qmath.h:132
int qFloor(T v)
Definition: qmath.h:78
int qCeil(T v)
Definition: qmath.h:72
#define SLOT(a)
Definition: qobjectdefs.h:87
#define SIGNAL(a)
Definition: qobjectdefs.h:88
GLenum mode
GLint GLsizei GLsizei height
GLint GLenum GLsizei GLsizei GLsizei GLint border
GLint GLsizei width
GLenum target
GLbitfield flags
GLdouble GLdouble t
[9]
Definition: qopenglext.h:243
GLdouble GLdouble GLdouble GLdouble q
Definition: qopenglext.h:259
GLsizei const GLchar *const * path
Definition: qopenglext.h:4283
GLuint GLenum option
Definition: qopenglext.h:5929
GLenum GLenum GLenum GLenum GLenum scale
Definition: qopenglext.h:10817
#define Q_OBJECT
Definition: qtmetamacros.h:158
#define signals
Definition: qtmetamacros.h:77
#define emit
Definition: qtmetamacros.h:85
Q_UNUSED(salary)
[21]
QObject::connect nullptr
QByteArray page
[45]
QGraphicsItem * item
view setCacheMode(QGraphicsView::CacheBackground)
QList< QTreeWidgetItem * > items
QPainter painter(this)
[7]
label setFrameStyle(QFrame::Panel|QFrame::Raised)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent