source: trunk/src/testlib/qtestevent.qdoc@ 1034

Last change on this file since 1034 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

  • Property svn:eol-style set to native
File size: 6.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation (qt-info@nokia.com)
6**
7** This file is part of the documentation of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:FDL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in a
14** written agreement between you and Nokia.
15**
16** GNU Free Documentation License
17** Alternatively, this file may be used under the terms of the GNU Free
18** Documentation License version 1.3 as published by the Free Software
19** Foundation and appearing in the file included in the packaging of this
20** file.
21**
22** If you have questions regarding the use of this file, please contact
23** Nokia at qt-info@nokia.com.
24** $QT_END_LICENSE$
25**
26****************************************************************************/
27
28/*!
29 \class QTestEventList
30 \inmodule QtTest
31
32 \brief The QTestEventList class provides a list of GUI events.
33
34 QTestEventList inherits from QList<QTestEvent *>, and provides
35 convenience functions for populating the list.
36
37 A QTestEventList can be populated with GUI events that can be
38 stored as test data for later usage, or be replayed on any
39 QWidget.
40
41 Example:
42 \snippet doc/src/snippets/code/doc_src_qtestevent.qdoc 0
43
44 The example above simulates the user entering the character \c a
45 followed by a backspace, waiting for 200 milliseconds and
46 repeating it.
47*/
48
49/*! \fn QTestEventList::QTestEventList()
50
51 Constructs an empty QTestEventList.
52*/
53
54/*! \fn QTestEventList::QTestEventList(const QTestEventList &other)
55
56 Constructs a new QTestEventList as a copy of \a other.
57*/
58
59/*! \fn QTestEventList::~QTestEventList()
60
61 Empties the list and destroys all stored events.
62*/
63
64/*! \fn void QTestEventList::clear()
65
66 Removes all events from the list.
67*/
68
69/*! \fn void QTestEventList::addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
70
71 Adds a new key click to the list. The event will simulate the key \a qtKey with the modifier \a modifiers and then wait for \a msecs milliseconds.
72
73 \sa QTest::keyClick()
74*/
75
76/*! \fn void QTestEventList::addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
77
78 Adds a new key press to the list. The event will press the key \a qtKey with the modifier \a modifiers and then wait for \a msecs milliseconds.
79
80 \sa QTest::keyPress()
81*/
82
83/*! \fn void QTestEventList::addKeyRelease(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
84
85 Adds a new key release to the list. The event will release the key \a qtKey with the modifier \a modifiers and then wait for \a msecs milliseconds.
86
87 \sa QTest::keyRelease()
88
89*/
90
91/*! \fn void QTestEventList::addKeyEvent(QTest::KeyAction action, Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
92 \internal
93*/
94
95/*! \fn void QTestEventList::addKeyClick(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
96
97 \overload
98
99 Adds a new key click to the list. The event will simulate the key \a ascii with the modifier \a modifiers and then wait for \a msecs milliseconds.
100
101 \sa QTest::keyClick()
102
103*/
104
105/*! \fn void QTestEventList::addKeyPress(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
106
107 \overload
108
109 Adds a new key press to the list. The event will press the key \a ascii with the modifier \a modifiers and then wait for \a msecs milliseconds.
110
111 \sa QTest::keyPress()
112*/
113
114/*! \fn void QTestEventList::addKeyRelease(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
115
116 \overload
117
118 Adds a new key release to the list. The event will release the key \a ascii with the modifier \a modifiers and then wait for \a msecs milliseconds.
119
120 \sa QTest::keyRelease()
121*/
122
123/*! \fn void QTestEventList::addKeyClicks(const QString &keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
124
125 Adds new keyboard entries to the list. The event will press the \a keys with the \a modifiers and wait \a msecs milliseconds between each key.
126
127 \sa QTest::keyClicks()
128*/
129
130/*! \fn void QTestEventList::addKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
131 \internal
132*/
133
134/*! \fn void QTestEventList::addDelay(int msecs)
135
136 Adds a \a msecs milliseconds delay.
137
138 \sa QTest::qWait()
139*/
140
141/*! \fn void QTestEventList::simulate(QWidget *w)
142
143 Simulates the events from the list one by one on the widget \a w.
144 For an example, please read the \l QTestEventList class documentation.
145*/
146
147/*! \fn void QTestEventList::addMousePress(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
148
149 Add a mouse press to the list. The event will press the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
150
151 \sa QTest::mousePress()
152*/
153/*! \fn void QTestEventList::addMouseRelease(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
154
155 Add a mouse release to the list. The event will release the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
156
157 \sa QTest::mouseRelease()
158*/
159/*! \fn void QTestEventList::addMouseClick(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
160
161 Add a mouse click to the list. The event will click the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
162
163 \sa QTest::mouseClick()
164*/
165/*! \fn void QTestEventList::addMouseDClick(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
166
167 Add a double mouse click to the list. The event will double click the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
168
169 \sa QTest::mousePress()
170*/
171/*! \fn void QTestEventList::addMouseMove(QPoint pos = QPoint(), int delay=-1)
172
173 Adds a mouse move to the list. The event will move the mouse to the position \a pos. If a \a delay (in milliseconds) is set, the test will wait after moving the mouse. The default position is the center of the widget.
174
175 \sa QTest::mousePress()
176*/
177
Note: See TracBrowser for help on using the repository browser.