\subsubsection templates_1_2a I.2.1. The Source Files
The files <code>template-khello/app.cpp, template-khello/app.h</code> and
<code>template-khello/main.cpp</code> contain the source code that should not
be too special so that the user can implement his own ideas.\n
(There may be variables included - see \ref templates_1_2 "Step 2: The Files in Detail").
\subsubsection templates_1_2b I.2.2. The File template-khello/khello
It may look like this:
\verbinclude khello/khello
The application wizard looks into this file to get
- the information where to integrate the plugin into the the listview (<code>Category=</code>)
- the name (<code>Name=</code>) and the comment (<code>Comment=</code>)
- the preview image (<code>Icon=</code>)
- and the file templates the project uses (<code>FileTemplates=</code>).
.
Further information could be (not required):
- <code>Comment=</code> a small comment for the template. Longer comments should go into a README.devel and shown on startup
- <code>ShowFilesAfterGeneration=</code> a comma-separated list (without whitespaces) of files that should be opened immediately after the generation, for instance a README.devel or a source file the user has to modify, the path is relative to the project directory (example: <code>ShowFilesAfterGeneration=src/main.cpp,src/plugin.cpp</code>). And
- <code>APPNAMEUC</code> will be replaced with the projectname in uppercase,
- <code>APPNAMELC</code> will be replaced with the projectname in lowercase,
- <code>APPNAME</code> will be replaced with the projectname.
.
- <code>DefaultDestinatonDir</code> changes the default destination dir for the project (~) to your value, whereas <code>HOMEDIR</code> is a keyword
.
\attention The file <code>template-khello/khello</code> must have the same name as
the right half of the directory! If the directory is <code>template-foobar</code>
the file must be <code>template-foobar/foobar</code>.
\see AppWizardPart for more information.
\subsubsection templates_1_2c I.2.3. Some Additional Files
The file
- <code>template-khello/appui.rc</code> contains information about the toolbar and the menu.
- <code>template-khello/preview.png</code> will be shown in the aplication wizard.
- <code>template-khello/app.desktop</code> describes the application.
- <code>template-khello/subdirs</code> contains a list of the subdirectories (usually <code>doc, po, src</code>) and can be found in the project root directory. It is necessary for the autotools.
.
\subsubsection templates_1_2d I.2.4. The File template-khello/src-Makefile.am
This file will be copied to the <code>$PROJECTDIR/src/</code>.
\verbinclude khello/src-Makefile.am
\subsubsection templates_1_2e I.2.5. The File template-khello/script
The following script is used to install the template and replaces all
variables by the corresponding value. The result is a hopefully working