ADTF Qt5
Loading...
Searching...
No Matches
adtf::ui::testing::hollow Namespace Reference

Legacy version namespace for all functionality taken over from ADTF v3.7. More...

Functions

template<typename T>
T * find_qobject (const QString &strObjectName)
 
QString dump_tree (const QTreeWidgetItem *pNode, size_t nColumnCount, QString strPrefix="")
 
QString dump_tree (const QTreeWidget *pTree, size_t nColumnCount)
 
tResult compare_dump (const QString &strChecked, const QString &strExpected)
 
tResult wait_for_next_ui_timer (std::chrono::nanoseconds tmTimeout=std::chrono::nanoseconds{-1})
 

Detailed Description

Legacy version namespace for all functionality taken over from ADTF 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()

template<typename T>
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.

◆ 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.