File: ZTest.rst

package info (click to toggle)
tuiwidgets 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,852 kB
  • sloc: cpp: 70,959; python: 655; sh: 39; makefile: 24
file content (37 lines) | stat: -rw-r--r-- 1,452 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.. _ZTest:

.. rst-class:: tw-invisible
.. cpp:class:: Tui::ZTest

   Actually a namespace.

ZTest
-----

Support code for testing widgets.

.. cpp:function:: void Tui::ZTest::sendText(Tui::ZTerminal *terminal, const QString &text, Tui::KeyboardModifiers modifiers)

   Send input text to the focused widget of ``terminal`` as if input via keyboard.

.. cpp:function:: void Tui::ZTest::sendKey(Tui::ZTerminal *terminal, Tui::Key key, Tui::KeyboardModifiers modifiers)

   Send a key to the focused widget of ``terminal`` as if input via keyboard.

.. cpp:function:: void Tui::ZTest::sendKeyToWidget(Tui::ZWidget *w, Tui::Key key, Tui::KeyboardModifiers modifiers)

   Send a key directly to the widget ``w`` as if input via keyboard, bypasses focus handling.

.. cpp:function:: void Tui::ZTest::sendPaste(Tui::ZTerminal *terminal, const QString &text)

   Send pasted text to the focused widget of ``terminal`` as if pasted into the terminal.

.. cpp:function:: Tui::ZImage Tui::ZTest::waitForNextRenderAndGetContents(Tui::ZTerminal *terminal)

   Waits (busy looping on QCoreApplication::processEvents) until the next render cycle finished and returns the
   terminal contents.

.. cpp:function:: void Tui::ZTest::withLayoutRequestTracking(Tui::ZTerminal *terminal, std::function<void (QSet<Tui::ZWidget*>*)> closure)

   Calls closure ``closure`` with a :cpp:class:`QSet` that gets all widgets added which mark themselves as pending
   for relayout.