From 701852e17b6440540bda4cbfb83743cf8fd2d4ba Mon Sep 17 00:00:00 2001 From: Mikolaj Boc Date: Tue, 13 Sep 2022 13:23:09 +0200 Subject: Add window-modal show option to dialogs manual test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This provides an easy way to test window modality using a ready available test. Change-Id: Ia23736c61fd56dda8f72ae19f5f102163951271b Reviewed-by: Tor Arne Vestbø --- tests/manual/dialogs/utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/manual/dialogs/utils.h') diff --git a/tests/manual/dialogs/utils.h b/tests/manual/dialogs/utils.h index 7d257eea02d..83362958b27 100644 --- a/tests/manual/dialogs/utils.h +++ b/tests/manual/dialogs/utils.h @@ -10,7 +10,12 @@ #include #include +#include + QT_FORWARD_DECLARE_CLASS(QCheckBox) +QT_FORWARD_DECLARE_CLASS(QGridLayout) +QT_FORWARD_DECLARE_CLASS(QVBoxLayout) +QT_FORWARD_DECLARE_CLASS(QPushButton) // Associate enum/flag value with a description. struct FlagData @@ -51,4 +56,15 @@ private: QList m_checkBoxes; }; +QPushButton *addButton(const QString &description, QGridLayout *layout, int &row, int column, + QObject *receiver, const char *slotFunc); + +QPushButton *addButton(const QString &description, QGridLayout *layout, int &row, int column, + std::function fn); + +QPushButton *addButton(const QString &description, QVBoxLayout *layout, QObject *receiver, + const char *slotFunc); + +QPushButton *addButton(const QString &description, QVBoxLayout *layout, std::function fn); + #endif // UTILS_H -- cgit v1.2.3