Warning, file /include/QtWidgets/qtestsupport_widgets.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QTESTSUPPORT_WIDGETS_H
0005 #define QTESTSUPPORT_WIDGETS_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtGui/qtestsupport_gui.h>
0009
0010 QT_BEGIN_NAMESPACE
0011
0012 class QPointingDevice;
0013 class QWidget;
0014
0015 namespace QTest {
0016
0017 [[nodiscard]] Q_WIDGETS_EXPORT bool qWaitForWindowActive(QWidget *widget, int timeout = 5000);
0018 [[nodiscard]] Q_WIDGETS_EXPORT bool qWaitForWindowFocused(QWidget *widget, QDeadlineTimer timeout = std::chrono::seconds{5});
0019 [[nodiscard]] Q_WIDGETS_EXPORT bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000);
0020
0021 class Q_WIDGETS_EXPORT QTouchEventWidgetSequence : public QTouchEventSequence
0022 {
0023 public:
0024 ~QTouchEventWidgetSequence() override;
0025 QTouchEventWidgetSequence& press(int touchId, const QPoint &pt, QWidget *widget = nullptr);
0026 QTouchEventWidgetSequence& move(int touchId, const QPoint &pt, QWidget *widget = nullptr);
0027 QTouchEventWidgetSequence& release(int touchId, const QPoint &pt, QWidget *widget = nullptr);
0028 QTouchEventWidgetSequence& stationary(int touchId) override;
0029
0030 bool commit(bool processEvents = true) override;
0031
0032 private:
0033 QTouchEventWidgetSequence(QWidget *widget, QPointingDevice *aDevice, bool autoCommit);
0034
0035 QPoint mapToScreen(QWidget *widget, const QPoint &pt);
0036
0037 QWidget *targetWidget = nullptr;
0038
0039 friend QTouchEventWidgetSequence touchEvent(QWidget *widget, QPointingDevice *device, bool autoCommit);
0040 };
0041
0042 }
0043
0044 QT_END_NAMESPACE
0045
0046 #endif