A derived class of QApplication that instantiates the components of HippoDraw. More...
#include <QtApp.h>
Public Member Functions | |
aboutQt () | |
aboutToQuit () | |
activeModalWidget () | |
activePopupWidget () | |
activeWindow () const | |
addLibraryPath (const QString &path) | |
allWidgets () | |
applicationDirPath () | |
applicationFilePath () | |
argc () const | |
argv () const | |
beep () | |
clipboard () | |
closeAllWindows () | |
closingDown () | |
colorSpec () | |
commitData (QSessionManager &sm) | |
CanvasWindow * | currentCanvas () |
Returns a pointer to the current CanvasWindow. | |
cursorFlashTime () | |
desktop () | |
desktopSettingsAware () | |
doubleClickInterval () | |
enum {DefaultCodec, UnicodeUTF8} | |
enum {NormalColor=0, CustomColor=1, ManyColor=2} | |
enum {Tty, GuiClient, GuiServer} | |
eventLoop () | |
exec () | |
exit (int retcode=0) | |
flush () | |
flushX () | |
focusWidget () const | |
font (const QWidget *w=0) | |
fontMetrics () | |
globalStrut () | |
guiThreadAwake () | |
hasGlobalMouseTracking () | |
hasPendingEvents () | |
horizontalAlignment (int align) | |
installTranslator (QTranslator *mf) | |
isEffectEnabled (Qt::UIEffect effect) | |
isSessionRestored () const | |
lastWindowClosed () | |
libraryPaths () | |
lock () | |
locked () | |
macEventFilter (EventHandlerCallRef, EventRef) | |
mainWidget () const | |
notify (QObject *receiver, QEvent *e) | |
overrideCursor () | |
palette (const QWidget *w=0) | |
polish (QWidget *w) | |
postEvent (QObject *receiver, QEvent *event) | |
processEvents (int maxtime) | |
processEvents () | |
Q_ASSERT (bool test) | |
Q_CHECK_PTR (void *p) | |
qAddPostRoutine (QtCleanUpFunction p) | |
qDebug (const char *msg,...) | |
qFatal (const char *msg,...) | |
qInstallMsgHandler (QtMsgHandler h) | |
qSysInfo (int *wordSize, bool *bigEndian) | |
qSystemWarning (const char *msg, int code) | |
QtApp (int argc, char **argv, bool gui) | |
A Constructor that enables the GUI optionally. | |
QtApp (int argc, char **argv) | |
A Constructor that always enables the GUI. | |
quit () | |
qVersion () | |
qWarning (const char *msg,...) | |
qwsDecoration () | |
qwsEventFilter (QWSEvent *) | |
qwsSetCustomColors (QRgb *colorTable, int start, int numColors) | |
qwsSetDecoration (QWSDecoration *d) | |
removeLibraryPath (const QString &path) | |
removePostedEvents (QObject *receiver) | |
removeTranslator (QTranslator *mf) | |
restoreOverrideCursor () | |
reverseLayout () | |
saveState (QSessionManager &sm) | |
sendEvent (QObject *receiver, QEvent *event) | |
sendPostedEvents () | |
sendPostedEvents (QObject *receiver, int event_type) | |
sessionId () const | |
sessionKey () const | |
setColorSpec (int spec) | |
setCursorFlashTime (int msecs) | |
setDesktopSettingsAware (bool on) | |
setDoubleClickInterval (int ms) | |
setEffectEnabled (Qt::UIEffect effect, bool enable=TRUE) | |
void | setFirstWindow () |
Sets up the first application main window. | |
setFont (const QFont &font, bool informWidgets=FALSE, const char *className=0) | |
setGlobalMouseTracking (bool enable) | |
setGlobalStrut (const QSize &strut) | |
setLibraryPaths (const QStringList &paths) | |
setMainWidget (QWidget *mainWidget) | |
setOverrideCursor (const QCursor &cursor, bool replace=FALSE) | |
setPalette (const QPalette &palette, bool informWidgets=FALSE, const char *className=0) | |
setReverseLayout (bool b) | |
setStartDragDistance (int l) | |
setStartDragTime (int ms) | |
setStyle (const QString &style) | |
setStyle (QStyle *style) | |
setWheelScrollLines (int n) | |
startDragDistance () | |
startDragTime () | |
startingUp () | |
style () | |
syncX () | |
topLevelWidgets () | |
translate (const char *context, const char *sourceText, const char *comment=0, Encoding encoding=DefaultCodec) const | |
tryLock () | |
type () const | |
unlock (bool wakeUpGui=TRUE) | |
wakeUpGuiThread () | |
wheelScrollLines () | |
widgetAt (const QPoint &pos, bool child=FALSE) | |
widgetAt (int x, int y, bool child=FALSE) | |
winEventFilter (MSG *) | |
winFocus (QWidget *widget, bool gotFocus) | |
x11EventFilter (XEvent *) | |
x11ProcessEvent (XEvent *event) | |
~QtApp () | |
The destructor. | |
Static Public Member Functions | |
static QtApp * | instance () |
Returns the application instance. | |
Private Member Functions | |
void | init () |
Method called by constructors to initialize the application. | |
bool | tryOpenFile (const std::string &name) |
The Apple event handler. | |
Static Private Attributes | |
static QtApp * | s_instance = 0 |
The instance of the application. |
A derived class of QApplication that instantiates the components of HippoDraw.
The class can be instantiates either from a main program, or from a script such as Python.
Definition at line 39 of file QtApp.h.
QtApp | ( | int | argc, | |
char ** | argv | |||
) |
A Constructor that always enables the GUI.
Definition at line 37 of file QtApp.cxx.
References QtApp::init().
QtApp | ( | int | argc, | |
char ** | argv, | |||
bool | gui | |||
) |
A Constructor that enables the GUI optionally.
Definition at line 43 of file QtApp.cxx.
References QtApp::init().
~QtApp | ( | ) |
The destructor.
Definition at line 85 of file QtApp.cxx.
References QApplication::closeAllWindows(), QtApp::instance(), QDir::rmdir(), and QtApp::s_instance.
CanvasWindow * currentCanvas | ( | ) |
Returns a pointer to the current CanvasWindow.
Definition at line 247 of file QtApp.cxx.
References QtApp::instance().
Referenced by PyApp::currentCanvas(), and PyApp::PyApp().
void init | ( | ) | [private] |
Method called by constructors to initialize the application.
Definition at line 52 of file QtApp.cxx.
References QDir::mkdir(), CanvasWindow::resetFontSize(), and QtApp::s_instance.
Referenced by QtApp::QtApp().
QtApp * instance | ( | ) | [static] |
Returns the application instance.
Definition at line 109 of file QtApp.cxx.
References QtApp::s_instance.
Referenced by QtApp::currentCanvas(), QtApp::setFirstWindow(), and QtApp::~QtApp().
void setFirstWindow | ( | ) |
Sets up the first application main window.
When the application is started, at least one main window must appear in order to control the application. If no arguments were given to the command line start-up, then a CanvasWindow with an empty CanvasView is created. If arguments were given, then they are assumed to be a filename. If the filename suffix matches the document suffix as returned by CanvasWindow::docSuffix, then an existing document is opened. If the filename suffix matches the text NTuple suffix as returned by CanvasWindow::dataSuffix, then an empty canvas window is opened and the NTuple file imported.
Definition at line 169 of file QtApp.cxx.
References QApplication::argc(), QApplication::argv(), QtApp::instance(), QString::latin1(), WindowController::setFirstWindow(), and QtApp::tryOpenFile().
bool tryOpenFile | ( | const std::string & | name | ) | [private] |
The Apple event handler.
The Apple event handling implementaton for Qt 3 taken from http://doc.trolltech.com/qq/qq12-mac-events.html
true
, otherwise returns false
. Definition at line 204 of file QtApp.cxx.
References QtFileDialog::isDocSuffix(), QtFileDialog::isFitsSuffix(), QtFileDialog::isRootSuffix(), QtFileDialog::isTextSuffix(), QtFileDialog::openFitsTuple(), QtFileDialog::openRootTuple(), and QtFileDialog::openTextTuple().
Referenced by QtApp::setFirstWindow().
QtApp * s_instance = 0 [static, private] |
The instance of the application.
Definition at line 44 of file QtApp.h.
Referenced by QtApp::init(), QtApp::instance(), and QtApp::~QtApp().