<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.trinitydesktop.org/index.php?action=history&amp;feed=atom&amp;title=TDEConfig_Module_HOWTO</id>
	<title>TDEConfig Module HOWTO - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.trinitydesktop.org/index.php?action=history&amp;feed=atom&amp;title=TDEConfig_Module_HOWTO"/>
	<link rel="alternate" type="text/html" href="https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;action=history"/>
	<updated>2026-04-13T12:03:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=2828&amp;oldid=prev</id>
		<title>Blu256: - Applicable to TDE</title>
		<link rel="alternate" type="text/html" href="https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=2828&amp;oldid=prev"/>
		<updated>2023-01-08T10:12:37Z</updated>

		<summary type="html">&lt;p&gt;- Applicable to TDE&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:12, 8 January 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;{{Applicable to TDE}}&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;A &#039;&#039;&#039;TDEConfig Module&#039;&#039;&#039; is a small library with a TDECModule subclass containing code which builds and support a interface for configuration tasks. The module is then encapsulated in a parent application, for example &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;KControl&amp;lt;/tt&amp;gt; or a &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;A &#039;&#039;&#039;TDEConfig Module&#039;&#039;&#039; is a small library with a TDECModule subclass containing code which builds and support a interface for configuration tasks. The module is then encapsulated in a parent application, for example &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;KControl&amp;lt;/tt&amp;gt; or a &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Blu256</name></author>
	</entry>
	<entry>
		<id>https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1901&amp;oldid=prev</id>
		<title>Blu256: Blu256 moved page KConfig Module HOWTO to TDEConfig Module HOWTO</title>
		<link rel="alternate" type="text/html" href="https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1901&amp;oldid=prev"/>
		<updated>2021-12-24T08:27:02Z</updated>

		<summary type="html">&lt;p&gt;Blu256 moved page &lt;a href=&quot;/KConfig_Module_HOWTO&quot; class=&quot;mw-redirect&quot; title=&quot;KConfig Module HOWTO&quot;&gt;KConfig Module HOWTO&lt;/a&gt; to &lt;a href=&quot;/TDEConfig_Module_HOWTO&quot; title=&quot;TDEConfig Module HOWTO&quot;&gt;TDEConfig Module HOWTO&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:27, 24 December 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Blu256</name></author>
	</entry>
	<entry>
		<id>https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1895&amp;oldid=prev</id>
		<title>Blu256: /* What else do I need? */ Adjusted spacing</title>
		<link rel="alternate" type="text/html" href="https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1895&amp;oldid=prev"/>
		<updated>2021-12-21T10:29:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;What else do I need?: &lt;/span&gt; Adjusted spacing&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:29, 21 December 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 242:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 242:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;There are a number of additional things for convenience.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;There are a number of additional things for convenience.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;=== tdecmshell ===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;=== tdecmshell ===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 251:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 250:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;$ tdecmshell fonts colors&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;$ tdecmshell fonts colors&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;=== KCMultiDialog ===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;=== KCMultiDialog ===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 257:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 255:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Sometimes, you may want to reuse your &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; inside an application. There are two ways to accomplish this:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Sometimes, you may want to reuse your &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; inside an application. There are two ways to accomplish this:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;* Use &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt; (in &amp;lt;tt&amp;gt;tdelibs/tdeutils&amp;lt;/tt&amp;gt;)&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&amp;lt;br&amp;gt;This is a simple dialog that can show an abitrary number of modules in a normal &amp;lt;tt&amp;gt;KDialogBase&amp;lt;/tt&amp;gt;. The advantage is that you can control the behaviour and the results much easier that with a separate process. And as your module is a simple library, you can just link to it anyway.&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;* Use &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt; (in &amp;lt;tt&amp;gt;tdelibs/tdeutils&amp;lt;/tt&amp;gt;)&amp;lt;br&amp;gt;This is a simple dialog that can show an abitrary number of modules in a normal &amp;lt;tt&amp;gt;KDialogBase&amp;lt;/tt&amp;gt;. The advantage is that you can control the behaviour and the results much easier that with a separate process. And as your module is a simple library, you can just link to it anyway.&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;* Call &amp;lt;code&amp;gt;tdecmshell [modules...]&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;* Call &amp;lt;code&amp;gt;tdecmshell [modules...]&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;=== KCModuleContainer ===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;=== KCModuleContainer ===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;The class &amp;lt;tt&amp;gt;KCModuleContainer&amp;lt;/tt&amp;gt; allows great flexibility with handling modules. The API docs explain it usage the best.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;The class &amp;lt;tt&amp;gt;KCModuleContainer&amp;lt;/tt&amp;gt; allows great flexibility with handling modules. The API docs explain it usage the best.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;== Debugging your module ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;== Debugging your module ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Blu256</name></author>
	</entry>
	<entry>
		<id>https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1894&amp;oldid=prev</id>
		<title>Blu256: Added categories, template &quot;Applicable to TDE&quot;, cosmetic changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1894&amp;oldid=prev"/>
		<updated>2021-12-21T10:28:03Z</updated>

		<summary type="html">&lt;p&gt;Added categories, template &amp;quot;Applicable to TDE&amp;quot;, cosmetic changes&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:28, 21 December 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;{{Applicable to TDE}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;A &#039;&#039;&#039;TDEConfig Module&#039;&#039;&#039; is a small library with a TDECModule subclass containing code which builds and support a interface for configuration tasks. The module is then encapsulated in a parent application, for example &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;KControl&amp;lt;/tt&amp;gt; or a &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;A &#039;&#039;&#039;TDEConfig Module&#039;&#039;&#039; is a small library with a TDECModule subclass containing code which builds and support a interface for configuration tasks. The module is then encapsulated in a parent application, for example &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;KControl&amp;lt;/tt&amp;gt; or a &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;If the &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; in question is intended for KControl the KControl Module Guidelines must be consulted. Much of it applies to KConfig Modules in general, it is probably a good read regardless of what application the KCM targets.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;If the &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; in question is intended for KControl the KControl Module Guidelines must be consulted. Much of it applies to KConfig Modules in general, it is probably a good read regardless of what application the KCM targets.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;__TOC__&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;== How to write a KConfig Module ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;== How to write a KConfig Module ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 267:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 272:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;small&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;small&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Copyright notice&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Copyright notice&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 276:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 282:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled &quot;GNU Free Documentation License&quot;.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled &quot;GNU Free Documentation License&quot;.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;/small&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;/small&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;[[Category:Developers]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Blu256</name></author>
	</entry>
	<entry>
		<id>https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1893&amp;oldid=prev</id>
		<title>Blu256: Added KConfig Module HOWTO from old KDE Developer docs</title>
		<link rel="alternate" type="text/html" href="https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&amp;diff=1893&amp;oldid=prev"/>
		<updated>2021-12-21T10:24:35Z</updated>

		<summary type="html">&lt;p&gt;Added KConfig Module HOWTO from old KDE Developer docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;TDEConfig Module&amp;#039;&amp;#039;&amp;#039; is a small library with a TDECModule subclass containing code which builds and support a interface for configuration tasks. The module is then encapsulated in a parent application, for example &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;KControl&amp;lt;/tt&amp;gt; or a &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This HOWTO describes how to write TDEConfig Modules. This technology was originally designed for KControl. Although KControl is the application where the TDECModule tehnology is the most used, it is used in several other places as well, such as Kopete and Kontact. This HOWTO describes how to write config modules, regardless of where it will be used. TDEConfig Modules were originally called &amp;quot;KControl Modules&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; in question is intended for KControl the KControl Module Guidelines must be consulted. Much of it applies to KConfig Modules in general, it is probably a good read regardless of what application the KCM targets.&lt;br /&gt;
&lt;br /&gt;
== How to write a KConfig Module ==&lt;br /&gt;
&lt;br /&gt;
Now to the practical side of the matter. Modules have to inherit from the class &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt;, defined in &amp;lt;tt&amp;gt;kcmodule.h&amp;lt;/tt&amp;gt;, which is part of the &amp;lt;tt&amp;gt;tdeui&amp;lt;/tt&amp;gt; library. This class defines some important functions that are used in the communication between the framework and the module:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
virtual void load();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This method is invoked whenever the module should read its configuration (most of the times from a config file) and update the user interface. This happens when the user clicks the &amp;quot;Reset&amp;quot; button in the control center, to undo all of his changes and restore the currently valid settings. NOTE that this is not called after the modules is loaded, so you probably want to call this method in the constructor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
virtual void save();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might have guessed it: this function gets called when the user wants to save the settings in the user interface, updating the config files or wherever the configuration is stored. The method is called when the user clicks &amp;quot;Apply&amp;quot; or &amp;quot;Ok&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
virtual void defaults();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is called to set the settings in the module to sensible default values. It gets called when hitting the &amp;quot;Defaults&amp;quot; button. The default values should probably be the same as the ones the application uses when started without a config file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int buttons();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module loader calls this function to decide which buttons should be displayed. For example, it does not make sense to display an &amp;quot;Apply&amp;quot; button for one of the information modules. The value returned can be set by modules using setButtons. E.g:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
setButtons( KCModule::Ok | KCModule::Help );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will make sure that only the &amp;quot;Ok&amp;quot; and the &amp;quot;Help&amp;quot; button is enabled.&lt;br /&gt;
&lt;br /&gt;
There is also two signals used by the modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void changed(bool state);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This signal should be emitted whenever the state of the modules changes. &amp;quot;state&amp;quot; is true, if the contents of the modules differ from the ones in the current configuration, &amp;quot;false&amp;quot; otherwise. For example, if the user changes a value, you emit &amp;lt;tt&amp;gt;changed(true)&amp;lt;/tt&amp;gt;. When the user reloads the systems settings, emit &amp;lt;tt&amp;gt;changed(false)&amp;lt;/tt&amp;gt;. The module loader uses this signal to keep track about unsaved changes in certain modules.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void quickHelpChanged();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Emit this signal whenever the module&amp;#039;s quickhelp changes. Modules implemented as tabbed dialogs might want to implement per-tab quickhelp for example.&lt;br /&gt;
&lt;br /&gt;
There is also a slot for convenience:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void changed();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calling this slot is equal to emitting &amp;lt;code&amp;gt;changed(true)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making a module available ==&lt;br /&gt;
&lt;br /&gt;
Ok, now that you have implemented your class with the module, you must make sure it can be accessed.&lt;br /&gt;
&lt;br /&gt;
To achieve this, the preferred way is to simply use &amp;lt;tt&amp;gt;KGenericFactory&amp;lt;/tt&amp;gt;. Don&amp;#039;t forget to &amp;lt;code&amp;gt;#include &amp;lt;kgenericfactory.h&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
typedef KGenericFactory&amp;lt;body TQWidget&amp;gt; KDEDFactory;&lt;br /&gt;
K_EXPORT_COMPONENT_FACTORY( kcm_xyz, KDEDFactory( &amp;quot;kcm_xyz&amp;quot; ) );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you get errors, make sure that the constructor of your derived class equals the one of the &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; baseclass (the TQStringList argument matters).&lt;br /&gt;
&lt;br /&gt;
If you need to export more than one module per library, you have to use the old loader. That is, you need to create a function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  TDEModule *create_xyz(TQWidget *parent, const char *name)&lt;br /&gt;
  {&lt;br /&gt;
    return new XYZ(parent, name); // XYZ inherits from TDECModule&lt;br /&gt;
  };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function and the implementation of the module is then compiled as a shared library. If the name of your modules is &amp;#039;xyz&amp;#039;, the name of the library should be &amp;lt;code&amp;gt;kcm_xyz(.la|.so)&amp;lt;/code&amp;gt; and should be installed into &amp;lt;code&amp;gt;$TDEDIR/lib/trinity&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Use &amp;quot;kde_module_LTLIBRARIES = kcm_xyz.la&amp;quot; for that in your Makefile.am. Don&amp;#039;t call it libkcm_xyz as that is deprecated since KDE 3.0. Further issues regarding Makefile.am writing is hopefully covered in the Makefile.am HOWTO. Also, have a look at how for example the KControl module kcm_useraccount Makefile.am looks like. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initializing on startup ==&lt;br /&gt;
&lt;br /&gt;
If your module needs to initialize on TDE session startup, you must have a construct like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  TDECModule *init_xyz(TQWidget *parent, const char *name)&lt;br /&gt;
  {&lt;br /&gt;
    // Do initialization here&lt;br /&gt;
  };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t forget to add &amp;lt;code&amp;gt;X-TDE-Init&amp;lt;/code&amp;gt; to your desktop file. (see below)&lt;br /&gt;
&lt;br /&gt;
== Making a KCModule dynamically available ==&lt;br /&gt;
&lt;br /&gt;
Sometimes it is of interest to hide a &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; when it does not have any use for the current situation, for example certain hardware or software is lacking. This is achieved by adding to the library:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
  TDECModule *test_xyz(TQWidget *parent, const char *name)&lt;br /&gt;
  {&lt;br /&gt;
    // Probing for hardware/software precense&lt;br /&gt;
    return true; // If the TDECModule should show up, otherwise it should return false.&lt;br /&gt;
  };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The desktop file must also contain &amp;quot;&amp;lt;tt&amp;gt;X-TDE-Test-Module=true&amp;lt;/tt&amp;gt;&amp;quot; in order for this to work.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; will now be &amp;quot;conditionally&amp;quot; loaded, for example when requested via &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;KControl&amp;lt;/tt&amp;gt; (as of 2004-03-21 not implemented in KControl).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The desktop file ==&lt;br /&gt;
&lt;br /&gt;
To declare a &amp;lt;tt&amp;gt;TDECModule&amp;#039;s&amp;lt;/tt&amp;gt; existence a desktop file must be installed. Call it &amp;quot;&amp;lt;tt&amp;gt;kcm_modulename.desktop&amp;lt;/tt&amp;gt;&amp;quot;. &amp;lt;!-- and put the following line in your Makefile.am to have it installed into the proper place:&lt;br /&gt;
&lt;br /&gt;
xdg_apps_DATA = kcm_modulename.desktop --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It could be a good idea to have a look at the desktop file standard.&lt;br /&gt;
&lt;br /&gt;
A module&amp;#039;s .desktop file supports the following .desktop directives:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Directive&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;X-TDE-Library&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| This is the name of the library, without the &amp;lt;tt&amp;gt;kcm_&amp;lt;/tt&amp;gt; prefix. So in the example, the library name would be &amp;quot;xyz&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;X-TDE-FactoryName&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| This entry can be used to set the name of the factory function in the library. If you only have one &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; in a library this directive is not needed. If you have several modules in one library you will need a .desktop file for each &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, if you have a library named &amp;lt;tt&amp;gt;kcm_frog.la&amp;lt;/tt&amp;gt; with two modules, named &amp;quot;&amp;lt;tt&amp;gt;kermit&amp;lt;/tt&amp;gt;&amp;quot; and &amp;quot;&amp;lt;tt&amp;gt;quak&amp;lt;/tt&amp;gt;&amp;quot;, you would have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
X-KDE-Library=frog&lt;br /&gt;
X-KDE-FactoryName=kermit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in one of the .desktop files, and in the other:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
X-KDE-Library=frog&lt;br /&gt;
X-KDE-FactoryName=quak&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module loader would then call the &amp;quot;&amp;lt;tt&amp;gt;create_kermit&amp;lt;/tt&amp;gt;&amp;quot; and &amp;quot;&amp;lt;tt&amp;gt;create_quak&amp;lt;/tt&amp;gt;&amp;quot; functions respectively.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;X-TDE-RootOnly&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| If this is set to &amp;quot;true&amp;quot;, the module must be executed with root permissions. The module loader will then show the module in greyed-out (disabled) state with a warning until the &amp;quot;modify&amp;quot; button is pressed which allows running the module in an root environment using &amp;lt;tt&amp;gt;tdesu&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;QXEmbed&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;X-TDE-ParentApp&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| The application you put in this entry determines in what situations it will show. For example, if the line says &amp;lt;code&amp;gt;X-TDE-ParentApp=kcontrol&amp;lt;/code&amp;gt; the module will show up in KControl. It is very crucial the selected &amp;lt;tt&amp;gt;ParentApp&amp;lt;/tt&amp;gt; is correct, otherwise the module show up in unnecessary places.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;X-TDE-Init&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| If the module has to perform some action at system startup, use this entry to build the name of a function to call. if &amp;lt;tt&amp;gt;X-TDE-Init&amp;lt;/tt&amp;gt; is &amp;quot;bell&amp;quot;, for example, the function &amp;quot;&amp;lt;tt&amp;gt;init_bell&amp;lt;/tt&amp;gt;&amp;quot; is called in the library indicated by &amp;lt;tt&amp;gt;X-TDE-Library&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;X-TDE-Test-Module&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| If the module has to perform some action at system startup, use this entry to build the name of a function to call. if &amp;lt;tt&amp;gt;X-TDE-Init&amp;lt;/tt&amp;gt; is &amp;quot;bell&amp;quot;, for example, the function &amp;quot;init_bell&amp;quot; is called in the library indicated by &amp;lt;tt&amp;gt;X-TDE-Library&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;NoDisplay&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| If this is set to true the module will not show up in &amp;lt;tt&amp;gt;kcontrol&amp;lt;/tt&amp;gt; or when viewed with &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt;. This is usable when you need to do something at startup (&amp;lt;code&amp;gt;X-TDE-Init&amp;lt;/code&amp;gt; etc.) but don&amp;#039;t want the module to show up in kcontrol, e.g. the module has no GUI.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| This is &amp;#039;labels&amp;#039; for the modules and fill the nodes in the three view. Please see the module guidelines on how to pick a good Name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| This directive shows up in the main area in KControl if you select a top node in the three view. See the same section as for Name in the module guidelines for how to pick a good phrase.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;Categories&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| This describes where the module should be put in KControl&amp;#039;s navigation. It should look like &amp;quot;Categories=QT;TDE;X;&amp;quot; where X is the category. A list of available categories, as well as which one to choose is found in the module guidelines.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Specifies the icon for the module.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;Exec/Type&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| These two should say &amp;lt;code&amp;gt;Exec=kcmshell modulename&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Type=Application&amp;lt;/code&amp;gt;. Used for internal purposes&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;Keywords&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| A semi colon separated list containing words/phrases search functionality should trigger on. &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To summarize, a valid .desktop file must contain these entries:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;Type=Application&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;Exec=tdecmshell modulename&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;Categories=QT;KDE;X;&amp;lt;/tt&amp;gt; (replace X with your category)&lt;br /&gt;
* &amp;lt;tt&amp;gt;Keywords&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;X-TDE-Library&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;X-TDE-ParentApp&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And these are optional:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;X-TDE-Init&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;X-TDE-Test-Module&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;NoDisplay&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;X-TDE-Root-Only&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;X-TDE-Factory-Name&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;DocPath&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other directives(except the translators) can safely be removed, since they most likely are abundant or are leftovers from old KDE versions. For example, &amp;lt;tt&amp;gt;X-ModuleType&amp;lt;/tt&amp;gt; was relevant for KDE 2.0 but not in any new versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What else do I need? ==&lt;br /&gt;
&lt;br /&gt;
There are a number of additional things for convenience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== tdecmshell ===&lt;br /&gt;
&lt;br /&gt;
Consider you want to run a module standalone. Call &amp;lt;code&amp;gt;tdecmshell [module]&amp;lt;/code&amp;gt;. For example, to get the font and the desktop color settings, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
$ tdecmshell fonts colors&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== KCMultiDialog ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, you may want to reuse your &amp;lt;tt&amp;gt;TDECModule&amp;lt;/tt&amp;gt; inside an application. There are two ways to accomplish this:&lt;br /&gt;
&lt;br /&gt;
* Use &amp;lt;tt&amp;gt;KCMultiDialog&amp;lt;/tt&amp;gt; (in &amp;lt;tt&amp;gt;tdelibs/tdeutils&amp;lt;/tt&amp;gt;)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;This is a simple dialog that can show an abitrary number of modules in a normal &amp;lt;tt&amp;gt;KDialogBase&amp;lt;/tt&amp;gt;. The advantage is that you can control the behaviour and the results much easier that with a separate process. And as your module is a simple library, you can just link to it anyway.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Call &amp;lt;code&amp;gt;tdecmshell [modules...]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== KCModuleContainer ===&lt;br /&gt;
&lt;br /&gt;
The class &amp;lt;tt&amp;gt;KCModuleContainer&amp;lt;/tt&amp;gt; allows great flexibility with handling modules. The API docs explain it usage the best.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Debugging your module ==&lt;br /&gt;
&lt;br /&gt;
You can attach &amp;lt;tt&amp;gt;gdb&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;valgrind&amp;lt;/tt&amp;gt; or whatever to &amp;lt;code&amp;gt;tdecmshell [yourmodule]&amp;lt;/code&amp;gt; to track down leaks or crashes. If you need to trace it down inside &amp;lt;tt&amp;gt;kcontrol&amp;lt;/tt&amp;gt;, make sure you pass it &amp;lt;code&amp;gt;--nofork&amp;lt;/code&amp;gt; on startup. You really want to use &amp;lt;tt&amp;gt;tdecmshell&amp;lt;/tt&amp;gt; for debugging as long as your debugging does not involve debugging bad interaction with the &amp;lt;tt&amp;gt;kcontrol&amp;lt;/tt&amp;gt; framework itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Copyright notice&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Imported from [https://websvn.kde.org/*checkout*/trunk/www/sites/developer/documentation/other/kcm_howto.html?revision=471709 KDE Developer Documentation SVN].&lt;br /&gt;
&lt;br /&gt;
 Copyright (C) 2003 Daniel Molkentin &amp;lt;molketin@kde.org&amp;gt;&lt;br /&gt;
 Copyright (C) 2004 Frans Englich &amp;lt;frans.englich@telia.com&amp;gt;&lt;br /&gt;
 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled &amp;quot;GNU Free Documentation License&amp;quot;.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blu256</name></author>
	</entry>
</feed>