Your KDE project

If you have a KDE project and want to use icons within it, and want that these icons install seamlessly, you will have to name the icons after the project. In the following we look at a project named krep. The important lines in CMakeLists.txt are the ones printed bold below:

The icon naming scheme

Example for icon names:

hisc-apps-bla.svgz will be installed e.g. to /usr/local/share/icons/hicolor/scalable/apps/./bla.svgz. hi stands for "hicolor", sc for "scalable", apps for "applications", bla for the application's name and .svgz is the suffix for gzipped scalable vector graphic files.

hi128-app-ktimetracker.png will be installed e.g. to /usr/share/icons/hicolor/128x128/apps/ktimetracker.png. hi stands for "hicolor", 128 for a resolution of 128x128 pixels, app for "applications", ktimetracker for the application's name and .png is the suffix for portable network graphic files.

example application

In this chapter we will build - on the KAction example - an example application kicons that looks like this:

This is a file that defines our icon in (almost natural) english language. It is a scalable vector graphics. Before being used, it must be converted to a zipped scalable vector graphic file hisc-apps-tutorial-kicon.svgz, see below.