Async  0.18.0
Public Slots | Public Member Functions | List of all members
Async::QtApplication Class Reference

An application class for writing GUI applications in Qt. More...

#include <AsyncQtApplication.h>

Inheritance diagram for Async::QtApplication:
Async::Application

Public Slots

void quit (void)
 Exit the application main loop. More...
 

Public Member Functions

 QtApplication (int &argc, char **argv)
 Constructor. More...
 
virtual ~QtApplication (void)
 Destructor. More...
 
void exec (void)
 Execute the application main loop. More...
 
- Public Member Functions inherited from Async::Application
 Application (void)
 Default constructor. More...
 
virtual ~Application (void)
 Destructor. More...
 
virtual void quit (void)=0
 Exit the application main loop. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Async::Application
static Applicationapp (void)
 Get the one and only application instance. More...
 

Detailed Description

An application class for writing GUI applications in Qt.

Author
Tobias Blomberg
Date
2003-03-16

This class is used when writing Qt applications. It should be one of the first things done in the main function of your application. Use the Async::QtApplication class in place of the QApplication class.

In the application you do not have to use the Async classes for timers and file descriptor watches. It is perfecly legal to use the Qt variants (QTimer and QSocketNotifier). You can mix them as much as you like.

#include <QPushButton>
using namespace Async;
int main(int argc, char **argv)
{
QtApplication app(argc, argv);
QPushButton hello("Hello, Async::QtApplication", 0);
QObject::connect(&hello, SIGNAL(clicked()), &app, SLOT(quit()));
hello.show();
app.exec();
}
Examples:
AsyncQtApplication_demo.cpp.

Definition at line 153 of file AsyncQtApplication.h.

Constructor & Destructor Documentation

Async::QtApplication::QtApplication ( int &  argc,
char **  argv 
)

Constructor.

The two arguments typically are the arguments given to the main function.

Parameters
argcThe number of command line arguments + 1
argvAn array containing the commandline arguments
virtual Async::QtApplication::~QtApplication ( void  )
virtual

Destructor.

Member Function Documentation

void Async::QtApplication::exec ( void  )
virtual

Execute the application main loop.

When this member function is called the application core will enter the main loop. It will not exit from this loop until the Async::Application::quit method is called.

Implements Async::Application.

Examples:
AsyncQtApplication_demo.cpp.
void Async::QtApplication::quit ( void  )
slot

Exit the application main loop.

This function should be called to exit the application core main loop.


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