Partially Complete Tutorials

X1. Using KStdAction and XMLGUI

This example creates all the KActions defined by KStdAction, and shows how the default behvaiour of XMLGUI automatically provides a style guide compliant menu structure.

X2. The KDE Style Guide and XMLGUI

This example displays the complete menu structure defined by the ui_standards.rc XML, and the merge points it provides for applications.

X3. Adding Custom Pages To the KDE Properties Dialog

This example adds a simple extension to the standard KDE properties dialog. Crashes on load for me, but may due to b/c problems as my install is mixed up right now.

X4. Using QDom to process XML documents

This example uses the QDom classes to load and save a simple XML file, and walks the DOM tree to populate a QListView. Only a rough out line of the correct code for now.

X5. Creating a KPart Viewer (KReadOnlyPart)

This example creates a simple viewer for comma separated value (CSV) files.

Still At The Planning Stage

P2. XMLGUI Hints and Tips

Provides examples of some common uses of XMLGUI.

Creating context menus

Creating a context menu with XMLGUI is very easy, but for some reason is frequently overlooked by developers.

Showing Hints in the Status Bar

In order to display a hint in the status bar when the user highlights an action, you need to call setHighlightEnabled(true) on the action collection.

Using append to control the menu structure

While XMLGUI provides sensible set of defaults, applications that need to can exercise a high degree of control over the menu structure using merge points. Merge points are named locations in the menu structucture that are suitable places for additional actions to be inserted. The standard XMLGUI structure defines merge points for most common groups of actions, so it is easy to create exactly the layout you want.

Using custom XML files

Applications can load additional xml files to provide different profiles, each with its own menu structure.

P3. Embedding a KPart

A simple example that embeds a part and uses it to display a file, this example shows that the same code can use the KHTMLPart and the KatePart interchangably.

Subjects For Future Tutorials

Rating Article Title Info
5 P1 KActions intro

Demonstrate the common KAction types, their uses and their appearance when plugged into different containers.

5 P2 XMLGUI tips

Provides examples of some common uses of XMLGUI.

5 X5 KReadOnlyPart A read-only part that displays CSV files in a QListView.
5 P3 Embedding a part Embed khtml in a basic app shell
4   Providing task status information Icon, title, cursor, status bar, progress, modified
3   KRun Running service, command, desktop file
3   Service menu Add a service menu to text/* that displays the output of wc
2   Control center module  
2   Using KFileItem  
2   Creating a custom KAction  
2   Konq view profiles  
1   Embedding Java applets