📄 centerinterface.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/qtopiadesktop/doc/center.doc:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>CenterInterface 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>CenterInterface Class Reference</h1><p>The CenterInterface class provides an interface for pluginsinheriting the PluginInterface to the Qtopia Desktop shell.<a href="#details">More...</a><p><tt>#include <<a href="center-h.html">interfaces/center.h</a>></tt><p><a href="centerinterface-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>virtual void <a href="#displayStatusMessage"><b>displayStatusMessage</b></a> ( const QString & text, bool temp = false ) = 0</div></li><li><div class=fn>virtual void <a href="#displayProgress"><b>displayProgress</b></a> ( int done, int total ) = 0</div></li><li><div class=fn>virtual FileSystemOperator & <a href="#fileSystemOperator"><b>fileSystemOperator</b></a> () = 0</div></li><li><div class=fn>virtual void <a href="#sendQCopMessage"><b>sendQCopMessage</b></a> ( const QString & channel, const QString & message, const QStringList & args ) = 0</div></li><li><div class=fn>virtual void <b>onDcopCommand</b> ( QString sender, QString event ) = 0</div></li><li><div class=fn>virtual QString <a href="#applicationDataPath"><b>applicationDataPath</b></a> () = 0</div></li><li><div class=fn>virtual bool <a href="#isConnected"><b>isConnected</b></a> () const = 0</div></li><li><div class=fn>virtual void <a href="#setCategories"><b>setCategories</b></a> ( const Categories & ) = 0</div></li><li><div class=fn>virtual const Categories & <a href="#categories"><b>categories</b></a> () const = 0</div></li><li><div class=fn>virtual EditCategoriesDialog & <a href="#categoriesEditor"><b>categoriesEditor</b></a> () = 0</div></li><li><div class=fn>virtual void <a href="#syncCategories"><b>syncCategories</b></a> () = 0</div></li><li><div class=fn>enum <a href="#TimeoutOptions-enum"><b>TimeoutOptions</b></a> { NormalTimeout = 0, LongTimeout, NoTimeout }</div></li><li><div class=fn>virtual void <a href="#setConnectionTimeout"><b>setConnectionTimeout</b></a> ( TimeoutOptions t ) = 0</div></li><li><div class=fn>virtual TimeoutOptions <a href="#connectionTimeout"><b>connectionTimeout</b></a> () const = 0</div></li><li><div class=fn>virtual QString <a href="#pdaArchitecture"><b>pdaArchitecture</b></a> () const = 0</div></li><li><div class=fn>virtual int <a href="#pdaMajorVersion"><b>pdaMajorVersion</b></a> () const = 0</div></li><li><div class=fn>virtual int <a href="#pdaMinorVersion"><b>pdaMinorVersion</b></a> () const = 0</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2> The CenterInterface class provides an interface for pluginsinheriting the <a href="plugininterface.html">PluginInterface</a> to the Qtopia Desktop shell.<p> A pointer to the CenterInterface instance in Qtopia Desktop isexported to all Qtopia Desktop plugins inheriting fromPluginInterface. The interface is used to access shared resourcesin the Qtopia Desktop shell and to communicate with the Qtopiadevice.<p> The displayStatusText() and displayProgressInfo() methods are usedto display status information in the Qtopia Desktop status bar.<p> The <a href="#pdaMinorVersion">pdaMinorVersion</a>() and <a href="#pdaMajorVersion">pdaMajorVersion</a>() methods are used toretrieve version information from the Qtopia device.<p> The <a href="#categories">categories</a>(), <a href="#categoriesEditor">categoriesEditor</a>() and <a href="#syncCategories">syncCategories</a>() methodsare used to list and modify Qtopia data categories.<p> The <a href="#fileSystemOperator">fileSystemOperator</a>() method is used to retrieve a pointer toa the shared file system operator instance used to transfer filesbetween the Qtopia device and Qtopia desktop.<p> The sendQCopMessage method is used to send QCop messages to QCopchannels on the Qtopia device. QCop is a RPC mechanism.<p> The <a href="#isConnected">isConnected</a>() method is used to retrieve the Qtopia deviceconnection status.<p> The <a href="#applicationDataPath">applicationDataPath</a>() method is used to retrieve the basedirectory path used to store Qtopia Desktop application data.<p> <p> <p>See also <a href="plugininterface.html">PluginInterface</a>, <a href="mergeinterface.html">MergeInterface</a>, <a href="syncappinterface.html">SyncAppInterface</a>, <a href="importinterface.html">ImportInterface</a>, <a href="exportinterface.html">ExportInterface</a> and <a href="qtopiadesktop.html">Qtopia Desktop Classes</a>.<hr><h2>Member Type Documentation</h2><h3 class=fn><a name="TimeoutOptions-enum"></a>CenterInterface::TimeoutOptions</h3> <p> This enum type defines the length of the timeout valuebefore connection is determined to be lost. Some operations causethe embedded device to lock up for a period of time and this callchanges this timeout.<p> The policy can be:<ul><li><tt>CenterInterface::NormalTimeout</tt> - a few second timeout; should be in this state most of the time<li><tt>CenterInterface::LongTimeout</tt> - a long timeout (up to a minute); this is important for long file transfers<li><tt>CenterInterface::NoTimeout</tt> - disable timeout</ul><hr><h2>Member Function Documentation</h2><h3 class=fn>QString <a name="applicationDataPath"></a>CenterInterface::applicationDataPath ()<tt> [pure virtual]</tt></h3> <p> Returns the base directory used for Qtopia Desktop data files.Qtopia Desktop plugins should create a subdirectory below this pathto store their application data.<h3 class=fn>const <a href="categories.html">Categories</a> & <a name="categories"></a>CenterInterface::categories () const<tt> [pure virtual]</tt></h3> <p> Returns a list of data categories shared by all Qtopia Desktop components.<p> <p>See also <a href="categories.html">Categories</a>.<h3 class=fn><a href="editcategoriesdialog.html">EditCategoriesDialog</a> & <a name="categoriesEditor"></a>CenterInterface::categoriesEditor ()<tt> [pure virtual]</tt></h3> <p> Returns a reference to a dialog used to edit Qtopia data categories.Use this method in Qtopia Desktop plugins to show a dialog tocreate/edit/remove Qtopia data categories.<p> <p>See also <a href="editcategoriesdialog.html">EditCategoriesDialog</a>.<h3 class=fn><a href="centerinterface.html#TimeoutOptions-enum">TimeoutOptions</a> <a name="connectionTimeout"></a>CenterInterface::connectionTimeout () const<tt> [pure virtual]</tt></h3> <p> Returns the currently set TimeoutOptions.<p> <h3 class=fn>void <a name="displayProgress"></a>CenterInterface::displayProgress ( int done, int total )<tt> [pure virtual]</tt></h3> <p> Use this function to display progress information in the QtopiaDesktop GUI shell status bar. The progress percentage is calculatedfrom <em>done</em> and <em>total</em>. The progress will be displayed in a smallprogress bar in the Qtopia Desktop GUI shell status bar.<h3 class=fn>void <a name="displayStatusMessage"></a>CenterInterface::displayStatusMessage ( const QString & text, bool temp = false )<tt> [pure virtual]</tt></h3> <p> Use this function to display a status text message in the QtopiaDesktop GUI shell status bar. This function is called with a message <em>text</em>and a boolean <em>temp</em> selecting temporary or static message display.<h3 class=fn><a href="filesystemoperator.html">FileSystemOperator</a> & <a name="fileSystemOperator"></a>CenterInterface::fileSystemOperator ()<tt> [pure virtual]</tt></h3> <p> Returns a pointer to a <a href="filesystemoperator.html">FileSystemOperator</a> instanceshared by all Qtopia Desktop components. Do not delete this pointer.<p> <p>See also <a href="filesystemoperator.html">FileSystemOperator</a>.<h3 class=fn>bool <a name="isConnected"></a>CenterInterface::isConnected () const<tt> [pure virtual]</tt></h3> <p> Returns TRUE if the Qtopia device is connected to Qtopia Desktop.<h3 class=fn>QString <a name="pdaArchitecture"></a>CenterInterface::pdaArchitecture () const<tt> [pure virtual]</tt></h3> <p> Returns a QString identifying the architecture of the pdathat Qtopia Desktop is connected to.<p> <h3 class=fn>int <a name="pdaMajorVersion"></a>CenterInterface::pdaMajorVersion () const<tt> [pure virtual]</tt></h3> <p> Returns the major version number of the Qtopia software runningon the Qtopia device.<h3 class=fn>int <a name="pdaMinorVersion"></a>CenterInterface::pdaMinorVersion () const<tt> [pure virtual]</tt></h3> <p> Returns the minor version number of the Qtopia software runningon the Qtopia device.<h3 class=fn>void <a name="sendQCopMessage"></a>CenterInterface::sendQCopMessage ( const QString & channel, const QString & message, const QStringList & args )<tt> [pure virtual]</tt></h3> <p> This method is used to send QCop messages to QCop channels on theQtopia device connected to Qtopia Desktop. It is called with theQCOP channel <em>channel</em>, a message <em>message</em> and message arguments <em>args</em>.<h3 class=fn>void <a name="setCategories"></a>CenterInterface::setCategories ( const <a href="categories.html">Categories</a> & )<tt> [pure virtual]</tt></h3> <p> Sets the list of categories shared by all Qtopia Desktop components.<p> <p>See also <a href="categories.html">Categories</a>.<h3 class=fn>void <a name="setConnectionTimeout"></a>CenterInterface::setConnectionTimeout ( <a href="centerinterface.html#TimeoutOptions-enum">TimeoutOptions</a> t )<tt> [pure virtual]</tt></h3> <p> Qtopia Desktop maintains a IP connection to the Qtopia device.This method is used to set the connection status update rate to <em>t</em>.This method is internal. Use it only if you encounter connectionfailures during high bandwidth data transfers.<h3 class=fn>void <a name="syncCategories"></a>CenterInterface::syncCategories ()<tt> [pure virtual]</tt></h3> <p> This method is internal. It is used to sync all categories with theQtopia device. A Qtopia Desktop plugin does not need to do thisexplicitely.<!-- eof --><hr><p>This file is part of the <a href="../index.html">Qtopia</a> platform,copyright © 1995-2004<a href="http://www.trolltech.com/">Trolltech</a>, all rights reserved.<p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright © 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -