<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
  <!ENTITY kappname "&kapptemplate;">
  <!ENTITY package "kdesdk">
  <!ENTITY % addindex "IGNORE">
  <!ENTITY % English "INCLUDE">
]>

<book lang="&language;">

<bookinfo>
<title>The &kapptemplate; Handbook</title>

<authorgroup>
<author>
<firstname>Anne-Marie</firstname>
<surname>Mahfouf</surname>
<affiliation>
<address>&Anne-Marie.Mahfouf.mail;</address>
</affiliation>
</author>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</authorgroup>

<copyright>
<year>2007</year>
<holder>&Anne-Marie.Mahfouf;</holder>
</copyright>

<legalnotice>&FDLNotice;</legalnotice>


<date>2007-04-18</date>
<releaseinfo>0.00.00</releaseinfo>

<abstract>
<para>
&kapptemplate; is a &kde; 4 templates generator.
</para>
</abstract>

<keywordset>
<keyword>KDE</keyword>
<keyword>kdesdk</keyword>
<keyword>KDE 4</keyword>
<keyword>programming</keyword>
<keyword>template</keyword>
</keywordset>

</bookinfo>

<chapter id="introduction"> 
<title>Introduction</title> 
<para>
&kapptemplate; generates &kde; 4 templates to help you start easily &kde;
programming.</para> 
<para>
&kapptemplate; runs in konsole or any terminal and you start it by typing
<userinput>kapptemplate</userinput> at the prompt.
</para>

<para>
You are then presented with the templates list.
</para>
<para>
There are three kinds of templates:</para>

<itemizedlist>
<listitem><para>1. a simple &kde; 4 application</para> </listitem>
<listitem><para>2. a full featured &kde; 4 framework application</para></listitem>
<listitem><para>3. a KParts &kde; 4 application</para>
</listitem>
</itemizedlist>

<para>Choose one template and type its number then fill in the details of
your project. </para>

</chapter>

<chapter id="using-kapptemplate">
<title>Using &kapptemplate;</title>
<para>This chapter describes the templates so you can choose the one that
 is the best adapted to your needs.</para>

<sect1 id="ksimpleapp-template">
<title>Generating the &kde; 4 simple application template</title>

<screenshot>
<screeninfo>Here's a screenshot of the kde4 simple
application</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="ksimpleapp.png" format="PNG"/>
	  </imageobject>
	    <textobject>
	    <phrase>kde4 simple application</phrase>
	  </textobject>
	</mediaobject>
</screenshot>
<para>This template demonstrates how you create &kde; menus using XMLGui and 
how to use KConfig XT to change settings using the <menuchoice>
<guimenu>Settings</guimenu>
<guimenuitem>Configure &lt;AppName&gt;</guimenuitem>
</menuchoice>.</para>

<screenshot>
<screeninfo>Here's a screenshot of the kde4 simple application
settings dialog</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="ksimpleapp-settings.png" format="PNG"/>
	  </imageobject>
	    <textobject>
	    <phrase>kde4 template settings</phrase>
	  </textobject>
	</mediaobject>
</screenshot>

<para>Please note in the config dialog that there are tooltips to help the user
understanding each setting. These tooltips can either be written directly
in Qt Designer for each widget or be added in the subclass. A tooltip
consists on only a few words describing the use of the widget.</para>
<screenshot>
<screeninfo>A tooltip</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="ksimpleapp-tooltips.png" format="PNG"/>
	  </imageobject>
	    <textobject>
	    <phrase>A tooltip</phrase>
	  </textobject>
	</mediaobject>
</screenshot>
<para>Furthermore using <keycombo
action="simul">&Shift;<keycap>F1</keycap></keycombo> the user can see
QWhatsThis help which helps him to understand better what each setting
does. This QWhatsThis help can either be written directly
in Qt Designer for each widget or be added in the subclass. It should be
more detailed than the tooltip and can use HTML markup such as bold,
color or italic.</para>
<screenshot>
<screeninfo>QWhatsThis</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="ksimpleapp-qwhatsthis.png" format="PNG"/>
	  </imageobject>
	    <textobject>
	    <phrase>QWhatsThis</phrase>
	  </textobject>
	</mediaobject>
</screenshot>

<para>You can find some great tutorials for &kde; 4 on <ulink url="http://techbase.kde.org/Development/Tutorials">http://techbase.kde.org/Development/Tutorials</ulink>.</para>
</sect1>

<sect1 id="framework-template">
<title>Generating the full featured &kde; 4 framework application</title>
<para>This template has the same features than the previous one with more menus and with DBUS support.</para>

<screenshot>
<screeninfo>&kde; 4 framework application</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="kapp-main.png" format="PNG"/>
	  </imageobject>
	    <textobject>
	    <phrase>&kde; 4 framework application</phrase>
	  </textobject>
	</mediaobject>
</screenshot>

</sect1>

<sect1 id="kpart-template">
<title>Generating the KParts &kde; 4 application</title>
<para>A KParts component is a &kde; GUI component featuring a widget embeddedable in any application and GUI elements that will be merged in the "host" user interface (menubars, toolbars... ). It can embed in other &kde; applications. For example, &konsole; is a KPart and can therefore be easily used in KDevelop or &kate;.</para>

<para>
The template will give you the following application:
</para>

<screenshot>
<screeninfo>KParts application</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="kpartapp-main.png" format="PNG"/>
	  </imageobject>
	    <textobject>
	    <phrase>KParts application</phrase>
	  </textobject>
	</mediaobject>
</screenshot>

<para>This template is a small editor</para>
<para>You can read more about KParts in this detailed tutorial: 
<ulink url="http://techbase.kde.org/Development/Architecture/KDE3/KParts">http://techbase.kde.org/Development/Architecture/KDE3/KParts</ulink>.
</para>
</sect1>

</chapter>

<chapter id="credits">
<title>Credits and License</title>

<itemizedlist>
<listitem><para>Program copyright 1998-2003 Kurt Granroth</para> </listitem>
<listitem><para>Program copyright 2006-2007 &Anne-Marie.Mahfouf;</para>
</listitem>
</itemizedlist>

<para>
Documentation copyright 2007 &Anne-Marie.Mahfouf; &Anne-Marie.Mahfouf.mail;
</para>

<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
&underFDL;               <!-- FDL: do not remove -->
&underGPL;        	 <!-- GPL License -->

</chapter>


<appendix id="installation">
<title>Installation</title>

<sect1 id="getting-kapptemplate">
<title>How to obtain &kapptemplate;</title>

&install.intro.documentation;

</sect1>

<sect1 id="compilation">
<title>Compilation and installation</title>

&install.compile.documentation;

</sect1>

</appendix>
&documentation.index; 
</book>

<!--
Local Variables:
mode: sgml
sgml-minimize-attributes:nil
sgml-general-insert-case:lower
sgml-indent-step:0
sgml-indent-data:nil
End:
-->
