This is the README file for the KDE Code Compendium, the compendium is a collection of KDE programming examples that illustrate the use of the facilities of the KDE/Qt framework. Each example in the collection is self contained, and facility described can be quickly integrated into your own programs. The examples are identified as either stable or unstable - the stable examples are those that work as described and have no hidden gotcha's for people reusing the code, the unstable examples in general do not work correctly and are provided on a better-than-nothing basis. Each example is identified by an article number to ensure that people can discuss them without getting confused, please quote this number in any discussions/emails.
A stable example is one that works as described, and has no gotcha's awaiting people who try to reuse the technique used. An unstable example is one which doesn't meet these requirements (probably because it is unfinished). The unstable examples are included in the listing on the basis that even an unfinished example is better than none.
Status | Article | Title |
---|---|---|
Stable | 1 | Using KRootPixmap To Make Transparent Windows |
2 | Embedding the KDE Javascript Interpreter | |
3 | Creating a DCOP Interface | |
4 | Using The Standard KDE Dialogs | |
5 | An Introduction to KActions | |
Unstable | X1 | Using KStdAction and XMLGUI |
X2 | The KDE Style Guide and XMLGUI | |
X3 | Adding Custom Pages To the KDE Properties Dialog | |
X4 | Using QDom to process XML documents |
This example shows how to make pseudo-transparent widgets using KRootPixmap. KRootPixmap makes it trvivial to create widgets that give the appearance of transparency by displaying the desktop background behind the window content, in addition KRootPixmap can apply a fade effect to the background image.
This example shows how easy it is to embed the KDE Javascipt interpreter in your applications. The example is a tool that embeds KJS and lets you execute arbitrary Javascript commands. It shows how to access Javascript variables and to add custom Javascript functions and objects that allow scripts to call methods in the host application. Finally the example shows how it is possible to give the scripts access to the properties, and slots defined by a QObject providing an easy way to create powerful scripting support.
This example demonstrates the use of the standard KDE dialog widgets. It shows the basic usage of each dialog by creating a command line utility that allows them to be invoked from scripts (similar to the dialog program).