LibEngsas
|
This class can be used to close blocking widgets. More...
#include <eclosemodalwidgetthread.h>
Public Member Functions | |
ECloseModalWidgetThread (uint timeToCloseEvent=3000) | |
~ECloseModalWidgetThread () | |
void | setEvents (ECloseModalWidgetEvents eventList) |
void | stopThread () |
void | run () |
bool | isStarted () |
bool | waitForStart () |
Private Slots | |
void | setStarted () |
Private Attributes | |
bool | finishedStartup |
ECloser * | closer |
uint | timeToCloseEvent |
ECloseModalWidgetEvents | events |
This class can be used to close blocking widgets.
It is especially useful during tests, where QDialogs popping up and must be closed again. Used as shown below, the blocking widget is closed 3 seconds after the thread was started. To modify the time see ECloseModalWidgetThread().
Per default it uses the escape sequence to close the dialog. But you can specify a list of events, which is used instead with setEvents() before calling start().
You can use it as shown in the following example or look at EFileDialogTest::getExistingDirectory().
ECloseModalWidgetThread::ECloseModalWidgetThread | ( | uint | timeToCloseEvent = 3000 | ) |
You can specify the time until the close event is send after the thread is started with timeToCloseEvent
.
ECloseModalWidgetThread::~ECloseModalWidgetThread | ( | ) |
bool ECloseModalWidgetThread::isStarted | ( | ) |
void ECloseModalWidgetThread::run | ( | ) |
void ECloseModalWidgetThread::setEvents | ( | ECloseModalWidgetEvents | eventList | ) |
|
privateslot |
void ECloseModalWidgetThread::stopThread | ( | ) |
bool ECloseModalWidgetThread::waitForStart | ( | ) |
|
private |
|
private |
|
private |
|
private |