ADTF  3.18.3
adtf::ui::testing::hollow Namespace Reference

Namespace for all functionality of the ADTF UI SDK provided since v3.7. More...

Functions

template<typename T >
T * find_qobject (const QString &strObjectName)
 Utility that finds a widget/object by its object name. More...
 
QString dump_tree (const QTreeWidgetItem *pNode, size_t nColumnCount, QString strPrefix="")
 Dumps the content of a QTreeWidgetItem. More...
 
QString dump_tree (const QTreeWidget *pTree, size_t nColumnCount)
 Dump the content of a QTreeWidget. More...
 
tResult compare_dump (const QString &strChecked, const QString &strExpected)
 Compare to large strings. More...
 
tResult wait_for_next_ui_timer (std::chrono::nanoseconds tmTimeout=std::chrono::nanoseconds{-1})
 Wait until at least one more OnTimer() call have been issued by the X system. More...
 

Detailed Description

Namespace for all functionality of the ADTF UI SDK provided since v3.7.

Function Documentation

◆ compare_dump()

tResult adtf::ui::testing::hollow::compare_dump ( const QString &  strChecked,
const QString &  strExpected 
)

Compare to large strings.

Parameters
[in]strCheckedThe data.
[in]strExpectedThe expected data.
Returns
Standard result.

◆ dump_tree() [1/2]

QString adtf::ui::testing::hollow::dump_tree ( const QTreeWidget *  pTree,
size_t  nColumnCount 
)

Dump the content of a QTreeWidget.

Parameters
[in]pTreeThe tree widget of which the content should be dumped.
[in]nColumnCountThe amout of columns to dump, >= 2
Returns
A string containing all tree data.

◆ dump_tree() [2/2]

QString adtf::ui::testing::hollow::dump_tree ( const QTreeWidgetItem *  pNode,
size_t  nColumnCount,
QString  strPrefix = "" 
)

Dumps the content of a QTreeWidgetItem.

Parameters
[in]pNodeThe node to dump all data and children from
[in]nColumnCountThe amout of columns to dump, >= 2
[in]strPrefixA prefix to all elements.
Returns
A string containing all tree data.

◆ find_qobject()

T* adtf::ui::testing::hollow::find_qobject ( const QString &  strObjectName)

Utility that finds a widget/object by its object name.

Note that any QObject can have an object name. So to expose widgets to your tests give them an expressive unique name.

Parameters
[in]strObjectNameThe object name of the object/widget you're looking for.
Template Parameters
TThe type of the widget you're looking for.

Definition at line 40 of file qt_test_tools.h.

References THROW_ERROR_DESC.

◆ wait_for_next_ui_timer()

tResult adtf::ui::testing::hollow::wait_for_next_ui_timer ( std::chrono::nanoseconds  tmTimeout = std::chrono::nanoseconds{-1})

Wait until at least one more OnTimer() call have been issued by the X system.

Parameters
[in]tmTimeoutAn optional timeout, -1 => no timeout.
Return values
ERR_TIMEOUTIf no OnTimer call has been issued during the timeout period.