⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qapplication.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
📖 第 1 页 / 共 4 页
字号:
.TH QApplication 3qt "9 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQApplication \- Manages the GUI application's control flow and main settings.SH SYNOPSIS.br.PP\fC#include <qapplication.h>\fR.PPInherits QObject..PPInherited by QXtApplication..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQApplication\fR ( int & " "argc" ", char ** argv )".br.ti -1c.BI "virtual \fB~QApplication\fR ()".br.ti -1c.BI "int \fBargc\fR () const".br.ti -1c.BI "char** \fBargv\fR () const".br.ti -1c.BI "enum \fBColorSpec\fR { NormalColor=0, CustomColor=1, ManyColor=2 }".br.ti -1c.BI "QWidget* \fBmainWidget\fR () const".br.ti -1c.BI "virtual void \fBsetMainWidget\fR ( QWidget * )".br.ti -1c.BI "virtual void \fBpolish\fR ( QWidget * )".br.ti -1c.BI "QWidget* \fBfocusWidget\fR () const".br.ti -1c.BI "QWidget* \fBactiveWindow\fR () const".br.ti -1c.BI "int \fBexec\fR ()".br.ti -1c.BI "void \fBprocessEvents\fR ()".br.ti -1c.BI "void \fBprocessEvents\fR ( int maxtime )".br.ti -1c.BI "void \fBprocessOneEvent\fR ()".br.ti -1c.BI "int \fBenter_loop\fR ()".br.ti -1c.BI "void \fBexit_loop\fR ()".br.ti -1c.BI "virtual bool \fBnotify\fR ( QObject *, QEvent * )".br.ti -1c.BI "void \fBsetDefaultCodec\fR ( QTextCodec * )".br.ti -1c.BI "QTextCodec* \fBdefaultCodec\fR () const".br.ti -1c.BI "void \fBinstallTranslator\fR ( QTranslator * )".br.ti -1c.BI "void \fBremoveTranslator\fR ( QTranslator * )".br.ti -1c.BI "QString \fBtranslate\fR ( const char * " "scope" ", const char * key ) const".br.ti -1c.BI "bool \fBisSessionRestored\fR () const".br.ti -1c.BI "QString \fBsessionId\fR () const".br.ti -1c.BI "virtual void \fBcommitData\fR ( QSessionManager & sm )".br.ti -1c.BI "virtual void \fBsaveState\fR ( QSessionManager & sm )".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "void \fBquit\fR ()".br.ti -1c.BI "void \fBcloseAllWindows\fR ()".br.in -1c.SS "Signals".in +1c.ti -1c.BI "void \fBlastWindowClosed\fR ()".br.ti -1c.BI "void \fBaboutToQuit\fR ()".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "QStyle& \fBstyle\fR ()".br.ti -1c.BI "void \fBsetStyle\fR ( QStyle * )".br.ti -1c.BI "int \fBcolorSpec\fR ()".br.ti -1c.BI "void \fBsetColorSpec\fR ( int )".br.ti -1c.BI "QCursor* \fBoverrideCursor\fR ()".br.ti -1c.BI "void \fBsetOverrideCursor\fR ( const QCursor &, bool " "replace" "=FALSE )".br.ti -1c.BI "void \fBrestoreOverrideCursor\fR ()".br.ti -1c.BI "bool \fBhasGlobalMouseTracking\fR ()".br.ti -1c.BI "void \fBsetGlobalMouseTracking\fR ( bool enable )".br.ti -1c.BI "QPalette \fBpalette\fR ( const QWidget * = 0 )".br.ti -1c.BI "void \fBsetPalette\fR ( const QPalette &, bool " "updateAllWidgets" "=FALSE, const char * " "className" " = 0 )".br.ti -1c.BI "QFont \fBfont\fR ( const QWidget * = 0 )".br.ti -1c.BI "void \fBsetFont\fR ( const QFont &, bool " "updateAllWidgets" "=FALSE, const char * " "className" " = 0 )".br.ti -1c.BI "QFontMetrics \fBfontMetrics\fR ()".br.ti -1c.BI "QWidgetList* \fBallWidgets\fR ()".br.ti -1c.BI "QWidgetList* \fBtopLevelWidgets\fR ()".br.ti -1c.BI "QWidget* \fBdesktop\fR ()".br.ti -1c.BI "QWidget* \fBactivePopupWidget\fR ()".br.ti -1c.BI "QWidget* \fBactiveModalWidget\fR ()".br.ti -1c.BI "QClipboard* \fBclipboard\fR ()".br.ti -1c.BI "QWidget* \fBwidgetAt\fR ( int " "x" ", int " "y" ", bool " "child" "=FALSE )".br.ti -1c.BI "QWidget* \fBwidgetAt\fR ( const QPoint &, bool " "child" "=FALSE )".br.ti -1c.BI "void \fBexit\fR ( int " "retcode" "=0 )".br.ti -1c.BI "bool \fBsendEvent\fR ( QObject * " "receiver" ", QEvent * event )".br.ti -1c.BI "void \fBpostEvent\fR ( QObject * " "receiver" ", QEvent * event )".br.ti -1c.BI "void \fBsendPostedEvents\fR ( QObject * " "receiver" ", int event_type )".br.ti -1c.BI "void \fBsendPostedEvents\fR ()".br.ti -1c.BI "void \fBremovePostedEvents\fR ( QObject * receiver )".br.ti -1c.BI "bool \fBstartingUp\fR ()".br.ti -1c.BI "bool \fBclosingDown\fR ()".br.ti -1c.BI "void \fBflushX\fR ()".br.ti -1c.BI "void \fBsyncX\fR ()".br.ti -1c.BI "void \fBbeep\fR ()".br.ti -1c.BI "void \fBsetWinStyleHighlightColor\fR ( const QColor & )".br.ti -1c.BI "const QColor& \fBwinStyleHighlightColor\fR ()".br.ti -1c.BI "void \fBsetDesktopSettingsAware\fR ( bool )".br.ti -1c.BI "bool \fBdesktopSettingsAware\fR ()".br.ti -1c.BI "void \fBsetCursorFlashTime\fR ( int )".br.ti -1c.BI "int \fBcursorFlashTime\fR ()".br.ti -1c.BI "void \fBsetDoubleClickInterval\fR ( int )".br.ti -1c.BI "int \fBdoubleClickInterval\fR ()".br.in -1c.SH RELATED FUNCTION DOCUMENTATION(Note that these are not member functions.).in +1c.ti -1c.BI "void \fBCHECK_PTR\fR (void * " "p" ")".br.ti -1c.BI "Q_EXPORT void \fBqWarning\fR (const char * " "msg" ", ...)".br.ti -1c.BI "void \fBASSERT\fR (bool " "test" ")".br.ti -1c.BI "Q_EXPORT bool \fBqSysInfo\fR (int * " "wordSize" ", bool * " "bigEndian" ")".br.ti -1c.BI "Q_EXPORT msg_handler \fBqInstallMsgHandler\fR (msg_handler " "h" ")".br.ti -1c.BI "Q_EXPORT void \fBqFatal\fR (const char * " "msg" ", ...)".br.ti -1c.BI "Q_EXPORT const char * \fBqVersion\fR ()".br.ti -1c.BI "Q_EXPORT void \fBqDebug\fR (const char * " "msg" ", ...)".br.ti -1c.BI "void \fBqAddPostRoutine\fR (Q_CleanUpFunction " "p" ")".br.in -1c.SH DESCRIPTIONThe QApplication class manages the GUI application's control flow and main settings..PPIt contains the main event loop, where all events from the window system and other sources are processed and dispatched. It also handles the application initialization and finalization, and provides session management. Finally, it handles most system-wide and application-wide settings..PPFor any GUI application that uses Qt, there is precisely one QApplication object, no matter whether the application has 0, 1, 2 or even more windows at the moment..PPThis object (you can access is using the global variable \fIqApp)\fR does a great many things, most importantly: .IP.TPIt initializes the application to the user's desktop settings like palette(), font() or the doubleClickInterval(). It keeps track of these properties in case the user changes the desktop globally in some kind of control panel..IP.TPIt performs event handling, meaning that it receives events from the underlying window system and sends them to the destination widgets. By using sendEvent() and postEvent() you can send your own events to widgets..IP.TPIt parses common command line arguments and sets its internal state accordintly. See the constructor documentation below for more details about this..IP.TPIt defines the application's look and feel, which is encapsulate in a QStyle object. This can be changed during runtime with setStyle()..IP.TPIt specifies how the application is to allocate colors. See setColorSpec() for details..IP.TPIt specifies the default text encoding (see setDefaultCodec() ) and provides localization of strings that are visible to the user via translate()..IP.TPIt provides some magic objects like the desktop() and the clipboard()..IP.TPIt knows about the application's windows, and lets you ask which widget is at a certain position using widgetAt(), lets you closeAllWindows(), gives you a list of topLevelWidgets(), etc..IP.TPIt manages the application's mouse cursor handling, see setOverrideCursor() and setGlobalMouseTracking()..IP.TPOn the X window system, it provides functions to flush and sync the communication stream, see flushX() and syncX()..IP.TPIt provides support to implement sophisticated session management. This makes it possible for applications to terminate gracefully when the user logs out, to cancel a shutdown process if termination isn't possible and even to preserve the entire application state for a future session. See isSessionRestored(), sessionId() and commitData() and saveState() for details..IP.PPThe Application walktrough example contains a typical complete main() that does the usual things with QApplication..PPSince the QApplication object does so much initialization, it is absolutely necessary to create it before any other objects related to the user interface are created..PPSince it also deals with common command line arguments, it is usually a good idea to create it \fIbefore\fR any interpretation or modification of \fCargv\fR is done in the application itself. (Note also that for X11, setMainWidget() may change the main widget according to the \fI-geometry\fR option. To preserve this functionality, you must set your defaults before setMainWidget() and any overrides after.).PP\fBGroups of functions:\fR.TPSystem settings: desktopSettingsAware(), setDesktopSettingsAware(), cursorFlashTime(), setCursorFlashTime(), doubleClickInterval(), setDoubleClickInterval(), palette(), setPalette(), font(), setFont(), fontMetrics()..IP.TPEvent handling: exec(), processEvents(), processOneEvent(), enter_loop(), exit_loop(), exit(), quit(). sendEvent(), postEvent(), sendPostedEvents(), removePostedEvents(), notify(), x11EventFilter(), x11ProcessEvent(), winEventFilter()..IP.TPGUI Styles: style(), setStyle(), polish()..IP.TPColor usage: colorSpec(), setColorSpec()..IP.TPText handling: setDefaultCodec(), installTranslator(), removeTranslator() translate()..IP.TPCertain widgets: mainWidget(), setMainWidget(), allWidgets(), topLevelWidgets(), desktop(), activePopupWidget(), activeModalWidget(), clipboard(), focusWidget(), activeWindow(), widgetAt()..IP.TP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -