• Skip to content
  • Skip to link menu
The KDE Education Project
  • The KDE Education Project / Developer resources
 
 

Tips for Developers

Questions

Edu Software

  • How do I develop an educational Application?
  • How can I figure out wether my application name is a trademark?
  • What are prefered code formatting rules?

KDE/Qt Framework

  • How do I use KAction instead of KAccel?
  • How do I manage bug reporting for my KDE program?
  • What is the use of #include "myfile.moc"?
  • Where can I get information about the QCanvas class?
  • How do I implement a Highscore table?
  • How do I code a splash screen?
  • How do I use pictures?

Internationalization (i18n) Of Applications

  • What KDE reference do you suggest for i18n?
  • How do I add text to pictures properly?
  • Where shall I store language sensitive data?

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 use KAction instead of KAccel?

Please see that note from Andreas Beckermann to learn how to use KAction and accelerated keys.

[Up to Questions]

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]

Where can I get information about the QCanvas class?

For games which use anything moving you should use QCanvas and its Sprite objects. This gives smooth images, animations etc. In my Quintalign program I am even experimenting with a sprite class which can configure and load all sprites by text configuration files, which makes the graphics part really easy to configure.(from the Quintalign author)

You can find a QCanvas tutorial here.

[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 code a splash screen?

See the KSplashScreen docs for information.
But please notice that splashscreens are depreciated in KDE if your application has not a long startup time.

[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: 2008-01-11

Inform

Skip menu "Inform"
  • KDE-Edu Home
  • KDE Home
  • Information
  • News

Categories

Skip menu "Categories"
  • Languages
  • Mathematics
  • Miscellaneous
  • Science
  • Teaching Tools

Develop

Skip menu "Develop"
  • Getting involved
  • Ideas for Developing New Programs
  • Usability Reports
  • Developer resources
    • KDE-Edu on TechBase
    • Free Fonts
    • Developing FAQ
    • Documentation tutorial
    • Common Feature Plans
    • Create a Standalone-Package
    • Framework Plan
  • Contributions
  • Working on this web site
  • Widgets

Communicate

Skip menu "Communicate"
  • Paris 2007
  • aKademy 2007
  • Slideshows for Promo
  • Contacts

Global navigation links

  • KDE Home
  • KDE Accessibility Home
  • Description of Access Keys
  • Back to content
  • Back to menu

Search:


Maintained by edu.kde.org Webmaster
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal