LibEngsas
Public Member Functions | Private Slots | Private Attributes | List of all members
ECloseModalWidgetThread Class Reference

This class can be used to close blocking widgets. More...

#include <eclosemodalwidgetthread.h>

+ Collaboration diagram for ECloseModalWidgetThread:

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
EClosercloser
uint timeToCloseEvent
ECloseModalWidgetEvents events

Detailed Description

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().

thread.setEvents(); // (If you want to use other events, than the ESC key
thread.start();
if(!thread.waitForStart())
QSKIP("Could not start thread", SkipSingle);
// Open your blocking widget here
thread.stopThread();

Constructor & Destructor Documentation

ECloseModalWidgetThread::ECloseModalWidgetThread ( uint  timeToCloseEvent = 3000)

You can specify the time until the close event is send after the thread is started with timeToCloseEvent.

+ Here is the call graph for this function:

ECloseModalWidgetThread::~ECloseModalWidgetThread ( )

Member Function Documentation

bool ECloseModalWidgetThread::isStarted ( )

+ Here is the caller graph for this function:

void ECloseModalWidgetThread::run ( )
void ECloseModalWidgetThread::setEvents ( ECloseModalWidgetEvents  eventList)
void ECloseModalWidgetThread::setStarted ( )
privateslot

+ Here is the caller graph for this function:

void ECloseModalWidgetThread::stopThread ( )
bool ECloseModalWidgetThread::waitForStart ( )

+ Here is the call graph for this function:

Member Data Documentation

ECloser* ECloseModalWidgetThread::closer
private
ECloseModalWidgetEvents ECloseModalWidgetThread::events
private
bool ECloseModalWidgetThread::finishedStartup
private
uint ECloseModalWidgetThread::timeToCloseEvent
private

The documentation for this class was generated from the following files: