77 void qgraphicswidget();
80 void boundingRect_data();
82 void dumpFocusChain_data();
83 void dumpFocusChain();
84 void focusWidget_data();
88 void focusPolicy_data();
92 void fontPropagation();
93 void fontChangedEvent();
94 void fontPropagationWidgetItemWidget();
95 void fontPropagationSceneChange();
98 void geometryChanged();
101 void getContentsMargins_data();
102 void getContentsMargins();
103 void initStyleOption_data();
104 void initStyleOption();
107 void layoutDirection_data();
108 void layoutDirection();
111 void palettePropagation();
112 void parentWidget_data();
116 void setAttribute_data();
118 void setStyle_data();
120 void setTabOrder_data();
122 void setTabOrderAndReparent();
123 void topLevelWidget_data();
124 void topLevelWidget();
125 void unsetLayoutDirection_data();
126 void unsetLayoutDirection();
127 void focusNextPrevChild_data();
128 void focusNextPrevChild();
129 void verifyFocusChain();
130 void updateFocusChainWhenChildDie();
131 void sizeHint_data();
133 void consistentPosSizeGeometry_data();
134 void consistentPosSizeGeometry();
135 void setSizes_data();
137 void closePopupOnOutsideClick();
139 void explicitMouseGrabber();
140 void implicitMouseGrabber();
141 void doubleClickAfterExplicitMouseGrab();
142 void popupMouseGrabber();
143 void windowFlags_data();
145 void shortcutsDeletion();
146 void painterStateProtectionOnWindowFrame();
147 void ensureClipping();
148 void widgetSendsGeometryChanges();
150 void addChildInpolishEvent();
153 void autoFillBackground();
155 void itemChangeEvents();
156 void itemSendGeometryPosChangesDeactivated();
157 void fontPropagatesResolveToChildren();
158 void fontPropagatesResolveToGrandChildren();
159 void fontPropagatesResolveInParentChange();
160 void fontPropagatesResolveViaNonWidget();
161 void fontPropagatesResolveFromScene();
163 void windowFrameSectionAt();
166 void task236127_bspTreeIndexFails();
167 void task243004_setStyleCrash();
168 void task250119_shortcutContext();
169 void QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems();
170 void QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems();
171 void QTBUG_45867_send_itemChildAddedChange_to_parent();
270 m_sizes[which] = newSizeHint;
277 return m_sizes[which];
283 void tst_QGraphicsWidget::qgraphicswidget()
314 void tst_QGraphicsWidget::activation()
352 void tst_QGraphicsWidget::boundingRect_data()
354 QTest::addColumn<QSizeF>(
"size");
360 void tst_QGraphicsWidget::boundingRect()
369 void tst_QGraphicsWidget::dumpFocusChain_data()
371 QTest::addColumn<bool>(
"scene");
372 QTest::addColumn<int>(
"children");
373 QTest::addColumn<bool>(
"setFocus");
380 void tst_QGraphicsWidget::dumpFocusChain()
405 void tst_QGraphicsWidget::focusWidget_data()
407 QTest::addColumn<int>(
"childCount");
408 QTest::addColumn<int>(
"childWithFocus");
415 void tst_QGraphicsWidget::focusWidget()
421 qApp->sendEvent(&
scene, &windowActivate);
426 for (
int i = 0;
i < childCount; ++
i) {
431 if (childCount > 0) {
432 QFETCH(
int, childWithFocus);
440 void tst_QGraphicsWidget::focusWidget2()
444 qApp->sendEvent(&
scene, &windowActivate);
508 QCOMPARE(otherFocusInSpy.count(), 1);
509 QCOMPARE(otherFocusOutSpy.count(), 0);
511 delete otherSubWidget;
531 void tst_QGraphicsWidget::focusWidget3()
535 qApp->sendEvent(&
scene, &windowActivate);
555 void tst_QGraphicsWidget::focusPolicy_data()
557 QTest::addColumn<Qt::FocusPolicy>(
"focusPolicy1");
558 QTest::addColumn<Qt::FocusPolicy>(
"focusPolicy2");
560 for (
int i = 0;
i < 25; ++
i) {
580 void tst_QGraphicsWidget::focusPolicy()
584 qApp->sendEvent(&
scene, &windowActivate);
594 bool wasFocusable = isFocusable;
607 void tst_QGraphicsWidget::font_data()
609 QTest::addColumn<QString>(
"fontName");
614 void tst_QGraphicsWidget::font()
625 void tst_QGraphicsWidget::fontPropagatesResolveToChildren()
653 void tst_QGraphicsWidget::fontPropagatesResolveToGrandChildren()
689 void tst_QGraphicsWidget::fontPropagatesResolveViaNonWidget()
725 void tst_QGraphicsWidget::fontPropagatesResolveFromScene()
765 void tst_QGraphicsWidget::fontPropagatesResolveInParentChange()
811 void tst_QGraphicsWidget::fontPropagation()
873 void tst_QGraphicsWidget::fontChangedEvent()
903 void tst_QGraphicsWidget::fontPropagationWidgetItemWidget()
925 void tst_QGraphicsWidget::fontPropagationSceneChange()
948 void tst_QGraphicsWidget::geometry_data()
950 QTest::addColumn<QPointF>(
"pos");
951 QTest::addColumn<QSizeF>(
"size");
958 void tst_QGraphicsWidget::geometry()
967 if (!
size.isNull() && !
pos.isNull())
969 if (!
size.isNull() &&
pos.isNull())
974 void tst_QGraphicsWidget::geometryChanged()
977 w.setGeometry(0, 0, 200, 200);
980 w.setGeometry(0, 0, 100, 100);
989 void tst_QGraphicsWidget::width()
994 w.setProperty(
"width",
qreal(50));
998 w.setGeometry(0, 0, 200, 200);
1002 void tst_QGraphicsWidget::height()
1007 w.setProperty(
"height",
qreal(50));
1011 w.setGeometry(0, 0, 200, 200);
1015 void tst_QGraphicsWidget::getContentsMargins_data()
1017 QTest::addColumn<qreal>(
"left");
1018 QTest::addColumn<qreal>(
"top");
1019 QTest::addColumn<qreal>(
"right");
1020 QTest::addColumn<qreal>(
"bottom");
1027 void tst_QGraphicsWidget::getContentsMargins()
1035 widget.getContentsMargins(&gleft, >op, &gright, &gbottom);
1045 int oldEventCounts =
widget.eventCount;
1048 widget.getContentsMargins(&gleft, >op, &gright, &gbottom);
1056 void tst_QGraphicsWidget::initStyleOption_data()
1058 QTest::addColumn<bool>(
"enabled");
1059 QTest::addColumn<bool>(
"focus");
1060 QTest::addColumn<bool>(
"underMouse");
1061 QTest::addColumn<Qt::LayoutDirection>(
"layoutDirection");
1062 QTest::addColumn<QSizeF>(
"size");
1063 QTest::addColumn<QPalette>(
"palette");
1064 QTest::addColumn<QString>(
"fontName");
1071 void tst_QGraphicsWidget::initStyleOption()
1075 view.resize(300, 300);
1081 widget->setAcceptHoverEvents(
true);
1096 QFETCH(
bool, underMouse);
1116 QCOMPARE(isUnderMouse, underMouse);
1125 void tst_QGraphicsWidget::layout_data()
1127 QTest::addColumn<int>(
"childCount");
1133 void tst_QGraphicsWidget::layout()
1142 for (
int i = 0;
i < childCount; ++
i) {
1161 void tst_QGraphicsWidget::layoutDirection_data()
1163 QTest::addColumn<Qt::LayoutDirection>(
"layoutDirection");
1169 void tst_QGraphicsWidget::layoutDirection()
1180 for (
int i = 0;
i < 10; ++
i) {
1197 void tst_QGraphicsWidget::paint_data()
1203 void tst_QGraphicsWidget::paint()
1211 void tst_QGraphicsWidget::palettePropagation()
1222 QColor overridePalText(42, 43, 44);
1223 QColor overridePalToolTipBase(45, 46, 47);
1224 QColor sysPalButton(99, 98, 97);
1278 void tst_QGraphicsWidget::parentWidget_data()
1280 QTest::addColumn<int>(
"childrenCount");
1287 void tst_QGraphicsWidget::parentWidget()
1289 QFETCH(
int, childrenCount);
1298 QCOMPARE(itemChild.parentWidget(),
nullptr);
1300 for (
int i = 0;
i < childrenCount; ++
i) {
1306 void tst_QGraphicsWidget::resize_data()
1308 QTest::addColumn<QSizeF>(
"size");
1315 void tst_QGraphicsWidget::resize()
1320 int oldEventCounts =
widget.eventCount;
1325 QCOMPARE(
widget.eventCount, oldEventCounts + ((oldSize == boundedSize) ? 0 : 1));
1330 void tst_QGraphicsWidget::setAttribute_data()
1332 QTest::addColumn<Qt::WidgetAttribute>(
"attribute");
1333 QTest::addColumn<bool>(
"supported");
1341 void tst_QGraphicsWidget::setAttribute()
1350 void tst_QGraphicsWidget::setStyle_data()
1352 QTest::addColumn<QString>(
"style");
1358 void tst_QGraphicsWidget::setStyle()
1360 #ifndef Q_NO_STYLE_FUSION
1363 int oldEventCounts =
widget.eventCount;
1366 if (!
style.isEmpty()) {
1380 QSKIP(
"This test requires the Fusion style");
1384 void tst_QGraphicsWidget::setTabOrder_data()
1386 QTest::addColumn<int>(
"childrenCount");
1393 void tst_QGraphicsWidget::setTabOrder()
1395 QFETCH(
int, childrenCount);
1407 for (
int i = 0;
i < childrenCount; ++
i) {
1419 view.viewport()->setFocus();
1426 int currentItem = 0;
1435 template <
class Iterator>
1437 Iterator i1, Iterator i2,
1442 Iterator last = i2 - 1;
1443 for (Iterator
i = i1;
i != i2; ++
i) {
1446 if (actualFocusItem != expectedFocusItem) {
1459 template <
class Container>
1466 void tst_QGraphicsWidget::setTabOrderAndReparent()
1476 for (
int i = 0;
i < 3; ++
i) {
1495 w[0]->setParentItem(
p);
1499 w[1]->setParentItem(
p);
1502 w[2]->setParentItem(
p);
1509 &errorMessage), errorMessage.
constData());
1512 for (
int i = 0;
i < 4; ++
i) {
1519 w[3]->setParentItem(
w[0]);
1523 &errorMessage), errorMessage.
constData());
1529 w[0]->setParentItem(
p);
1536 &errorMessage), errorMessage.
constData());
1539 void tst_QGraphicsWidget::topLevelWidget_data()
1541 QTest::addColumn<QString>(
"str");
1546 void tst_QGraphicsWidget::topLevelWidget()
1553 void tst_QGraphicsWidget::unsetLayoutDirection_data()
1555 QTest::addColumn<Qt::LayoutDirection>(
"layoutDirection");
1561 void tst_QGraphicsWidget::unsetLayoutDirection()
1569 for (
int i = 0;
i < 10; ++
i) {
1581 void tst_QGraphicsWidget::focusNextPrevChild_data()
1583 QTest::addColumn<QString>(
"str");
1588 void tst_QGraphicsWidget::focusNextPrevChild()
1593 widget.call_focusNextPrevChild(
true);
1596 void tst_QGraphicsWidget::verifyFocusChain()
1613 w->call_focusNextPrevChild(
true);
1630 QCOMPARE(
w->call_focusNextPrevChild(
true),
true);
1632 QCOMPARE(
w->call_focusNextPrevChild(
true),
true);
1649 w->call_focusNextPrevChild(
true);
1660 for (
int i = 0;
i < 2;
i++) {
1675 window->setLayout(layout);
1681 view->setMinimumSize(150, 50);
1739 void tst_QGraphicsWidget::updateFocusChainWhenChildDie()
1744 view.resize(200, 150);
1767 myWidget.move(availableGeometry.
topLeft() +
QPoint(350, 50));
1786 void tst_QGraphicsWidget::sizeHint_data()
1788 QTest::addColumn<bool>(
"layout");
1794 void tst_QGraphicsWidget::sizeHint()
1806 void tst_QGraphicsWidget::consistentPosSizeGeometry_data()
1808 QTest::addColumn<QSizeF>(
"minSize");
1809 QTest::addColumn<QSizeF>(
"maxSize");
1810 QTest::addColumn<QRectF>(
"geometry");
1811 QTest::addColumn<QRectF>(
"expectedGeometry");
1818 void tst_QGraphicsWidget::consistentPosSizeGeometry()
1829 w->setMinimumSize(minSize);
1830 w->setMaximumSize(maxSize);
1831 w->setGeometry(geometry);
1832 QCOMPARE(
w->geometry(), expectedGeometry);
1833 QCOMPARE(
w->pos(), expectedGeometry.topLeft());
1834 QCOMPARE(
w->size(), expectedGeometry.size());
1837 w->setGeometry(otherGeom);
1842 w->setPos(geometry.topLeft());
1843 QCOMPARE(
w->geometry().topLeft(), expectedGeometry.topLeft());
1844 QCOMPARE(
w->pos(), expectedGeometry.topLeft());
1846 w->resize(geometry.size());
1847 QCOMPARE(
w->geometry().size(), expectedGeometry.size());
1848 QCOMPARE(
w->geometry(), expectedGeometry);
1876 void tst_QGraphicsWidget::setSizes_data()
1879 QTest::addColumn<QList<Inst>>(
"inputInstructions");
1880 QTest::addColumn<QList<Inst>>(
"compareInstructions");
1921 QTest::newRow(
"unsetMinSize, expand size to minimumSizeHint")
1927 void tst_QGraphicsWidget::setSizes()
1940 for (
i = 0;
i < inputInstructions.count(); ++
i) {
1944 switch (
input.first) {
1946 min =
input.second.toSizeF();
1949 pref =
input.second.toSizeF();
1952 max =
input.second.toSizeF();
1985 qWarning(
"instruction not implemented");
1991 widget->setPreferredSize(pref);
1994 for (
i = 0;
i < compareInstructions.count(); ++
i) {
1996 switch (
input.first) {
2019 qWarning(
"instruction not implemented");
2026 void tst_QGraphicsWidget::closePopupOnOutsideClick()
2036 event.setScenePos(
QPointF(50, 50));
2043 event.setScenePos(
QPointF(150, 150));
2050 void tst_QGraphicsWidget::task236127_bspTreeIndexFails()
2059 widget->setData(0,
"widget");
2060 widget2->
setData(0,
"widget2");
2078 void tst_QGraphicsWidget::defaultSize()
2094 widget->setPreferredSize(60, 60);
2102 void tst_QGraphicsWidget::explicitMouseGrabber()
2111 QCOMPARE(widgetGrabEventSpy.count(), 0);
2114 QCOMPARE(widgetUngrabEventSpy.count(), 0);
2128 QCOMPARE(widgetGrabEventSpy.count(), 1);
2131 QCOMPARE(widgetUngrabEventSpy.count(), 1);
2135 QCOMPARE(widgetGrabEventSpy.count(), 2);
2138 QCOMPARE(widgetGrabEventSpy.count(), 2);
2139 QCOMPARE(widgetUngrabEventSpy.count(), 1);
2141 QCOMPARE(widgetUngrabEventSpy.count(), 2);
2153 widget->setData(0,
"widget");
2154 widget2->
setData(0,
"widget2");
2155 widget3->
setData(0,
"widget3");
2159 QCOMPARE(widgetGrabEventSpy.count(), 3);
2162 QCOMPARE(widgetUngrabEventSpy.count(), 3);
2163 QCOMPARE(widget2GrabEventSpy.count(), 1);
2166 QCOMPARE(widget2UngrabEventSpy.count(), 1);
2167 QCOMPARE(widget3GrabEventSpy.count(), 1);
2170 QCOMPARE(widget3UngrabEventSpy.count(), 1);
2171 QCOMPARE(widget2GrabEventSpy.count(), 2);
2174 QCOMPARE(widget2UngrabEventSpy.count(), 2);
2175 QCOMPARE(widgetGrabEventSpy.count(), 4);
2182 QCOMPARE(widgetGrabEventSpy.count(), 5);
2184 QCOMPARE(widget2GrabEventSpy.count(), 3);
2186 QCOMPARE(widget3GrabEventSpy.count(), 2);
2188 QCOMPARE(widget3UngrabEventSpy.count(), 2);
2189 QCOMPARE(widget2UngrabEventSpy.count(), 4);
2190 QCOMPARE(widgetGrabEventSpy.count(), 6);
2194 void tst_QGraphicsWidget::implicitMouseGrabber()
2211 event.setScenePos(
QPointF(50, 50));
2215 QCOMPARE(widgetGrabEventSpy.count(), 1);
2220 event.setScenePos(
QPointF(50, 50));
2224 QCOMPARE(widgetGrabEventSpy.count(), 1);
2225 QCOMPARE(widgetUngrabEventSpy.count(), 1);
2229 QCOMPARE(widgetGrabEventSpy.count(), 2);
2234 event.setScenePos(
QPointF(50, 50));
2238 QCOMPARE(widgetGrabEventSpy.count(), 2);
2243 event.setScenePos(
QPointF(50, 50));
2247 QCOMPARE(widgetGrabEventSpy.count(), 2);
2248 QCOMPARE(widgetUngrabEventSpy.count(), 1);
2250 QCOMPARE(widgetUngrabEventSpy.count(), 2);
2258 event.setScenePos(
QPointF(50, 50));
2262 QCOMPARE(widgetGrabEventSpy.count(), 3);
2264 QCOMPARE(widgetUngrabEventSpy.count(), 2);
2269 event.setScenePos(
QPointF(50, 50));
2273 QCOMPARE(widgetGrabEventSpy.count(), 3);
2274 QCOMPARE(widgetUngrabEventSpy.count(), 2);
2277 QCOMPARE(widgetGrabEventSpy.count(), 3);
2278 QCOMPARE(widgetUngrabEventSpy.count(), 3);
2283 widget2->
resize(200, 200);
2291 QCOMPARE(widgetGrabEventSpy.count(), 4);
2296 event.setScenePos(
QPointF(250, 50));
2300 QCOMPARE(widgetGrabEventSpy.count(), 4);
2301 QCOMPARE(widget2GrabEventSpy.count(), 0);
2302 QCOMPARE(widget2UngrabEventSpy.count(), 0);
2305 QCOMPARE(widgetUngrabEventSpy.count(), 4);
2326 switch (
event->type()) {
2355 void tst_QGraphicsWidget::doubleClickAfterExplicitMouseGrab()
2366 event.setScenePos(
QPointF(50, 50));
2375 event.setButtons({});
2377 event.setScenePos(
QPointF(50, 50));
2388 event.setScenePos(
QPointF(50, 50));
2397 event.setButtons({});
2399 event.setScenePos(
QPointF(50, 50));
2407 void tst_QGraphicsWidget::popupMouseGrabber()
2418 QCOMPARE(widgetGrabEventSpy.count(), 1);
2423 QCOMPARE(widgetUngrabEventSpy.count(), 1);
2428 QCOMPARE(widgetGrabEventSpy.count(), 2);
2434 widget2->
resize(200, 200);
2439 widget3->
resize(200, 200);
2445 QCOMPARE(widgetUngrabEventSpy.count(), 2);
2446 QCOMPARE(widget2GrabEventSpy.count(), 1);
2451 QCOMPARE(widget2UngrabEventSpy.count(), 1);
2452 QCOMPARE(widget3GrabEventSpy.count(), 1);
2457 QCOMPARE(widget2GrabEventSpy.count(), 2);
2458 QCOMPARE(widget3UngrabEventSpy.count(), 1);
2461 QCOMPARE(widget2UngrabEventSpy.count(), 2);
2462 QCOMPARE(widget3GrabEventSpy.count(), 2);
2471 event.setScenePos(
QPointF(500, 500));
2475 QCOMPARE(widget3UngrabEventSpy.count(), 2);
2476 QCOMPARE(widget2GrabEventSpy.count(), 3);
2481 QCOMPARE(widget3GrabEventSpy.count(), 3);
2482 QCOMPARE(widget2UngrabEventSpy.count(), 3);
2489 QCOMPARE(widget3UngrabEventSpy.count(), 3);
2490 QCOMPARE(widget2GrabEventSpy.count(), 4);
2494 QCOMPARE(widget3GrabEventSpy.count(), 4);
2495 QCOMPARE(widget2UngrabEventSpy.count(), 4);
2499 void tst_QGraphicsWidget::windowFlags_data()
2501 QTest::addColumn<int>(
"inputFlags");
2502 QTest::addColumn<int>(
"outputFlags");
2529 void tst_QGraphicsWidget::windowFlags()
2532 QFETCH(
int, outputFlags);
2576 void tst_QGraphicsWidget::shortcutsDeletion()
2612 void tst_QGraphicsWidget::painterStateProtectionOnWindowFrame()
2627 m_proxyStyle = proxyStyle;
2660 void tst_QGraphicsWidget::task243004_setStyleCrash()
2701 void tst_QGraphicsWidget::task250119_shortcutContext()
2762 for (
int i = 0;
i < numItems; ++
i)
2790 {
return QRectF(10,10,50,50);}
2801 void tst_QGraphicsWidget::ensureClipping()
2826 expected << clipWidget << childWidget << childitem;
2867 void tst_QGraphicsWidget::widgetSendsGeometryChanges()
2887 QRectF geometry(20, 20, 50, 50);
2908 sp.setHeightForWidth(
true);
2926 qreal w = constraint.width();
2929 if (
w >= 0 && constraint.height() < 0) {
2937 return QSizeF(48.989794, 48.989794);
2945 void tst_QGraphicsWidget::respectHFW()
2951 view->resize(400, 400);
2952 view->setSceneRect(-100, -100, 300,300);
2955 window->setGeometry(0, 0, 70, 70);
2966 view->mapFromScene(60, 20),
2971 view->releaseMouse();
3018 void tst_QGraphicsWidget::addChildInpolishEvent()
3026 view.resize(200, 200);
3032 void tst_QGraphicsWidget::polishEvent()
3038 void polishEvent()
override
3059 void tst_QGraphicsWidget::polishEvent2()
3063 void polishEvent()
override
3080 void tst_QGraphicsWidget::autoFillBackground()
3106 void tst_QGraphicsWidget::initialShow()
3113 void polishEvent()
override { update(); }
3128 qApp->setActiveWindow(dummyView.data());
3130 const int expectedRepaintCount = paintSpy.count();
3148 void tst_QGraphicsWidget::itemChangeEvents()
3156 switch (
event->type()) {
3169 #ifndef QT_NO_CURSOR
3220 #ifndef QT_NO_CURSOR
3227 item->setToolTip(
"tooltipText");
3237 void tst_QGraphicsWidget::itemSendGeometryPosChangesDeactivated()
3278 for (
int i = 0;
i < chain.
size(); ++
i)
3281 int n = chain.
size() * (wrapsAround ? 3 : 1);
3282 for (
int i = 0;
i <
n; ++
i)
3288 for (
int i =
n - 2;
i >= 0; --
i)
3296 void tst_QGraphicsWidget::tabFocus()
3361 void tst_QGraphicsWidget::windowFrameSectionAt()
3364 widget.setWindowFrameMargins(5, 5, 5, 5);
3386 void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems()
3416 void tst_QGraphicsWidget::QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems()
3436 void tst_QGraphicsWidget::QTBUG_45867_send_itemChildAddedChange_to_parent()
3441 int m_itemChildAddedChangeNotificationsCount;
3445 m_itemChildAddedChangeNotificationsCount(0)
3449 QRectF boundingRect()
const override {
return QRectF(); }
3457 ++m_itemChildAddedChangeNotificationsCount;
3464 QCOMPARE(
item.m_itemChildAddedChangeNotificationsCount, 1);
3468 #include "tst_qgraphicswidget.moc"
small capitals from c petite p scientific i
[1]
EventSpy(QObject *watched, QEvent::Type type)
bool eventFilter(QObject *watched, QEvent *event) override
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override
GrabOnPressItem(const QRectF &rect)
void mousePressEvent(QGraphicsSceneMouseEvent *) override
bool sceneEvent(QEvent *event) override
QList< GraphicsItemChange > changes
QList< QVariant > oldValues
ItemChangeTester(QGraphicsItem *parent)
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const override
ProxyStyle(QStyle *proxyStyle)
The QAction class provides an abstraction for user commands that can be added to different user inter...
void setIcon(const QIcon &icon)
static QPalette palette()
static QWidget * focusWidget()
static QWidget * activeWindow()
static void setActiveWindow(QWidget *act)
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
void addItem(QLayoutItem *) override
The QBrush class defines the fill pattern of shapes drawn by QPainter.
The QByteArray class provides an array of bytes.
const char * constData() const noexcept
static QByteArray number(int, int base=10)
The QColor class provides colors based on RGB, HSV or CMYK values.
The QCommonStyle class encapsulates the common Look and Feel of a GUI.
static bool sendEvent(QObject *receiver, QEvent *event)
static void processEvents(QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents)
static void setPos(int x, int y)
Qt::CursorShape shape() const
The QEvent class is the base class of all event classes. Event objects contain event parameters.
@ GraphicsSceneMouseRelease
@ GraphicsSceneMousePress
@ GraphicsSceneMouseDoubleClick
The QFocusEvent class contains event parameters for widget focus events. \inmodule QtGui.
The QFont class specifies a query for a font used for drawing text.
The QFontMetrics class provides font metrics information.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
friend class QGraphicsWidget
void setData(int key, const QVariant &value)
void update(const QRectF &rect=QRectF())
QGraphicsWidget * parentWidget() const
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
@ ItemClipsChildrenToShape
@ ItemSendsScenePositionChanges
@ ItemSendsGeometryChanges
void setPos(const QPointF &pos)
void setParentItem(QGraphicsItem *parent)
void setEnabled(bool enabled)
QVariant data(int key) const
void setFlag(GraphicsItemFlag flag, bool enabled=true)
void setActive(bool active)
void setVisible(bool visible)
QGraphicsItem * focusItem() const
void setFocus(Qt::FocusReason focusReason=Qt::OtherFocusReason)
void setCursor(const QCursor &cursor)
virtual bool sceneEvent(QEvent *event)
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene.
The QGraphicsLinearLayout class provides a horizontal or vertical layout for managing widgets in Grap...
QPointF pos
the position of the item
QGraphicsObject * parent
the parent of the item
The QGraphicsPixmapItem class provides a pixmap item that you can add to 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.
QList< QGraphicsItem * > items(Qt::SortOrder order=Qt::DescendingOrder) const
void removeItem(QGraphicsItem *item)
void setFont(const QFont &font)
void addItem(QGraphicsItem *item)
void setFocusItem(QGraphicsItem *item, Qt::FocusReason focusReason=Qt::OtherFocusReason)
virtual void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[], QWidget *widget=nullptr)
void setActivePanel(QGraphicsItem *item)
QGraphicsItem * activePanel() const
void setSceneRect(const QRectF &rect)
QPalette palette
the scene's default palette
void setActiveWindow(QGraphicsWidget *widget)
QFont font
the scene's default font
void setFocus(Qt::FocusReason focusReason=Qt::OtherFocusReason)
QGraphicsItem * focusItem() const
void render(QPainter *painter, const QRectF &target=QRectF(), const QRectF &source=QRectF(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
QGraphicsItem * mouseGrabberItem() const
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
QScreen * primaryScreen
the primary (or default) screen of the application.
static void setLayoutDirection(Qt::LayoutDirection direction)
The QHBoxLayout class lines up widgets horizontally.
The QHash class is a template class that provides a hash-table-based dictionary.
iterator insert(const Key &key, const T &value)
The QHideEvent class provides an event which is sent after a widget is hidden.
The QIcon class provides scalable icons in different modes and states.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QKeyEvent class describes a key event.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
virtual QSize minimumSize() const =0
The QLineEdit widget is a one-line text editor.
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
qsizetype count() const noexcept
void append(parameter_type t)
The QMouseEvent class contains parameters that describe a mouse event.
The QObject class is the base class of all Qt objects.
void installEventFilter(QObject *filterObj)
const QObjectList & children() const
virtual bool event(QEvent *event)
The QPainter class performs low-level painting on widgets and other paint devices.
Qt::LayoutDirection layoutDirection() const
void drawRect(const QRectF &rect)
void setPen(const QColor &color)
void drawLine(const QLineF &line)
bool begin(QPaintDevice *)
void setOpacity(qreal opacity)
void setBrush(const QBrush &brush)
void fillRect(const QRectF &, const QBrush &)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode=Qt::AbsoluteSize)
The QPalette class contains color groups for each widget state.
const QColor & color(ColorGroup cg, ColorRole cr) const
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
The QPen class defines how a QPainter should draw lines and outlines of shapes.
The QPointF class defines a point in the plane using floating point precision.
The QPoint class defines a point in the plane using integer precision.
The QRectF class defines a finite rectangle in the plane using floating point precision.
constexpr QPointF topLeft() const noexcept
constexpr QSizeF size() const noexcept
The QRect class defines a rectangle in the plane using integer precision.
constexpr QPoint topLeft() const noexcept
constexpr QSize size() const noexcept
constexpr int width() const noexcept
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
QRect availableGeometry
the screen's available geometry in pixels
The QShowEvent class provides an event that is sent when a widget is shown.
The QSizeF class defines the size of a two-dimensional object using floating point precision.
constexpr qreal width() const noexcept
constexpr QSizeF expandedTo(const QSizeF &) const noexcept
constexpr QSizeF boundedTo(const QSizeF &) const noexcept
constexpr qreal height() const noexcept
The QSize class defines the size of a two-dimensional object using integer point precision.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
The QString class provides a Unicode character string.
static QStyle * create(const QString &)
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
The QStyleOption class stores the parameters used by QStyle functions.
The QVBoxLayout class lines up widgets vertically.
The QVariant class acts like a union for the most common Qt data types.
static auto fromValue(const T &value) -> std::enable_if_t< std::is_copy_constructible_v< T >, QVariant >
QByteArray toByteArray() const
RectItem(Qt::GlobalColor color, QGraphicsItem *parent=0)
QRectF boundingRect() const override
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const override
SizeHinter(QGraphicsItem *parent=nullptr, Qt::WindowFlags wFlags={ }, const QSizeF &min=QSizeF(5, 5), const QSizeF &pref=QSizeF(50, 50), const QSizeF &max=QSizeF(500, 500))
void setSizeHint(Qt::SizeHint which, const QSizeF &newSizeHint)
[Window class definition]
QSignalSpy spy(myCustomObject, SIGNAL(mySignal(int, QString, double)))
[0]
Q_TESTLIB_EXPORT QTestData & newRow(const char *dataTag)
Q_GUI_EXPORT bool qWaitForWindowActive(QWindow *window, int timeout=5000)
Q_GUI_EXPORT bool qWaitForWindowExposed(QWindow *window, int timeout=5000)
void mouseMove(QWindow *window, QPoint pos=QPoint(), int delay=-1)
Q_TESTLIB_EXPORT void ignoreMessage(QtMsgType type, const char *message)
void mouseClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1)
void mousePress(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1)
Q_CORE_EXPORT void qWait(int ms)
QTextStream & center(QTextStream &stream)
@ WindowContextHelpButtonHint
@ WindowMaximizeButtonHint
@ WindowMinimizeButtonHint
@ X11BypassWindowManagerHint
@ WidgetWithChildrenShortcut
std::pair< T1, T2 > QPair
EGLOutputLayerEXT EGLint EGLAttrib value
EGLOutputLayerEXT EGLint attribute
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLenum GLsizei GLsizei GLint * values
[16]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum const void * fontName
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei const GLint * box
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble w1
GLenum GLenum GLenum input
#define QTEST_MAIN(TestObject)
#define QSKIP(statement,...)
#define QFETCH(Type, name)
#define QEXPECT_FAIL(dataIndex, comment, mode)
#define QTRY_COMPARE(expr, expected)
#define QVERIFY(statement)
#define QTRY_VERIFY(expr)
#define QVERIFY2(statement, description)
#define QTRY_VERIFY2(expr, messageExpression)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent