[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    www/sites/developer/documentation/tutorials/developing-a-plugin-structure
From:       Thomas Zander <zander () kde ! org>
Date:       2006-06-13 11:59:14
Message-ID: 1150199954.136942.10969.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 550987 by zander:

Small refinements and typo fixes


 M  +14 -11    index.html  


--- trunk/www/sites/developer/documentation/tutorials/developing-a-plugin-structure/index.html \
#550986:550987 @@ -32,7 +32,7 @@
 
 This document will take you through all the steps required to build a plugin
 structure for a KDE application. It might be worth reading even if you
-are not writing a plugin structure for an application, but only wants to
+are not writing a plugin structure for an application, but only want to
 write a plugin.<p>
 
 There exist two kinds of plugins:
@@ -121,7 +121,7 @@
 The class is, as all the files in the template subdirectory, in the
 namespace <tt>PluginDemo</tt>. This is 
 not a requirement but merely to avoid name clashes, and make it more
-obvious where things comes from. Likewise the file is in the subdirectory
+obvious where things come from. Likewise the file is in the subdirectory
 <tt>plugindemo</tt>, which means that including the file is done by an
 include statement like <tt>#include &lt;plugindemo/plugin&gt;</tt>, this is
 also done only to avoid name clashes.<p>
@@ -168,7 +168,7 @@
 href="plugindemo/plugindemo-capitalize/capitalizeplugin.cpp">plugindemo-capitalize/capitalizeplugin.cpp</a>.
  This plugin uses the <a
 href="plugindemo/interfaces/plugindemo/selectioninterface.h">selection
-interface</a> to capitalize the frist letter of every word in the selection<p>
+interface</a> to capitalize the first letter of every word in the selection<p>
 
 The first thing to notice is that the class inherits from
 <tt>PluginDemo::Plugin</tt>, this is a requirement for it to be a plugin at
@@ -184,10 +184,11 @@
 The crucial point is to be found at the top of the file, where you will see these \
lines of code:  <pre>
   K_EXPORT_COMPONENT_FACTORY( plugindemo_capitalize,
-                              KGenericFactory&lt;CapitalizePlugin&gt;( \
"plugindemo_capitalize" ) ) +      KGenericFactory&lt;CapitalizePlugin&gt;( \
"plugindemo_capitalize" ) )  </pre>
 
-K_EXPORT_COMPONENT_FACTORY is a macro defined by KDE, but to really
+K_EXPORT_COMPONENT_FACTORY is a macro defined by KDE. You can just skip down
+to the dotted-list below to see how to write it, but to really
 understand what it does it's useful to look at its definition, which is:
 
 <pre>
@@ -217,17 +218,18 @@
 
 <ul>
   <li> Insert the <tt>K_EXPORT_COMPONENT_FACTORY</tt> in the .cpp file defining
-       the plugin class.
+       the plugin class.</li>
+  <li> Add an #include &lt;kgenericfactory.h&gt;</li>
   <li> As the first argument to the macro, you must specify the library file in
        which this class resides (without the <tt>lib</tt> prefix, and
-       without the <tt>.la</tt> extension.)
+       without the <tt>.la</tt> extension.)</li>
   <li> As the second argument, you must inside the angle brackets specify the
-       name of the class you define in the plugin.
+       name of the class you define in the plugin.</li>
   <li> Finally, inside the braces you must specify a unique string, which
        will be given to creation of the <a
        href="http://developer.kde.org/documentation/library/classmapper.php?class=KInstance">KInstance</a>
  object. <tt>KInstance</tt> is responsible for specifying where
-       translation files, and configuration files are found among other things.
+       translation files, and configuration files are found among other things.</li>
 </ul>
 
 <h2>Merging GUI with the host application</h2><a name="merging_gui_with_the_host"/>
@@ -541,9 +543,10 @@
   <li> A large thank you goes to <a
        href="http://people.kde.org/david.html">David Faure</a> and <a
        href="http://people.kde.org/tron.html">Simon Hausmann</a> who both have \
                answered a lot of
-       questions plus helped me debug code, to make this document possible.
+       questions plus helped me debug code, to make this document possible.</li>
   <li> Thanks to <a href="mailto:boud@valdyas.org">Boudewijn Rempt</a> for
-       spell checking the document, plus suggestion changes for clarifications.
+       spell checking the document, plus suggestion changes for clarifications.</li>
+  <li> Small refinements and typo fixes by Thomas Zander</li>
 </ul>
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic