📄 pluginloader.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/libraries/qtopia1/pluginloader.cpp:126 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>PluginLoader 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>PluginLoader Class Reference</h1><p>The PluginLoader class simplifies plugin loading and allows plugins to beenabled/disabled.<a href="#details">More...</a><p><tt>#include <<a href="pluginloader-h.html">pluginloader.h</a>></tt><p><a href="pluginloader-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#PluginLoader"><b>PluginLoader</b></a> ( const QString & type )</div></li><li><div class=fn><a href="#~PluginLoader"><b>~PluginLoader</b></a> ()</div></li><li><div class=fn>void <a href="#clear"><b>clear</b></a> ()</div></li><li><div class=fn>const QStringList & <a href="#list"><b>list</b></a> () const</div></li><li><div class=fn>const QStringList & <a href="#disabledList"><b>disabledList</b></a> () const</div></li><li><div class=fn>QRESULT <a href="#queryInterface"><b>queryInterface</b></a> ( const QString & name, const QUuid & id, QUnknownInterface ** iface )</div></li><li><div class=fn>void <a href="#releaseInterface"><b>releaseInterface</b></a> ( QUnknownInterface * iface )</div></li><li><div class=fn>void <a href="#setEnabled"><b>setEnabled</b></a> ( const QString & name, bool enabled = TRUE )</div></li><li><div class=fn>bool <a href="#isEnabled"><b>isEnabled</b></a> ( const QString & name ) const</div></li></ul><h2>Static Public Members</h2><ul><li><div class=fn>bool <a href="#inSafeMode"><b>inSafeMode</b></a> ()</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The PluginLoader class simplifies plugin loading and allows plugins to beenabled/disabled.<p> PluginLoader simplifies loading plugins. The most common use is toiterate over the list of plugins and load each one:<p> <pre> PluginLoader loader( "Effects" ); QStringList list = pluginLoader.list(); QStringList::Iterator it; QValueList<EffectsInterface*> effectList; for ( it = list.begin(); it != list.end(); ++it ) { EffectsInterface *iface = 0; if ( pluginLoader.queryInterface( *it, IID_Effects, (QUnknownInterface**)&iface ) == QS_OK && iface ) { effectList.append( iface ); } } </pre> <p> First availability: Qtopia 1.6<p> <p>See also <a href="qtopiaemb.html">Qtopia Classes</a>.<hr><h2>Member Function Documentation</h2><h3 class=fn><a name="PluginLoader"></a>PluginLoader::PluginLoader ( const QString & type )</h3>Creates a PluginLoader for plugins of type <em>type</em>.<p> The plugins must be installed in the $QPEDIR/plugins/<i>type<i> directory.<h3 class=fn><a name="~PluginLoader"></a>PluginLoader::~PluginLoader ()</h3>Destroys the PluginLoader. Note that this does not release anyinterfaces.<h3 class=fn>void <a name="clear"></a>PluginLoader::clear ()</h3>Releases all interfaces.<h3 class=fn>const QStringList & <a name="disabledList"></a>PluginLoader::disabledList () const</h3>Returns the list of plugins that have been disabled.<h3 class=fn>bool <a name="inSafeMode"></a>PluginLoader::inSafeMode ()<tt> [static]</tt></h3>Returns TRUE if Qtopia is currently in <i>Safe Mode</i>. In Safe Mode<a href="#list">list</a>() will return an empty list and no plugins should be loaded. Thisis to allow misbehaving plugins to be disbled.<h3 class=fn>bool <a name="isEnabled"></a>PluginLoader::isEnabled ( const QString & name ) const</h3>Returns TRUE is the plugin <em>name</em> is enabled.<h3 class=fn>const QStringList & <a name="list"></a>PluginLoader::list () const</h3>Returns the list of plugins that are available.<h3 class=fn>QRESULT <a name="queryInterface"></a>PluginLoader::queryInterface ( const QString & name, const <a href="quuid.html">QUuid</a> & id, QUnknownInterface ** iface )</h3>Query the plugin for the interface specified by <em>id</em> in plugin <em>name</em>.If the interface is available, <em>iface</em> will contain the pointer to it.<p> Returns QS_OK if the interface was found or QS_FALSE otherwise.<h3 class=fn>void <a name="releaseInterface"></a>PluginLoader::releaseInterface ( QUnknownInterface * iface )</h3>Releases the interface <em>iface</em>. The interface must have previously beenreturned by queryInterface.<h3 class=fn>void <a name="setEnabled"></a>PluginLoader::setEnabled ( const QString & name, bool enabled = TRUE )</h3>Enables or disables plugin <em>name</em> depending on the value of <em>enabled</em>.A disabled plugin can still be queried, but it will not be returned by <a href="#list">list</a>().<!-- 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 + -