summaryrefslogtreecommitdiffstats
path: root/tests/manual/dialogs/utils.h
diff options
context:
space:
mode:
authorMikolaj Boc <[email protected]>2022-09-13 13:23:09 +0200
committerMikolaj Boc <[email protected]>2022-09-13 18:13:00 +0200
commit701852e17b6440540bda4cbfb83743cf8fd2d4ba (patch)
treeb0545059e9e4ca201fcf87b117679eed887bed27 /tests/manual/dialogs/utils.h
parent9ec7cbc77462938969e9569deeb5a106d321ce21 (diff)
Add window-modal show option to dialogs manual test
This provides an easy way to test window modality using a ready available test. Change-Id: Ia23736c61fd56dda8f72ae19f5f102163951271b Reviewed-by: Tor Arne Vestbø <[email protected]>
Diffstat (limited to 'tests/manual/dialogs/utils.h')
-rw-r--r--tests/manual/dialogs/utils.h16
1 files changed, 16 insertions, 0 deletions
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 <QPair>
#include <QList>
+#include <functional>
+
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<CheckBoxFlagPair> 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<void()> fn);
+
+QPushButton *addButton(const QString &description, QVBoxLayout *layout, QObject *receiver,
+ const char *slotFunc);
+
+QPushButton *addButton(const QString &description, QVBoxLayout *layout, std::function<void()> fn);
+
#endif // UTILS_H