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

📄 mergeinterface.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/qtopiadesktop/doc/merge.doc:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>MergeInterface 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>MergeInterface Class Reference</h1><p>The MergeInterface class provides an interface for mergingQtopia and Qtopia Desktop data.<a href="#details">More...</a><p><tt>#include &lt;<a href="merge-h.html">interfaces/merge.h</a>&gt;</tt><p><a href="mergeinterface-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>virtual void <a href="#setup"><b>setup</b></a> ( CenterInterface&nbsp;*&nbsp;center, MergeProgress&nbsp;*&nbsp;p ) = 0</div></li><li><div class=fn>virtual bool <a href="#data"><b>data</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;dataSet, QValueList&lt;MergeML::Record&gt;&nbsp;&amp;&nbsp;outRecs ) = 0</div></li><li><div class=fn>virtual bool <a href="#applyChanges"><b>applyChanges</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;dataSet, const&nbsp;QValueList&lt;MergeML::Change&gt;&nbsp;&amp;&nbsp;changes ) = 0</div></li><li><div class=fn>virtual QString <a href="#pluginApplicationName"><b>pluginApplicationName</b></a> () const = 0</div></li><li><div class=fn>virtual QString <a href="#palmtopApplicationName"><b>palmtopApplicationName</b></a> () const = 0</div></li><li><div class=fn>virtual QStringList <a href="#dataSets"><b>dataSets</b></a> () const = 0</div></li><li><div class=fn>virtual void <a href="#reassignCategory"><b>reassignCategory</b></a> ( int&nbsp;oldCatId, int&nbsp;newCatId, const&nbsp;QString&nbsp;&amp;&nbsp;oldName, const&nbsp;QString&nbsp;&amp;&nbsp;newName ) = 0</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2> The MergeInterface class provides an interface for mergingQtopia and Qtopia Desktop data.<p> This interface should be implemented by all Qtopia Desktop pluginsthat want to be able to merge data between a Qtopia device and adesktop computer. For example, all the built-in PIM (PersonalInformation Management) applications provide a MergeInterface.<p> For each data type exactly one <a href="plugininterface.html">PluginInterface</a> must be implemented.Any number of merge interfaces may be defined for the same type ofdata to allow for merging from a variety of different sources.<p> Writing a merge interface plugin is achieved by subclassing thisbase class, reimplementing the pure virtual functions <a href="#data">data</a>(),<a href="#applyChanges">applyChanges</a>(), <a href="#pluginApplicationName">pluginApplicationName</a>(), <a href="#palmtopApplicationName">palmtopApplicationName</a>()and <a href="#dataSets">dataSets</a>() and exporting the class with the <tt>Q_EXPORT_PLUGIN</tt>macro. See the Plugins  documentation for details.<p> <p>See also <a href="qtopiadesktop.html">Qtopia Desktop Classes</a>.<hr><h2>Member Function Documentation</h2><h3 class=fn>bool <a name="applyChanges"></a>MergeInterface::applyChanges ( const&nbsp;QString&nbsp;&amp;&nbsp;dataSet, const&nbsp;QValueList&lt;MergeML::Change&gt;&nbsp;&amp;&nbsp;changes )<tt> [pure virtual]</tt></h3> <p> This function is called by Qtopia Desktop after a merge has takenplace. The name of the format is passed in <em>dataSet</em>, and a list ofchanges is passed in <em>changes</em>. The plugin is expected to apply thechanges to its own <em>dataSet</em> format data.<p> Returns TRUE if all the changes were successfully applied; otherwisereturns FALSE.<p> <h3 class=fn>bool <a name="data"></a>MergeInterface::data ( const&nbsp;QString&nbsp;&amp;&nbsp;dataSet, QValueList&lt;MergeML::Record&gt;&nbsp;&amp;&nbsp;outRecs )<tt> [pure virtual]</tt></h3> <p> All plugins that can synchronize the <a href="#dataSets">dataSets</a>() will be synchronized at the same time.<p> This function should return a list of records in <em>outRecs</em> that should bemerged together with those from other plugins maintainingrecords for the given <em>dataSet</em>.<p> The function should return TRUE if the plugin was able to succesfullyretrieve the data from it's source; FALSE if it failed retrieving it'sdata.<h3 class=fn>QStringList <a name="dataSets"></a>MergeInterface::dataSets () const<tt> [pure virtual]</tt></h3> <p> Returns a list of the formats that this merge interface canhandle.<p> Qtopia Desktop can merge data in the "addressbook", "datebook","todolist" and "categories" formats.<h3 class=fn>QString <a name="palmtopApplicationName"></a>MergeInterface::palmtopApplicationName () const<tt> [pure virtual]</tt></h3> <p> Returns the name of the Qtopia application that can handle data inthe same format that this plugin can handle.<h3 class=fn>QString <a name="pluginApplicationName"></a>MergeInterface::pluginApplicationName () const<tt> [pure virtual]</tt></h3> <p> Returns the name of the application that handles data inthe same format that this plugin can handle.<h3 class=fn>void <a name="reassignCategory"></a>MergeInterface::reassignCategory ( int&nbsp;oldCatId, int&nbsp;newCatId, const&nbsp;QString&nbsp;&amp;&nbsp;oldName, const&nbsp;QString&nbsp;&amp;&nbsp;newName )<tt> [pure virtual]</tt></h3> <p> This function is called if the merging of the categories detects conflicts.If your plugin contains any records with category id <em>oldCatId</em> or <em>oldName</em> you must reassignthose records to belong to category <em>newCatId</em> or <em>newName</em>.<p> <h3 class=fn>void <a name="setup"></a>MergeInterface::setup ( <a href="centerinterface.html">CenterInterface</a>&nbsp;*&nbsp;center, MergeProgress&nbsp;*&nbsp;p )<tt> [pure virtual]</tt></h3> <p> This function is called by Qtopia Desktop at the beginning ofsynchronization. It is passed <em>center</em> for use throughout the existence of the plugin to interact with Qtopia Desktop.<p> The plugin should set its expected time needed for synchronization bycalling MergeProgress::setTotals() using <em>p</em>.<!-- 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 + -