Update copyright headers
[qt:qt.git] / doc / src / examples / applicationicon.qdoc
1 /****************************************************************************
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Contact: http://www.qt.io/licensing/
5 **
6 ** This file is part of the documentation of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see http://www.qt.io/terms-conditions. For further
15 ** information use the contact form at http://www.qt.io/contact-us.
16 **
17 ** GNU Free Documentation License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Free
19 ** Documentation License version 1.3 as published by the Free Software
20 ** Foundation and appearing in the file included in the packaging of
21 ** this file.  Please review the following information to ensure
22 ** the GNU Free Documentation License version 1.3 requirements
23 ** will be met: http://www.gnu.org/copyleft/fdl.html.
24 ** $QT_END_LICENSE$
25 **
26 ****************************************************************************/
27
28 /*! \example widgets/applicationicon
29     \group all-examples
30     \title Application Icon Example
31
32     \brief The Application Icon example shows how to add an application icon to a
33     mobile application.
34
35     \image appicon_screenshot.png The icon on a Nokia XPressMusic 5800
36
37     \section1 Creating an icon for Maemo
38
39     Maemo expects the icon of an application to be a 64x64 PNG image file. The
40     file name of the icon should be the same as the executable with a \c .png
41     extension. You also need a \c .desktop file that gives the window manager
42     hints about the application, such as name, type and icon.
43
44     \quotefile examples/widgets/applicationicon/applicationicon.desktop
45
46     The \c Icon field should also contain the name of the executable. On the
47     device, application icons are stored in the
48     \c /usr/share/icons/hicolor/64x64/apps directory
49     and desktop files in the \c /usr/share/applications/hildon directory.
50
51     \section1 Creating an icon for Symbian
52
53     Symbian uses Scalable Vector Graphics (SVG Tiny 1.1+) to render
54     application icons in the application menu. Therefore icons could be
55     created manually with a text editor, since SVG files are plain text with
56     XML syntax, but usually you would use a vector graphics program that is
57     able to output SVG files. Popular graphics programs such as Adobe
58     Illustrator or Inkscape are able to do so.
59
60     For best results, the icon should be created on a 44x44 pixel canvas.
61     Otherwise the image might be scaled in unexpected ways.
62
63     Once you have created your icon, make sure that it is stored according to
64     the SVG-Tiny 1.1+ standard. Inkscape, for instance, is not able to save
65     images that way, but there are tools that can convert general SVG files
66     into the Tiny format. For instance, the svg2svgt tool that is bundled with
67     Symbian 3rd and 5th editon SDKs under the folder s60tools can do this
68     conversion to some extent. Another tool to convert SVG to SVG Tiny is SVG
69     Pony.
70
71     \section1 Adding the icons to the project
72
73     Edit the .pro file and specify the ICON variable for the symbian target. 
74     For Maemo, we need to add that the \c .desktop and icon file should be
75     installed.
76
77     \quotefile examples/widgets/applicationicon/applicationicon.pro
78
79     Currently, Qt Creator doesn't include the icon and desktop files in the
80     application package for Maemo, merely the executable file is included. As a
81     workaround for this, the files can be added manually in the Projects tab.
82     In the "Create Package" build step for the Maemo target, the \c .desktop
83     file and icon can be added to be a part of the package contents.
84     Unfortunately, these additions are only stored as a part of the
85     \c .pro.user file. This issue will be resolved in a future release of
86     Qt Creator.
87
88     \image appicon_packagecontents.png Manual addition of files to the "Create Package" build step
89 */