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

📄 qpeapplication.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/libraries/qtopia/qpeapplication.cpp:805 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QPEApplication Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font>   <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top">  <table border="0" cellpadding="0" cellspacing="0" width="137">  <tr>  <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td>  <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td>  </tr>  </table></td></tr></table><h1 align=center>QPEApplication Class Reference</h1><p>The QPEApplication class implements various system servicesthat are available to all Qtopia applications.<a href="#details">More...</a><p><tt>#include &lt;<a href="qpeapplication-h.html">qpeapplication.h</a>&gt;</tt><p><a href="qpeapplication-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#QPEApplication"><b>QPEApplication</b></a> ( int&nbsp;&amp;&nbsp;argc, char&nbsp;**&nbsp;argv, Type&nbsp;t = GuiClient )</div></li><li><div class=fn><a href="#~QPEApplication"><b>~QPEApplication</b></a> ()</div></li><li><div class=fn>enum <a href="#StylusMode-enum"><b>StylusMode</b></a> { LeftOnly, RightOnHold }</div></li><li><div class=fn>enum <a href="#InputMethodHint-enum"><b>InputMethodHint</b></a> { Normal, AlwaysOff, AlwaysOn, Number, PhoneNumber, Words, Text, Named }</div></li><li><div class=fn>enum <a href="#screenSaverHint-enum"><b>screenSaverHint</b></a> { Disable = 0, DisableLightOff = 1, DisableSuspend = 2, Enable = 100 }</div></li><li><div class=fn>void <a href="#showMainWidget"><b>showMainWidget</b></a> ( QWidget&nbsp;*&nbsp;mw, bool&nbsp;nomaximize = FALSE )</div></li><li><div class=fn>void <a href="#showMainDocumentWidget"><b>showMainDocumentWidget</b></a> ( QWidget&nbsp;*&nbsp;mw, bool&nbsp;nomaximize = FALSE )</div></li><li><div class=fn>bool <a href="#keepRunning"><b>keepRunning</b></a> () const</div></li></ul><h2>Signals</h2><ul><li><div class=fn>void <a href="#timeChanged"><b>timeChanged</b></a> ()</div></li><li><div class=fn>void <a href="#categoriesChanged"><b>categoriesChanged</b></a> ()</div></li><li><div class=fn>void <a href="#clockChanged"><b>clockChanged</b></a> ( bool&nbsp;ampm )</div></li><li><div class=fn>void <a href="#volumeChanged"><b>volumeChanged</b></a> ( bool&nbsp;muted )</div></li><li><div class=fn>void <a href="#appMessage"><b>appMessage</b></a> ( const&nbsp;QCString&nbsp;&amp;&nbsp;msg, const&nbsp;QByteArray&nbsp;&amp;&nbsp;data )</div></li><li><div class=fn>void <a href="#weekChanged"><b>weekChanged</b></a> ( bool&nbsp;startOnMonday )</div></li><li><div class=fn>void <a href="#dateFormatChanged"><b>dateFormatChanged</b></a> ( DateFormat )</div></li><li><div class=fn>void <a href="#linkChanged"><b>linkChanged</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;linkFile )</div></li></ul><h2>Static Public Members</h2><ul><li><div class=fn>QString <a href="#qpeDir"><b>qpeDir</b></a> ()</div></li><li><div class=fn>QString <a href="#documentDir"><b>documentDir</b></a> ()</div></li><li><div class=fn>void <a href="#grabKeyboard"><b>grabKeyboard</b></a> ()</div></li><li><div class=fn>void <a href="#ungrabKeyboard"><b>ungrabKeyboard</b></a> ()</div></li><li><div class=fn>void <a href="#setStylusOperation"><b>setStylusOperation</b></a> ( QWidget&nbsp;*&nbsp;w, StylusMode&nbsp;mode )</div></li><li><div class=fn>StylusMode <a href="#stylusOperation"><b>stylusOperation</b></a> ( QWidget&nbsp;*&nbsp;w )</div></li><li><div class=fn>void <a href="#setInputMethodHint"><b>setInputMethodHint</b></a> ( QWidget&nbsp;*&nbsp;w, InputMethodHint&nbsp;mode, const&nbsp;QString&nbsp;&amp;&nbsp;param = QString::null )</div></li><li><div class=fn>void <b>setInputMethodHint</b> ( QWidget *, const&nbsp;QString&nbsp;&amp;&nbsp;named )</div></li><li><div class=fn>InputMethodHint <a href="#inputMethodHint"><b>inputMethodHint</b></a> ( QWidget&nbsp;*&nbsp;w )</div></li><li><div class=fn>QString <a href="#inputMethodHintParam"><b>inputMethodHintParam</b></a> ( QWidget&nbsp;*&nbsp;w )</div></li><li><div class=fn>void <a href="#showDialog"><b>showDialog</b></a> ( QDialog&nbsp;*&nbsp;dialog, bool&nbsp;nomax = FALSE )</div></li><li><div class=fn>int <b>execDialog</b> ( QDialog *, bool&nbsp;nomax = FALSE )</div></li><li><div class=fn>void <a href="#setMenuLike"><b>setMenuLike</b></a> ( QDialog&nbsp;*&nbsp;diag, bool&nbsp;b )</div></li><li><div class=fn>bool <a href="#isMenuLike"><b>isMenuLike</b></a> ( const&nbsp;QDialog&nbsp;*&nbsp;diag )</div></li><li><div class=fn>void <a href="#setTempScreenSaverMode"><b>setTempScreenSaverMode</b></a> ( screenSaverHint&nbsp;hint )</div></li><li><div class=fn>void <a href="#setKeepRunning"><b>setKeepRunning</b></a> ()</div></li></ul><h2>Protected Members</h2><ul><li><div class=fn>bool <b>notify</b> ( QObject *, QEvent * )</div></li><li><div class=fn>bool <a href="#qwsEventFilter"><b>qwsEventFilter</b></a> ( QWSEvent&nbsp;*&nbsp;e )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The QPEApplication class implements various system servicesthat are available to all Qtopia applications.<p> Simply by using QPEApplication instead of QApplication, a standard Qtapplication becomes a Qtopia application. It automatically followsstyle changes, quits and raises, and in thecase of <a href="docwidget.html">document-oriented</a> applications,changes the currently displayed document in response to the environment.<p> To create a <a href="docwidget.html">document-oriented</a>application use <a href="#showMainDocumentWidget">showMainDocumentWidget</a>(); to create anon-document-oriented application use <a href="#showMainWidget">showMainWidget</a>(). The<a href="#keepRunning">keepRunning</a>() function indicates whether the application willcontinue running after it's processed the last <a href="qcop.html">QCop</a> message. This can be changed using <a href="#setKeepRunning">setKeepRunning</a>().<p> A variety of signals are emitted when certain events occur, forexample, <a href="#timeChanged">timeChanged</a>(), <a href="#clockChanged">clockChanged</a>(), <a href="#weekChanged">weekChanged</a>(),<a href="#dateFormatChanged">dateFormatChanged</a>() and <a href="#volumeChanged">volumeChanged</a>(). If the application receivesa <a href="qcop.html">QCop</a> message on the application'sQPE/Application/<em>appname</em> channel, the <a href="#appMessage">appMessage</a>() signal isemitted. There are also flush() and reload() signals, whichare emitted when synching begins and ends respectively - upon thesesignals, the application should save and reload any datafiles that are involved in synching. Most of these signals will initiallybe received and unfiltered through the appMessage() signal.<p> This class also provides a set of useful static functions. The<a href="#qpeDir">qpeDir</a>() and <a href="#documentDir">documentDir</a>() functions return the respective paths.The <a href="#grabKeyboard">grabKeyboard</a>() and <a href="#ungrabKeyboard">ungrabKeyboard</a>() functions are used tocontrol whether the application takes control of the device'sphysical buttons (e.g. application launch keys). The stylus' mode ofoperation is set with <a href="#setStylusOperation">setStylusOperation</a>() and retrieved with<a href="#stylusOperation">stylusOperation</a>(). There are also <a href="#setInputMethodHint">setInputMethodHint</a>() and<a href="#inputMethodHint">inputMethodHint</a>() functions.<p> <p>See also <a href="qtopiaemb.html">Qtopia Classes</a>.<hr><h2>Member Type Documentation</h2><h3 class=fn><a name="InputMethodHint-enum"></a>QPEApplication::InputMethodHint</h3><ul><li><tt>QPEApplication::Normal</tt> - the widget sometimes needs text input.<li><tt>QPEApplication::AlwaysOff</tt> - the widget never needs text input.<li><tt>QPEApplication::AlwaysOn</tt> - the widget always needs text input.<li><tt>QPEApplication::Number</tt> - the widget needs numeric input.<li><tt>QPEApplication::PhoneNumber</tt> - the widget needs phone-style numeric input.<li><tt>QPEApplication::Words</tt> - the widget needs word input.<li><tt>QPEApplication::Text</tt> - the widget needs non-word input.<li><tt>QPEApplication::Named</tt> - the widget needs special input, defined by <em>param</em>.Each input method may support a different range of specialinput types, but will default to Text if they do not know thetype.</ul><p> By default, QLineEdit and QMultiLineEdit have the Words hintunless they have a QIntValidator, in which case they have the Number hint.This is appropriate for most cases, including the input of names (newnames being added to the user's dictionary).All other widgets default to Normal mode.<p> <p>See also <a href="#inputMethodHint">inputMethodHint</a>() and <a href="#setInputMethodHint">setInputMethodHint</a>().<h3 class=fn><a name="StylusMode-enum"></a>QPEApplication::StylusMode</h3><ul><li><tt>QPEApplication::LeftOnly</tt> - the stylus only generates LeftButtonevents (the default).<li><tt>QPEApplication::RightOnHold</tt> - the stylus generates RightButton eventsif the user uses the press-and-hold gesture.</ul><p> <p>See also <a href="#setStylusOperation">setStylusOperation</a>() and <a href="#stylusOperation">stylusOperation</a>().<h3 class=fn><a name="screenSaverHint-enum"></a>QPEApplication::screenSaverHint</h3><ul><li><tt>QPEApplication::Disable</tt> - the screen should never blank<li><tt>QPEApplication::DisableLightOff</tt> - the screen should never blank and thebacklight should never switch off<li><tt>QPEApplication::DisableSuspend</tt> - the screen should blank when the device goesinto suspend mode<li><tt>QPEApplication::Enable</tt> - screen blanking and switching off the backlight areboth enabled</ul><p> Currently, this is only used internally.<p> <hr><h2>Member Function Documentation</h2><h3 class=fn><a name="QPEApplication"></a>QPEApplication::QPEApplication ( int&nbsp;&amp;&nbsp;argc, char&nbsp;**&nbsp;argv, Type&nbsp;t = GuiClient )</h3>Constructs a QPEApplication just as you would constructa QApplication, passing <em>argc</em>, <em>argv</em>, and <em>t</em>.<p> For applications, <em>t</em> should be the default, GuiClient. Onlythe Qtopia server passes GuiServer.<h3 class=fn><a name="~QPEApplication"></a>QPEApplication::~QPEApplication ()</h3>Destroys the QPEApplication.<h3 class=fn>void <a name="appMessage"></a>QPEApplication::appMessage ( const&nbsp;QCString&nbsp;&amp;&nbsp;msg, const&nbsp;QByteArray&nbsp;&amp;&nbsp;data )<tt> [signal]</tt></h3><p> This signal is emitted when a message is received on thisapplication's QPE/Application/<i>appname</i> <a href="qcop.html">QCop</a> channel.<p> The slot to which you connect this signal uses <em>msg</em> and <em>data</em>in the following way:<p> <pre>    void MyWidget::receive( const QCString&amp; msg, const QByteArray&amp; data )    {        QDataStream stream( data, IO_ReadOnly );        if ( msg == "someMessage(int,int,int)" ) {            int a,b,c;            stream &gt;&gt; a &gt;&gt; b &gt;&gt; c;            ...        } else if ( msg == "otherMessage(QString)" ) {

⌨️ 快捷键说明

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