Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

G4Qt Class Reference

#include <G4Qt.hh>

Inheritance diagram for G4Qt:

Inheritance graph
[legend]
Collaboration diagram for G4Qt:

Collaboration graph
[legend]
List of all members.

Public Member Functions

G4bool Inited ()
void * GetEvent ()
void FlushAndWaitExecution ()
virtual ~G4Qt ()

Static Public Member Functions

G4QtgetInstance ()
G4QtgetInstance (int, char **, char *)

Private Member Functions

 G4Qt (int, char **, char *)

Static Private Attributes

G4Qtinstance = NULL

Constructor & Destructor Documentation

G4Qt::~G4Qt  )  [virtual]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 101 of file G4Qt.cc.

References instance.

00105 {
00106   if(this==instance) {
00107     instance = NULL;
00108   }
00109 }

G4Qt::G4Qt int  a_argn,
char **  a_args,
char *  a_class
[private]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 79 of file G4Qt.cc.

References QtInited, G4VInteractorManager::SetArguments(), and G4VInteractorManager::SetMainInteractor().

Referenced by getInstance().

00086 {
00087   if(QtInited==FALSE) {  //Qt should be Inited once !
00088 
00089     new QApplication (a_argn, a_args);
00090 
00091     if(qApp==NULL) {
00092       G4cout        << "G4Qt : Unable to init Qt." << G4endl;
00093     }
00094     QtInited  = TRUE;
00095     SetMainInteractor (qApp);
00096   }
00097   SetArguments      (a_argn,a_args);
00098   //  AddDispatcher     ((G4DispatchFunction)XtDispatchEvent);
00099 }

Here is the call graph for this function:


Member Function Documentation

void G4Qt::FlushAndWaitExecution  )  [virtual]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Implements G4VInteractorManager.

Definition at line 137 of file G4Qt.cc.

00141 {
00142 //FIXME
00143    G4cout        << "G4Qt : Rien compris a cette fonction G4Qt::FlushAndWaitExecution." << G4endl;
00144 //  if(mainApp==NULL) return;
00145 //  XSync(QtDisplay(mainApp),False);
00146 }

void * G4Qt::GetEvent  )  [virtual]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Implements G4VInteractorManager.

Definition at line 122 of file G4Qt.cc.

Referenced by G4UIQt::SecondaryLoop().

00126 {
00127 //FIXME
00128 //   G4cout        << "G4Qt : Rien compris a cette fonction G4Qt::GetEvent." << G4endl;
00129 //  static XEvent  event;
00130 //  if(appContext==NULL) return NULL;
00131 //  if(mainApp==NULL) return NULL;
00132 //  QtAppNextEvent (appContext, &event);
00133 //  return         &event;
00134   printf("*");
00135 }

G4Qt * G4Qt::getInstance int  a_argn,
char **  a_args,
char *  a_class
[static]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 65 of file G4Qt.cc.

References G4Qt(), and instance.

00072 {
00073   if (instance==NULL) {
00074     instance = new G4Qt(a_argn,a_args,a_class);
00075   }
00076   return instance;
00077 }

Here is the call graph for this function:

G4Qt * G4Qt::getInstance  )  [static]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 57 of file G4Qt.cc.

Referenced by G4UIQt::G4UIQt(), G4UIQt::SecondaryLoop(), G4UIQt::SessionStart(), and G4UIQt::SessionTerminate().

00061 {
00062   return G4Qt::getInstance (0,NULL,(char*)"Geant4");
00063 }

G4bool G4Qt::Inited  )  [virtual]
 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Implements G4VInteractorManager.

Definition at line 111 of file G4Qt.cc.

References QtInited.

00115 {
00116   return QtInited;
00117 }


Member Data Documentation

G4Qt * G4Qt::instance = NULL [static, private]
 

Definition at line 48 of file G4Qt.cc.

Referenced by getInstance(), and ~G4Qt().


The documentation for this class was generated from the following files:
Generated on Fri Jun 22 11:07:07 2007 by doxygen 1.3.4