• Skip to content
  • Skip to link menu
Konqueror
  • Konqueror Homepage • Develop • Embedded Components Tutorial • Part 2
 
 

Embedded Components Tutorial - Page 2

[ Page 1 | 2 | 3 | 4 | 5 | 6 | 7 ]

Introducing aKtion!

Introduction

If you have used konqueror at all, you have no doubt noticed its ability to "embed" components for viewing certain types of files. The two best known examples are viewing images using the embedded kview and viewing postscript or PDF files using kghostview.

The technology behind the embedding is pretty impressive... but the authors took great pains to make the API as easy to use as possible. In fact, this tutorial will show you just how incredibly easy it is to convert an existing application into an embedded component. It will take exactly four tiny steps!

The four steps are as follows:

  1. Convert application to shared library (simple change in Makefile)
  2. Add boilerplate KParts component (add one standard file)
  3. Connect existing app to KParts (a few lines of code)
  4. Add toolbar and menu entries (a few more lines of code)

It took this author exactly 15 minutes to convert the example application to an embedded component.. and it took that long only because of some quirks in the existing app. The conversion to KParts was trivial.

Introducing aKtion!

The application that this tutorial will use as it's example is 'aKtion!' aKtion is a KDE video player based on xanim. It can play most common forms of animation (AVI, Quicktime, MPEG, etc). With the conclusion of this tutorial, it will be able to play those animations inside of Konqueror!

There is one small catch to this: you must start with the version of aKtion supplied with this tutorial. There are two "official" versions of aKtion. One is still based on KDE 1.x and is not suitable for KParts. The other is in kdemultimedia and is already converted to KParts! So, if you want to follow along, use this version.

Getting Started

The first step is to get the aKtion source package compiled and installed just to test what it currently does. This assumes that you have a working KDE2 development system. If you do not, read this first!

Follow these steps:

  1. Unpack the aKtion source package
    % gzip -dc aktion-1.99.tar.gz | tar xvpf -
    
  2. Build and install it
    % cd aktion-1.99 && ./configure && make && make install
    

Now find an animation file somewhere -- either on your local hard drive or on the web and click on it. You should see that Konqueror will download the file (if it is remote) and pass it to aKtion to play. Pretty standard, huh?

[ Edit ]

Inform

Skip menu "Inform"
  • Home
  • KDE Home
  • Announcements
  • News
  • Features
  • Konqueror Embedded

Technical

Skip menu "Technical"
  • Konqueror FAQ
  • Java HOWTO
  • CSS Support

Download

Skip menu "Download"
  • Download Konqueror

Develop

Skip menu "Develop"
  • Developers
  • Investigating Bugs
  • Embedded Components Tutorial
    • Part 1
    • Part 2
    • Part 3
    • Part 4
    • Part 5
    • Part 6
    • Part 7

Global navigation links

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

Search:


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