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.
|
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 () |
| The default Constructor.
|
| PyApp (int) |
| A constructor that created QtApp without threading.
|
| PyApp (char *script) |
| A constructor taking script name as argument.
|
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.
|
Detailed Description
Constructor & Destructor Documentation
The default Constructor.
- Requests:
- There's a better way to wait for application to be ready. Saw it in Qt related documentation.
Definition at line 153 of file PyApp.cxx.
References run().
A constructor that created QtApp without threading.
Definition at line 230 of file PyApp.cxx.
A constructor taking script name as argument.
Definition at line 210 of file PyApp.cxx.
References run().
The destructor.
Kills the application object running in the thread.
Definition at line 243 of file PyApp.cxx.
Member Function Documentation
bool hasPendingEvents |
( |
| ) |
|
|
static |
bool hasTerminated |
( |
| ) |
const |
Returns the application instance.
Definition at line 249 of file PyApp.cxx.
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().
void openDocument |
( |
const std::string & |
filename | ) |
|
Opens a new document from file filename.
Definition at line 319 of file PyApp.cxx.
Terminates the application.
Definition at line 280 of file PyApp.cxx.
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.
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(), PyNTuple::addRow(), PyDataSource::addRow(), PyCanvas::addText(), PyCanvas::addTextAt(), PyCanvas::addTextAtAbs(), PyCanvas::addTextRep(), PyNTuple::append(), PyDataSource::append(), PyNTuple::clear(), PyCanvas::close(), QtRootController::createNTuple(), PyNTupleController::createNTuple(), QtRootNTuple::expandIfNeeded(), QtRootNTuple::getColumn(), QtRootNTuple::getColumnShape(), PyCanvas::getDisplay(), PyCanvas::getDisplays(), QtRootController::getNTupleNames(), PyCanvas::getPickTable(), QtRootNTuple::getRow(), PyCanvas::getSelPickTable(), QtRootNTuple::isMultiDimensional(), PyCanvas::print(), PyCanvas::PyCanvas(), PyNTupleController::registerNTuple(), PyNTuple::replaceColumn(), QtRootNTuple::rows(), PyCanvas::saveAs(), PyCanvas::saveAsImage(), PyDataSource::saveColumnFromNumArray(), PyCanvas::saveSelectedImages(), PyCanvas::selectAllDisplays(), PyCanvas::selectDisplay(), PyCanvas::setHeight(), PyCanvas::setPlotMatrix(), PyNTuple::setTitle(), PyCanvas::setWidth(), PyCanvas::setX(), PyCanvas::setY(), PyCanvas::show(), and PyFitsController::writeToFile().
Member Data Documentation
The thread in which to run the GUI.
Definition at line 43 of file PyApp.h.
The instance of the application.
Definition at line 37 of file PyApp.h.
The documentation for this class was generated from the following files: