QApplication

Section: Misc. Reference Manual Pages (3qt)
Updated: 2 February 2007
Index Return to Main Contents
 

NAME

QApplication - Manages the GUI application's control flow and main settings  

SYNOPSIS

#include <qapplication.h>

Inherits QObject.

 

Public Members


QApplication ( int & argc, char ** argv )

QApplication ( int & argc, char ** argv, bool GUIenabled )

enum Type { Tty, GuiClient, GuiServer }

QApplication ( int & argc, char ** argv, Type type )

QApplication ( Display * dpy, HANDLE visual = 0, HANDLE colormap = 0 )

QApplication ( Display * dpy, int argc, char ** argv, HANDLE visual = 0, HANDLE colormap = 0 )

virtual ~QApplication ()

int argc () const

char ** argv () const

Type type () const

enum ColorSpec { NormalColor = 0, CustomColor = 1, ManyColor = 2 }

QWidget * mainWidget () const

virtual void setMainWidget ( QWidget * mainWidget )

virtual void polish ( QWidget * w )

QWidget * focusWidget () const

QWidget * activeWindow () const

int exec ()

void processEvents ()

void processEvents ( int maxtime )

void processOneEvent () (obsolete)

bool hasPendingEvents ()

int enter_loop () (obsolete)

void exit_loop () (obsolete)

int loopLevel () const (obsolete)

virtual bool notify ( QObject * receiver, QEvent * e )

void setDefaultCodec ( QTextCodec * codec ) (obsolete)

QTextCodec * defaultCodec () const (obsolete)

void installTranslator ( QTranslator * mf )

void removeTranslator ( QTranslator * mf )

enum Encoding { DefaultCodec, UnicodeUTF8 }

QString translate ( const char * context, const char * sourceText, const char * comment = 0, Encoding encoding = DefaultCodec ) const

QString applicationDirPath ()

QString applicationFilePath ()

virtual bool macEventFilter ( EventHandlerCallRef, EventRef )

virtual bool winEventFilter ( MSG * )

virtual bool x11EventFilter ( XEvent * )

int x11ProcessEvent ( XEvent * event )

virtual bool qwsEventFilter ( QWSEvent * )

void qwsSetCustomColors ( QRgb * colorTable, int start, int numColors )

void winFocus ( QWidget * widget, bool gotFocus )

bool isSessionRestored () const

QString sessionId () const

QString sessionKey () const

virtual void commitData ( QSessionManager & sm )

virtual void saveState ( QSessionManager & sm )

void wakeUpGuiThread ()

void lock ()

void unlock ( bool wakeUpGui = TRUE )

bool locked ()

bool tryLock ()
 

Public Slots


void quit ()

void closeAllWindows ()

void aboutQt ()
 

Signals


void lastWindowClosed ()

void aboutToQuit ()

void guiThreadAwake ()
 

Static Public Members


QStyle & style ()

void setStyle ( QStyle * style )

QStyle * setStyle ( const QString & style )

int colorSpec ()

void setColorSpec ( int spec )

QCursor * overrideCursor ()

void setOverrideCursor ( const QCursor & cursor, bool replace = FALSE )

void restoreOverrideCursor ()

bool hasGlobalMouseTracking ()

void setGlobalMouseTracking ( bool enable )

QPalette palette ( const QWidget * w = 0 )

void setPalette ( const QPalette & palette, bool informWidgets = FALSE, const char * className = 0 )

QFont font ( const QWidget * w = 0 )

void setFont ( const QFont & font, bool informWidgets = FALSE, const char * className = 0 )

QFontMetrics fontMetrics ()

QWidgetList * allWidgets ()

QWidgetList * topLevelWidgets ()

QDesktopWidget * desktop ()

QWidget * activePopupWidget ()

QWidget * activeModalWidget ()

QClipboard * clipboard ()

QWidget * widgetAt ( int x, int y, bool child = FALSE )

QWidget * widgetAt ( const QPoint & pos, bool child = FALSE )

QEventLoop * eventLoop ()

void exit ( int retcode = 0 )

bool sendEvent ( QObject * receiver, QEvent * event )

void postEvent ( QObject * receiver, QEvent * event )

void sendPostedEvents ( QObject * receiver, int event_type )

void sendPostedEvents ()

void removePostedEvents ( QObject * receiver )

bool startingUp ()

bool closingDown ()

void flushX ()

void flush ()

void syncX ()

void beep ()

void setWinStyleHighlightColor ( const QColor & c ) (obsolete)

const QColor & winStyleHighlightColor () (obsolete)

void setDesktopSettingsAware ( bool on )

bool desktopSettingsAware ()

void setCursorFlashTime ( int msecs )

int cursorFlashTime ()

void setDoubleClickInterval ( int ms )

int doubleClickInterval ()

void setWheelScrollLines ( int n )

int wheelScrollLines ()

void setGlobalStrut ( const QSize & strut )

QSize globalStrut ()

void setLibraryPaths ( const QStringList & paths )

QStringList libraryPaths ()

void addLibraryPath ( const QString & path )

void removeLibraryPath ( const QString & path )

void setStartDragTime ( int ms )

int startDragTime ()

void setStartDragDistance ( int l )

int startDragDistance ()

void setReverseLayout ( bool b )

bool reverseLayout ()

int horizontalAlignment ( int align )

bool isEffectEnabled ( Qt::UIEffect effect )

void setEffectEnabled ( Qt::UIEffect effect, bool enable = TRUE )

QWSDecoration & qwsDecoration ()

void qwsSetDecoration ( QWSDecoration * d )
 

RELATED FUNCTION DOCUMENTATION


void qAddPostRoutine ( QtCleanUpFunction p )

const char * qVersion ()

bool qSysInfo ( int * wordSize, bool * bigEndian )

void qDebug ( const char * msg, ... )

void qWarning ( const char * msg, ... )

void qFatal ( const char * msg, ... )

void qSystemWarning