A class to interface Python to application running in separate thread. More...
#include <PyApp.h>

Public Member Functions | |
| PyCanvas * | currentCanvas () |
| Returns a pointer to the current CanvasWindow. More... | |
| int | exec () |
| Starts the QApplication event loop. More... | |
| bool | hasTerminated () const |
Returns true if the application as terminated, otherwise returns false. More... | |
| void | openDocument (const std::string &filename) |
| Opens a new document from file filename. More... | |
| PyApp () | |
| The default Constructor. More... | |
| PyApp (int) | |
| A constructor that created QtApp without threading. More... | |
| PyApp (char *script) | |
| A constructor taking script name as argument. More... | |
| void | quit () |
| Terminates the application. More... | |
| void | quitOnLastWindowClose (bool yes) |
If yes is true, allows the application to quit when the last CanvasWindow is closed by the user. More... | |
| ~PyApp () | |
| The destructor. More... | |
Static Public Member Functions | |
| static bool | hasPendingEvents () |
Returns true if the application object has pending events. More... | |
| static PyApp * | instance () |
| Returns the application instance. More... | |
| static void | lock () |
| Obtains a lock on the application's mutex. More... | |
| static bool | locked () |
returns true if the Application mutex is locked by different thread. More... | |
| static void | unlock () |
| Releases the lock on the application's mutex. More... | |
Private Attributes | |
| HdThread * | m_thread |
| The thread in which to run the GUI. More... | |
Static Private Attributes | |
| static QtApp * | s_app = 0 |
| The QApplication object. More... | |
| static PyApp * | s_instance = 0 |
| The instance of the application. More... | |
A class to interface Python to application running in separate thread.
| PyApp | ( | ) |
| PyApp | ( | int | ) |
| PyApp | ( | char * | script | ) |
| ~PyApp | ( | ) |
| PyCanvas * currentCanvas | ( | ) |
Returns a pointer to the current CanvasWindow.
| int exec | ( | ) |
Starts the QApplication event loop.
|
static |
Returns true if the application object has pending events.
Definition at line 370 of file PyApp.cxx.
References QApplication::closingDown(), and yes.
Referenced by PyCanvas::addDisplay().
| bool hasTerminated | ( | ) | const |
Returns true if the application as terminated, otherwise returns false.
Definition at line 269 of file PyApp.cxx.
References QApplication::closingDown().
|
static |
|
static |
Obtains a lock on the application's mutex.
For Qt 3, obtains a lock on the application's mutex, for Qt 4 does nothing.
Definition at line 331 of file PyApp.cxx.
References QApplication::closingDown().
Referenced by PyNTuple::addColumn(), QtDisplay::addDataRep(), QtDisplay::addDataRepStacked(), QtDisplay::addFunction(), PyNTuple::addRow(), PyDataSource::addRow(), QtCut::addTarget(), QtCut::addTargets(), PyCanvas::addText(), PyCanvas::addTextAt(), PyCanvas::addTextAtAbs(), PyCanvas::addTextRep(), QtDisplay::addValues(), PyNTuple::append(), PyDataSource::append(), QtDisplay::applyCut(), QtDisplay::applyCuts(), PyNTuple::clear(), PyCanvas::close(), QtDisplay::createDataArray(), QtCut::createFits(), QtRootController::createNTuple(), PyNTupleController::createNTuple(), QtCut::createNTuple(), QtDisplay::createNTuple(), QtCut::createTnt(), QtCut::cutRange(), QtDisplay::deleteView(), QtRootNTuple::expandIfNeeded(), QtRootNTuple::getColumn(), QtRootNTuple::getColumnShape(), QtDisplay::getDataRep(), QtDisplay::getDataReps(), PyCanvas::getDisplay(), PyCanvas::getDisplays(), QtDisplay::getLabel(), QtRootController::getNTupleNames(), PyCanvas::getPickTable(), QtDisplay::getRange(), QtRootNTuple::getRow(), PyCanvas::getSelPickTable(), QtRootNTuple::isMultiDimensional(), QtDisplay::nextView(), PyCanvas::print(), PyCanvas::PyCanvas(), QtCut::QtCut(), QtDisplay::QtDisplay(), PyNTupleController::registerNTuple(), PyNTuple::replaceColumn(), QtDisplay::reset(), QtDisplay::resize(), QtRootNTuple::rows(), PyCanvas::saveAs(), PyDataSource::saveColumnFromNumArray(), PyCanvas::saveSelectedImages(), PyCanvas::selectAllDisplays(), PyCanvas::selectDisplay(), QtDisplay::setAspectRatio(), QtDisplay::setAutoRanging(), QtDisplay::setAutoTicks(), QtDisplay::setBinWidth(), QtDisplay::setColorMap(), QtDisplay::setContourLevels(), QtCut::setCutRange(), QtCut::setEnabled(), PyCanvas::setHeight(), QtDisplay::setLabel(), QtDisplay::setLog(), QtDisplay::setNumberOfBins(), QtDisplay::setOffset(), PyCanvas::setPlotMatrix(), QtDisplay::setPointRep(), QtDisplay::setRange(), QtDisplay::setTicks(), PyNTuple::setTitle(), QtDisplay::setTitle(), QtDisplay::setTransform(), QtDisplay::setView(), PyCanvas::setWidth(), PyCanvas::setX(), PyCanvas::setY(), PyCanvas::show(), QtCut::toggleInverted(), QtDisplay::update(), and PyFitsController::writeToFile().
|
static |
returns true if the Application mutex is locked by different thread.
Definition at line 344 of file PyApp.cxx.
References QApplication::closingDown(), and yes.
| void openDocument | ( | const std::string & | filename | ) |
| void quitOnLastWindowClose | ( | bool | yes | ) |
If yes is true, allows the application to quit when the last CanvasWindow is closed by the user.
|
static |
Releases the lock on the application's mutex.
For Qt 3, releases the lock on the application's mutex, for Qt 4 does nothing.
Definition at line 357 of file PyApp.cxx.
References QApplication::closingDown().
Referenced by PyNTuple::addColumn(), QtDisplay::addDataRep(), QtDisplay::addDataRepStacked(), QtDisplay::addFunction(), PyNTuple::addRow(), PyDataSource::addRow(), QtCut::addTarget(), QtCut::addTargets(), PyCanvas::addText(), PyCanvas::addTextAt(), PyCanvas::addTextAtAbs(), PyCanvas::addTextRep(), QtDisplay::addValues(), PyNTuple::append(), PyDataSource::append(), QtDisplay::applyCut(), QtDisplay::applyCuts(), PyNTuple::clear(), PyCanvas::close(), QtDisplay::createDataArray(), QtCut::createFits(), QtRootController::createNTuple(), PyNTupleController::createNTuple(), QtCut::createNTuple(), QtDisplay::createNTuple(), QtCut::createTnt(), QtCut::cutRange(), QtDisplay::deleteView(), QtRootNTuple::expandIfNeeded(), QtRootNTuple::getColumn(), QtRootNTuple::getColumnShape(), QtDisplay::getDataRep(), QtDisplay::getDataReps(), PyCanvas::getDisplay(), PyCanvas::getDisplays(), QtDisplay::getLabel(), QtRootController::getNTupleNames(), PyCanvas::getPickTable(), QtDisplay::getRange(), QtRootNTuple::getRow(), PyCanvas::getSelPickTable(), QtRootNTuple::isMultiDimensional(), QtDisplay::nextView(), PyCanvas::print(), PyCanvas::PyCanvas(), QtCut::QtCut(), QtDisplay::QtDisplay(), PyNTupleController::registerNTuple(), PyNTuple::replaceColumn(), QtDisplay::reset(), QtDisplay::resize(), QtRootNTuple::rows(), PyCanvas::saveAs(), PyCanvas::saveAsImage(), PyDataSource::saveColumnFromNumArray(), PyCanvas::saveSelectedImages(), PyCanvas::selectAllDisplays(), PyCanvas::selectDisplay(), QtDisplay::setAspectRatio(), QtDisplay::setAutoRanging(), QtDisplay::setAutoTicks(), QtDisplay::setBinWidth(), QtDisplay::setColorMap(), QtDisplay::setContourLevels(), QtCut::setCutRange(), QtCut::setEnabled(), PyCanvas::setHeight(), QtDisplay::setLabel(), QtDisplay::setLog(), QtDisplay::setNumberOfBins(), QtDisplay::setOffset(), PyCanvas::setPlotMatrix(), QtDisplay::setPointRep(), QtDisplay::setRange(), QtDisplay::setTicks(), PyNTuple::setTitle(), QtDisplay::setTitle(), QtDisplay::setTransform(), QtDisplay::setView(), PyCanvas::setWidth(), PyCanvas::setX(), PyCanvas::setY(), PyCanvas::show(), QtCut::toggleInverted(), QtDisplay::unlock(), QtDisplay::update(), and PyFitsController::writeToFile().
|
private |
|
staticprivate |
The QApplication object.
|
staticprivate |