Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PyApp Class Reference

#include <PyApp.h>

Collaboration diagram for PyApp:

Collaboration graph
[legend]
List of all members.

Detailed Description

A class to interface Python to application running in seperate thread.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Matthew Langston <langston@slac.stanford.edu>

Definition at line 30 of file PyApp.h.

Public Member Functions

PyCanvascurrentCanvas ()
 Returns a pointer to the current CanvasWindow.
int exec ()
 Starts the QApplication event loop.
void lock ()
void openDocument (const std::string &filename)
 Opens a new document from file filename.
 PyApp (int)
 A constructor that created QtApp without threading.
 PyApp ()
 The default Constructor.
void quit ()
 Terminates the application.
void unlock ()
 ~PyApp ()
 The destructor.

Static Public Member Functions

static PyAppinstance ()
 Returns the application instance.

Private Attributes

QtAppm_app
 The QApplication object.
HdThreadm_thread
 The thread in which to run the GUI.

Static Private Attributes

static PyApps_instance = 0
 The instance of the application.


Constructor & Destructor Documentation

PyApp::PyApp  ) 
 

The default Constructor.

Definition at line 102 of file PyApp.cxx.

References QtApp::currentCanvas(), QApplication::hasPendingEvents(), QtApp::instance(), m_app, m_thread, s_instance, QThread::start(), QApplication::startingUp(), and QThread::wait().

Referenced by instance().

PyApp::PyApp int   ) 
 

A constructor that created QtApp without threading.

Definition at line 131 of file PyApp.cxx.

References m_app.

PyApp::~PyApp  ) 
 

The destructor.

Kills the application object running in the thread.

Definition at line 140 of file PyApp.cxx.


Member Function Documentation

PyCanvas * PyApp::currentCanvas  ) 
 

Returns a pointer to the current CanvasWindow.

Definition at line 166 of file PyApp.cxx.

References QtApp::currentCanvas(), QApplication::lock(), m_app, and QApplication::unlock().

Referenced by hippodraw::Python::export_HDApp().

int PyApp::exec  ) 
 

Starts the QApplication event loop.

Definition at line 154 of file PyApp.cxx.

References QApplication::exec(), and m_app.

Referenced by hippodraw::Python::export_HDApp().

PyApp * PyApp::instance  )  [static]
 

Returns the application instance.

Definition at line 145 of file PyApp.cxx.

References PyApp(), and s_instance.

Referenced by hippodraw::Python::export_HDApp().

void PyApp::lock  ) 
 

Definition at line 187 of file PyApp.cxx.

References QApplication::lock(), and m_app.

Referenced by hippodraw::Python::export_HDApp().

void PyApp::openDocument const std::string filename  ) 
 

Opens a new document from file filename.

Definition at line 177 of file PyApp.cxx.

References QApplication::lock(), m_app, and QApplication::unlock().

Referenced by hippodraw::Python::export_HDApp().

void PyApp::quit  ) 
 

Terminates the application.

Definition at line 161 of file PyApp.cxx.

References m_app.

Referenced by hippodraw::Python::export_HDApp().

void PyApp::unlock  ) 
 

Definition at line 191 of file PyApp.cxx.

References m_app, and QApplication::unlock().

Referenced by hippodraw::Python::export_HDApp().


Member Data Documentation

QtApp* PyApp::m_app [private]
 

The QApplication object.

Definition at line 38 of file PyApp.h.

Referenced by currentCanvas(), exec(), lock(), openDocument(), PyApp(), quit(), and unlock().

HdThread* PyApp::m_thread [private]
 

The thread in which to run the GUI.

Definition at line 41 of file PyApp.h.

Referenced by PyApp().

PyApp * PyApp::s_instance = 0 [static, private]
 

The instance of the application.

Definition at line 100 of file PyApp.cxx.

Referenced by instance(), and PyApp().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3