casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
casa::QtApp Class Reference

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

#include <QtApp.h>

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. More...
 
static QApplication * init ()
 Another name for app() that may be clearer during initialization.... More...
 
static casacore::Int exec ()
 Enter the QApp's event loop. More...
 
static void exit (casacore::Int returnCode=0)
 Exit the QApp's event loop. More...
 
static void destroy ()
 Call when completely finished with Qt, if you're a stickler for cleanup. More...
 
static casacore::Bool exists ()
 If true, a full-fledged QApplication has been created (though it may not necessarily be executing its event loop). More...
 
static casacore::Bool isInLoop ()
 Is the QApp executing its event loop? (In many cases, caller probably ought to know this already...). More...
 

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 64 of file QtApp.h.

Member Function Documentation

static QApplication* casa::QtApp::app ( )
inlinestatic

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 70 of file QtApp.h.

References casa::name().

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

static void casa::QtApp::destroy ( )
inlinestatic

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

Definition at line 117 of file QtApp.h.

static casacore::Int casa::QtApp::exec ( )
inlinestatic

Enter the QApp's event loop.

Definition at line 105 of file QtApp.h.

References app().

static casacore::Bool casa::QtApp::exists ( )
inlinestatic

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

Definition at line 124 of file QtApp.h.

Referenced by isInLoop().

static void casa::QtApp::exit ( casacore::Int  returnCode = 0)
inlinestatic

Exit the QApp's event loop.

Definition at line 111 of file QtApp.h.

References app().

static QApplication* casa::QtApp::init ( )
inlinestatic

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

Definition at line 99 of file QtApp.h.

References app().

Referenced by QtApp().

static casacore::Bool casa::QtApp::isInLoop ( )
inlinestatic

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

Definition at line 132 of file QtApp.h.

References app(), and exists().


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