Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

SelectWidget Class Reference
(QtUiTest::SelectWidget)
[QtUiTestModule]

The SelectWidget class provides an abstract base class for all test widgets which allow the user to select from a range of items. More...

    #include <QtUiTest>

This class is under development and is subject to change.

Public Functions

Signals


Detailed Description

The SelectWidget class provides an abstract base class for all test widgets which allow the user to select from a range of items.

QtUiTest::SelectWidget encapsulates a widget which provides the user with a choice from a (possibly unlimited) range. This is closely related to QtUiTest::ListWidget, which may be implemented to allow a user to enumerate all items from a list.

Examples of widgets suitable for this interface include QAbstractItemView, QComboBox and QMenu.

See also QtUiTest::ListWidget.


Member Function Documentation

bool SelectWidget::canSelect ( const QString & item ) const   [pure virtual]

Returns true if item can possibly be selected from this widget.

bool SelectWidget::canSelectMulti ( const QStringList & items ) const   [virtual]

Returns true if all of the given items can be selected from this widget at the same time.

The base implementation returns true if isMultiSelection() returns true and canSelect() returns true for every item in items.

bool SelectWidget::isMultiSelection () const   [virtual]

Returns true if this widget supports the selection of multiple items at the same time.

The base implementation returns false.

bool SelectWidget::select ( const QString & item )   [pure virtual]

Simulates the user input necessary to select item from this widget.

Returns true if item was successfully selected.

If canSelect() returns true and this function returns false, an error has occurred and this widget's state is undefined.

bool SelectWidget::selectMulti ( const QStringList & items )   [virtual]

Simulates the user input necessary to select all items from this widget at the same time.

Returns true if items were all successfully selected.

If canSelectMulti() returns true and this function returns false, an error has occurred and this widget's state is undefined.

The base implementation calls canSelectMulti() to check if items can be selected, then calls select() on each item in items.

void SelectWidget::selected ( const QString & item )   [signal]

This signal is emitted when item is selected from this widget.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3