casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
casa::QtApp Class Reference

Management of the QApp object needed by any Qt application. More...

#include <QtApp.h>

List of all members.

Public Member Functions

 QtApp ()
 ~QtApp ()

Static Public Member Functions

static QApplication * app ()
 Return the program's [unique] QApplication object, creating it if it doesn't yet exist.
static QApplication * init ()
 Another name for app() that may be clearer during initialization....
static Int exec ()
 Enter the QApp's event loop.
static void exit (Int returnCode=0)
 Exit the QApp's event loop.
static void destroy ()
 Call when completely finished with Qt, if you're a stickler for cleanup.
static Bool exists ()
 If True, a full-fledged QApplication has been created (though it may not necessarily be executing its event loop).
static Bool isInLoop ()
 Is the QApp executing its event loop? (In many cases, caller probably ought to know this already...).

Detailed Description

Management of the QApp object needed by any Qt application.

Synopsis

This adds just a little to QApplication's [static] services. (Actually, I wish all this were there instead -- it could be...). Casa applications which use Qt can just call QtApp::app() to retrieve 'the' (unique) QApplication object for the program; that routine will create it if it doesn't yet exist. It is recommended that all access by casa to the QApplication object go through this routine, to assure only one is created.

Definition at line 57 of file QtApp.h.


Constructor & Destructor Documentation

casa::QtApp::QtApp ( ) [inline]

Definition at line 61 of file QtApp.h.

References init().

casa::QtApp::~QtApp ( ) [inline]

Definition at line 62 of file QtApp.h.


Member Function Documentation

static QApplication* casa::QtApp::app ( ) [inline, static]

Return the program's [unique] QApplication object, creating it if it doesn't yet exist.

Note: use QtApp::destroy() to delete the QApplication.

Definition at line 68 of file QtApp.h.

References casa::name().

Referenced by exec(), exit(), init(), and isInLoop().

static void casa::QtApp::destroy ( ) [inline, static]

Call when completely finished with Qt, if you're a stickler for cleanup.

Definition at line 107 of file QtApp.h.

static Int casa::QtApp::exec ( ) [inline, static]

Enter the QApp's event loop.

Definition at line 99 of file QtApp.h.

References app().

static Bool casa::QtApp::exists ( ) [inline, static]

If True, a full-fledged QApplication has been created (though it may not necessarily be executing its event loop).

Definition at line 113 of file QtApp.h.

Referenced by isInLoop().

static void casa::QtApp::exit ( Int  returnCode = 0) [inline, static]

Exit the QApp's event loop.

Definition at line 103 of file QtApp.h.

References app().

static QApplication* casa::QtApp::init ( ) [inline, static]

Another name for app() that may be clearer during initialization....

Definition at line 94 of file QtApp.h.

References app().

Referenced by QtApp().

static Bool casa::QtApp::isInLoop ( ) [inline, static]

Is the QApp executing its event loop? (In many cases, caller probably ought to know this already...).

Definition at line 120 of file QtApp.h.

References app(), and exists().


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