KDEdu Logo

Tips for Developers

Questions

Edu Software

KDE/Qt Framework

Internationalization (i18n) Of Applications

Answers

Edu Software

How do I develop an educational Application?

  • Choose the age category you want to design software for
  • Chooose the subject
  • Subscribe to the mailing list
  • Ask for a subdirectory to be created on the web server so that the project's web site can be created.
  • Please ensure the software stays within the common look and feel of KDE Educational software

[Up to Questions]

How can I figure out wether my application name is a trademark?

The name you choose for your application must not be a trademark. You can first run a Google search on it.
Then, to search for European trademarks, you can use:
http://oami.eu.int/search/trademark/la/de_tm_search.cfm
For German trademarks, you can use (only on Mo-Fr between 7:30am-6pm MET):
https://dpinfo.dpma.de/

[Up to Questions]

What are prefered code formatting rules?

Here are some suggested guidelines:

  • Use either spaces or tab to indent your code but be consistent by using the same all along
  • Insert a space after a comma, after a begin parenthesis and before an end parenthesis
  • { and } should be in the same column
  • Put the pointer * and reference & signs adjacent to the variable they belong to

Eva pointed out a useful application called astyle that is a reindenter and reformatter of C++, C and Java source code.

[Up to Questions]

KDE/Qt Framework

How do I manage bug reporting for my KDE program?

Each program must use the KDE bugs database properly. When importing an app, please remember to:

  1. Change the last parameter in the KAboutData constructor to "submit@bugs.kde.org" (rather than somebody's personal e-mail address).
  2. Add an entry for the app in bugs/Maintainers.xml (preferably with the same description as in the .desktop file).

[Up to Questions]

What is the use of #include "myfile.moc"?

Laurent Montel sent me this tip to reduce compiling time (this is very important, even for small projects) and this tip also allows the compilation on multi-processors machines.
In each .cpp file that generates a moc, add the following line (let's say that the cpp file is named myfile.cpp):

#include "myfile.moc"

After including this line, do a

make clean
touch Makefile.am

to regenerate the makefile in the directory.

[Up to Questions]

How do I implement a Highscore table?

Have a look at the KHighscore class (you can find it in kdegames/libkdegames/khighscore.cpp and khighscore.h). This is well documented.

[Up to Questions]

How do I use pictures?

If you use KDevelop, you add your picture in the project then you right click on it and you select Properties.

In Installation, check Install and in the lineedit, type:

$(kde_datadir)/project_name

This will install your picture in $KDEDIR/share/apps/project_name. Then, in your code, you have to include the following header:

kstandarddirs.h

and the path to your picture is

locate("data","project_name/my_pic.png")

[Up to Questions]

Internationalization (i18n) Of Applications

What KDE reference do you suggest for i18n?

Please read the KDE i18n tutorial on KDE TechBase, and the tutorial about i18n mistakes.

[Up to Questions]

How do I add text to pictures properly?

Kevin Krammer has contributed some code to replace strings in a picture by the use of a painter that draws a message on a background picture.

QPixmap* winnerPic = new QPixmap(locate( "appdata", "win.png" ) );
QPainter painter;
painter.begin(winnerPic);
// set up font and stuff
// ...
painter.drawText(i18n("You win"));
painter.end();

[Up to Questions]

Where shall I store language sensitive data?

For the applications that uses several languages, it is suggested that you put your sounds and data in l10n/<lang>/data/kdeedu/<your_app_name>.
They will then install along with the l10n package.
Have a language dialog in your app and if the user wants another language, he should install the corresponding l10n package.

[Up to Questions]


Author: Anne-Marie Mahfouf and Matthias Meßmer
Last update: 2014-07-29

Global navigation links