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

📄 todayplugininterface.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/doc/todayplugininterface.doc:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>TodayPluginInterface 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>TodayPluginInterface Class Reference</h1><p>The TodayPluginInterface class provides an interface for the QtopiaToday application.<a href="#details">More...</a><p><tt>#include &lt;<a href="todayplugininterface-h.html">todayplugininterface.h</a>&gt;</tt><p><a href="todayplugininterface-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>virtual QString <a href="#name"><b>name</b></a> () const = 0</div></li><li><div class=fn>virtual QPixmap <a href="#icon"><b>icon</b></a> () const = 0</div></li><li><div class=fn>virtual QString <a href="#html"><b>html</b></a> ( uint&nbsp;charWidth, uint&nbsp;lineHeight ) const = 0</div></li><li><div class=fn>virtual bool <a href="#configurable"><b>configurable</b></a> () const = 0</div></li><li><div class=fn>virtual QWidget * <a href="#widget"><b>widget</b></a> ( QWidget * ) = 0</div></li><li><div class=fn>virtual void <a href="#accepted"><b>accepted</b></a> ( QWidget * ) const = 0</div></li><li><div class=fn>virtual void <a href="#itemSelected"><b>itemSelected</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;param ) const = 0</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2> The TodayPluginInterface class provides an interface for the QtopiaToday application.<p> The interface relies on markup language for display and interaction in the Todayapplication.  A plugin can be informed of a link being clicked in its view by properlyencoding the links as laid out in <a href="#html">html</a>() function.<p> The layout and format of the embedded html is entirely managed by each plugin.A plugin can inform the Today application to reload its contents by either emittinga reload() signal or sending a reload() qcop message to the Today application.<p> The tags that can be used in the returned text are limited to the capabilitiesof the default QStyleSheet<hr><h2>Member Function Documentation</h2><h3 class=fn>void <a name="accepted"></a>TodayPluginInterface::accepted ( QWidget * ) const<tt> [pure virtual]</tt></h3> <p> This method is called if the user accepted any changes made to the configureoptions of your plugin.  You can safely cast this QWidget back to the typeyou created in <a href="#widget">widget</a>(QWidget *).  Any state changes must be read and storedby your plugin within the scope of this function, as the Today application wouldnormally delete the widget upon exit of this function.<p> If you do not wish to provide configurability there is no need to reimplementthis method.<h3 class=fn>bool <a name="configurable"></a>TodayPluginInterface::configurable () const<tt> [pure virtual]</tt></h3> <p> The <a href="#configurable">configurable</a>() function is used by the Today application for presenting a listof configurable plugins to the user.  Reimplement this method to return TRUEif you want to provide a configurable widget for your plugin.You also need to reimplement both the <a href="#widget">widget</a>(QWidget *) and <a href="#accepted">accepted</a>(QWidget *) functionsif your plugin provides a configure option.<h3 class=fn>QString <a name="html"></a>TodayPluginInterface::html ( uint&nbsp;charWidth, uint&nbsp;lineHeight ) const<tt> [pure virtual]</tt></h3> <p> The <a href="#html">html</a>() function should return the formatted text to be displayed in the Today application.  The parameter <em>charWidth</em> is a size hint of the horizontal amountof characters (based on the default font) allocated to your plugin.  Similarily the<em>lineHeight</em> is a size hint of the vertical amount of character lines allocatedto your plugin.  You may override these size hints, but please bear in mind that ultimatelythe user should, through configure options, decide what amount of screen space yourplugin should be given.<p> Links can be embedded in the html in the following format:<p> raise:application (E.g. &lt;a href="raise:datebook"&gt; Launch Datebook &lt;/a&gt; )<p> qcop:pluginName:parameters  (E.g. &lt;a href="qcop:myplugin:sendshowsignal"&gt; View document &lt;/a&gt; )<p> With the qcop command. the parameters would be passed to the <a href="#itemSelected">itemSelected</a>() functionof your plugin (provided pluginName matches the <a href="#name">name</a>() function of your plugin)<h3 class=fn>QPixmap <a name="icon"></a>TodayPluginInterface::icon () const<tt> [pure virtual]</tt></h3> <p> The <a href="#icon">icon</a>() function returns the pixmap associated with this plugin.  This icon,along with the <a href="#name">name</a>() function, will identify the plugin in the configureoption of the Today application.<h3 class=fn>void <a name="itemSelected"></a>TodayPluginInterface::itemSelected ( const&nbsp;QString&nbsp;&amp;&nbsp;param ) const<tt> [pure virtual]</tt></h3> <p> This function is called by the Today app when a user clicks on a link matchingthe qcop format described in the <a href="#html">html</a>() function.<p> The <em>param</em> is the parameters string embedded in the link encoding of the html()function.<h3 class=fn>QString <a name="name"></a>TodayPluginInterface::name () const<tt> [pure virtual]</tt></h3> <p> The <a href="#name">name</a>() function returns the name of the Today plugin.  This name,along with the <a href="#icon">icon</a>() function, will identify the plugin in the configureoption of the Today application.<h3 class=fn>QWidget * <a name="widget"></a>TodayPluginInterface::widget ( QWidget * )<tt> [pure virtual]</tt></h3> <p> This method is called to display the configure widget for your plugin.The caller assumes ownership of the returned <a href="#widget">widget</a>(E.g. do not delete it).<p> If you do not wish to provide configurability there is no need to reimplementthis method.<!-- eof --><hr><p>This file is part of the <a href="../index.html">Qtopia</a> platform,copyright &copy; 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 &copy; 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 + -