#include <PyApp.h>
Collaboration diagram for PyApp:
Definition at line 32 of file PyApp.h.
Public Member Functions | |
PyCanvas * | currentCanvas () |
Returns a pointer to the current CanvasWindow. | |
int | exec () |
Starts the QApplication event loop. | |
bool | hasTerminated () const |
Returns true if the application as terminated, otherwise returns false . | |
void | openDocument (const std::string &filename) |
Opens a new document from file filename. | |
PyApp (char *script) | |
A constructor taking script name as argument. | |
PyApp (int) | |
A constructor that created QtApp without threading. | |
PyApp () | |
The default Constructor. | |
void | quit () |
Terminates the application. | |
void | quitOnLastWindowClose (bool yes) |
If yes is true , allows the application to quit when the last CanvasWindow is closed by the user. | |
~PyApp () | |
The destructor. | |
Static Public Member Functions | |
static bool | hasPendingEvents () |
Returns true if the application object has pending events. | |
static PyApp * | instance () |
Returns the application instance. | |
static void | lock () |
Obtains a lock on the application's mutex. | |
static bool | locked () |
returns true if the Application mutex is locked by different thread. | |
static void | unlock () |
Releases the lock on the application's mutex. | |
Private Attributes | |
HdThread * | m_thread |
The thread in which to run the GUI. | |
Static Private Attributes | |
static QtApp * | s_app = 0 |
The QApplication object. | |
static PyApp * | s_instance = 0 |
The instance of the application. |
PyApp | ( | ) |
The default Constructor.
Definition at line 153 of file PyApp.cxx.
References QtApp::currentCanvas(), QApplication::hasPendingEvents(), QtApp::instance(), PyApp::m_thread, run(), PyApp::s_app, PyApp::s_instance, QThread::start(), QApplication::startingUp(), and QThread::wait().
Referenced by PyApp::instance().
PyApp | ( | int | ) |
A constructor that created QtApp without threading.
Definition at line 230 of file PyApp.cxx.
References PyApp::s_app.
PyApp | ( | char * | script | ) |
A constructor taking script name as argument.
Definition at line 210 of file PyApp.cxx.
References QtApp::instance(), run(), PyApp::s_app, and QApplication::startingUp().
~PyApp | ( | ) |
The destructor.
Kills the application object running in the thread.
Definition at line 243 of file PyApp.cxx.
References PyApp::s_instance.
PyCanvas * currentCanvas | ( | ) |
Returns a pointer to the current CanvasWindow.
Definition at line 287 of file PyApp.cxx.
References QtApp::currentCanvas(), PyApp::lock(), PyApp::m_thread, PyApp::s_app, and PyApp::unlock().
Referenced by hippodraw::Python::export_HDApp().
int exec | ( | ) |
Starts the QApplication event loop.
Definition at line 258 of file PyApp.cxx.
References QApplication::exec(), and PyApp::s_app.
Referenced by hippodraw::Python::export_HDApp().
bool hasPendingEvents | ( | ) | [static] |
Returns true
if the application object has pending events.
Definition at line 370 of file PyApp.cxx.
References QApplication::closingDown(), and PyApp::s_app.
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().
Referenced by hippodraw::Python::export_HDApp().
PyApp * instance | ( | ) | [static] |
Returns the application instance.
Definition at line 249 of file PyApp.cxx.
References PyApp::PyApp(), and PyApp::s_instance.
Referenced by hippodraw::Python::export_HDApp().
void lock | ( | ) | [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(), QApplication::lock(), and PyApp::s_app.
Referenced by PyNTuple::addColumn(), PyDataRep::addCut(), QtDisplay::addDataRep(), QtDisplay::addDataRepStacked(), QtDisplay::addFunction(), PyNTuple::addRow(), PyDataSource::addRow(), QtCut::addTarget(), QtCut::addTargets(), PyCanvas::addText(), PyCanvas::addTextAt(), PyCanvas::addTextAtAbs(), PyCanvas::addTextRep(), PyFunctionRep::addTo(), QtDisplay::addValues(), PyNTuple::append(), PyDataSource::append(), QtDisplay::applyCut(), PyDataRep::applyCut(), QtDisplay::applyCuts(), PyDataRep::applyCuts(), PyNTuple::clear(), PyCanvas::close(), PyFunctionRep::covarianceMatrix(), QtDisplay::createDataArray(), QtDisplay::createDisplay(), QtCut::createFits(), QtRootController::createNTuple(), QtDisplay::createNTuple(), QtCut::createNTuple(), PyNTupleController::createNTuple(), PyDataRep::createNTuple(), PyDataRep::createNTupleUnderRegion(), QtCut::createTnt(), PyApp::currentCanvas(), QtCut::cutRange(), PyFunctionRep::degreesOfFreedom(), QtDisplay::deleteView(), QtRootNTuple::expandIfNeeded(), hippodraw::Python::export_HDApp(), PyFunctionRep::fitFunction(), PyDataRep::getBinWidth(), QtRootNTuple::getColumn(), QtRootNTuple::getColumnShape(), QtDisplay::getDataRep(), QtDisplay::getDataReps(), PyCanvas::getDisplay(), PyCanvas::getDisplays(), QtDisplay::getLabel(), PyDataRep::getMean(), QtRootController::getNTupleNames(), PyDataRep::getNTupleWithCuts(), PyCanvas::getPickTable(), QtDisplay::getRange(), PyDataRep::getRMS(), QtRootNTuple::getRow(), PyCanvas::getSelPickTable(), QtRootNTuple::isMultiDimensional(), QtDisplay::nextView(), PyDataRep::normalizeTo(), PyFunctionRep::objectiveValue(), PyApp::openDocument(), PyFunctionRep::parameters(), PyFunctionRep::parmNames(), PyFunctionRep::principleErrors(), PyCanvas::print(), PyCanvas::PyCanvas(), PyFunctionRep::PyFunctionRep(), QtCut::QtCut(), QtDisplay::QtDisplay(), PyNTupleController::registerNTuple(), PyNTuple::replaceColumn(), QtDisplay::reset(), QtDisplay::resize(), QtRootNTuple::rows(), PyCanvas::saveAs(), PyDataSource::saveColumnFromNumArray(), PyCanvas::saveSelectedImages(), PyCanvas::selectAllDisplays(), PyCanvas::selectDisplay(), PyDataRep::set(), QtDisplay::setAspectRatio(), QtDisplay::setAutoRanging(), QtDisplay::setAutoTicks(), PyDataRep::setAxisBinding(), PyDataRep::setAxisBindings(), QtDisplay::setBinWidth(), PyDataRep::setBinWidth(), PyDataRep::setColor(), QtDisplay::setColorMap(), QtDisplay::setContourLevels(), QtCut::setCutRange(), PyDataRep::setCutRange(), QtCut::setEnabled(), PyDataRep::setErrorDisplay(), PyFunctionRep::setFixedFlags(), PyCanvas::setHeight(), QtDisplay::setLabel(), PyDataRep::setLineStyle(), QtDisplay::setLog(), QtDisplay::setNumberOfBins(), QtDisplay::setOffset(), PyFunctionRep::setParameters(), PyCanvas::setPlotMatrix(), QtDisplay::setPointRep(), PyDataRep::setPointRep(), QtDisplay::setRange(), PyDataRep::setSize(), PyDataRep::setSymbol(), QtDisplay::setTicks(), QtDisplay::setTitle(), PyNTuple::setTitle(), QtDisplay::setTransform(), QtDisplay::setView(), PyDataRep::setWeight(), PyCanvas::setWidth(), PyCanvas::setX(), PyCanvas::setY(), PyCanvas::show(), QtCut::toggleInverted(), QtDisplay::update(), and PyFitsController::writeToFile().
bool locked | ( | ) | [static] |
returns true
if the Application mutex is locked by different thread.
Definition at line 344 of file PyApp.cxx.
References QApplication::closingDown(), QApplication::locked(), and PyApp::s_app.
void openDocument | ( | const std::string & | filename | ) |
Opens a new document from file filename.
Definition at line 319 of file PyApp.cxx.
References PyApp::lock(), and PyApp::unlock().
Referenced by hippodraw::Python::export_HDApp().
void quit | ( | ) |
Terminates the application.
Definition at line 280 of file PyApp.cxx.
References PyApp::s_app.
Referenced by hippodraw::Python::export_HDApp().
void quitOnLastWindowClose | ( | bool | yes | ) |
If yes is true
, allows the application to quit when the last CanvasWindow is closed by the user.
Definition at line 383 of file PyApp.cxx.
References WindowController::instance().
Referenced by hippodraw::Python::export_HDApp().
void unlock | ( | ) | [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(), PyApp::s_app, and QApplication::unlock().
Referenced by PyNTuple::addColumn(), PyDataRep::addCut(), QtDisplay::addDataRep(), QtDisplay::addDataRepStacked(), QtDisplay::addFunction(), PyNTuple::addRow(), PyDataSource::addRow(), QtCut::addTarget(), QtCut::addTargets(), PyCanvas::addText(), PyCanvas::addTextAt(), PyCanvas::addTextAtAbs(), PyCanvas::addTextRep(), PyFunctionRep::addTo(), QtDisplay::addValues(), PyNTuple::append(), PyDataSource::append(), QtDisplay::applyCut(), PyDataRep::applyCut(), QtDisplay::applyCuts(), PyDataRep::applyCuts(), PyNTuple::clear(), PyCanvas::close(), PyFunctionRep::covarianceMatrix(), QtDisplay::createDataArray(), QtDisplay::createDisplay(), QtCut::createFits(), QtRootController::createNTuple(), QtDisplay::createNTuple(), QtCut::createNTuple(), PyNTupleController::createNTuple(), PyDataRep::createNTuple(), PyDataRep::createNTupleUnderRegion(), QtCut::createTnt(), PyApp::currentCanvas(), QtCut::cutRange(), PyFunctionRep::degreesOfFreedom(), QtDisplay::deleteView(), QtRootNTuple::expandIfNeeded(), hippodraw::Python::export_HDApp(), PyFunctionRep::fitFunction(), PyDataRep::getBinWidth(), QtRootNTuple::getColumn(), QtRootNTuple::getColumnShape(), PyDataRep::getColumnWithCuts(), QtDisplay::getDataRep(), QtDisplay::getDataReps(), PyCanvas::getDisplay(), PyCanvas::getDisplays(), QtDisplay::getLabel(), PyDataRep::getMean(), QtRootController::getNTupleNames(), PyDataRep::getNTupleWithCuts(), PyCanvas::getPickTable(), QtDisplay::getRange(), PyDataRep::getRMS(), QtRootNTuple::getRow(), PyCanvas::getSelPickTable(), QtRootNTuple::isMultiDimensional(), QtDisplay::nextView(), PyDataRep::normalizeTo(), PyFunctionRep::objectiveValue(), PyApp::openDocument(), PyFunctionRep::parameters(), PyFunctionRep::parmNames(), PyFunctionRep::principleErrors(), PyCanvas::print(), PyCanvas::PyCanvas(), PyFunctionRep::PyFunctionRep(), 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(), PyDataRep::set(), QtDisplay::setAspectRatio(), QtDisplay::setAutoRanging(), QtDisplay::setAutoTicks(), PyDataRep::setAxisBinding(), PyDataRep::setAxisBindings(), QtDisplay::setBinWidth(), PyDataRep::setBinWidth(), PyDataRep::setColor(), QtDisplay::setColorMap(), QtDisplay::setContourLevels(), QtCut::setCutRange(), PyDataRep::setCutRange(), QtCut::setEnabled(), PyDataRep::setErrorDisplay(), PyFunctionRep::setFixedFlags(), PyCanvas::setHeight(), QtDisplay::setLabel(), PyDataRep::setLineStyle(), QtDisplay::setLog(), QtDisplay::setNumberOfBins(), QtDisplay::setOffset(), PyFunctionRep::setParameters(), PyCanvas::setPlotMatrix(), QtDisplay::setPointRep(), PyDataRep::setPointRep(), QtDisplay::setRange(), PyDataRep::setSize(), PyDataRep::setSymbol(), QtDisplay::setTicks(), QtDisplay::setTitle(), PyNTuple::setTitle(), QtDisplay::setTransform(), QtDisplay::setView(), PyDataRep::setWeight(), PyCanvas::setWidth(), PyCanvas::setX(), PyCanvas::setY(), PyCanvas::show(), QtCut::toggleInverted(), QtDisplay::unlock(), QtDisplay::update(), and PyFitsController::writeToFile().
The thread in which to run the GUI.
Definition at line 43 of file PyApp.h.
Referenced by PyApp::currentCanvas(), and PyApp::PyApp().
The QApplication object.
Definition at line 40 of file PyApp.h.
Referenced by PyApp::currentCanvas(), PyApp::exec(), PyApp::hasPendingEvents(), PyApp::lock(), PyApp::locked(), PyApp::PyApp(), PyApp::quit(), and PyApp::unlock().
PyApp * s_instance = 0 [static, private] |
The instance of the application.
Definition at line 37 of file PyApp.h.
Referenced by PyApp::instance(), PyApp::PyApp(), and PyApp::~PyApp().