Konqueror • About • Home

Embedded Components Tutorial - Page 1

By Kurt Granroth

This tutorial will demonstrate how to convert an existing KDE application (the aKtion! video player) into a component suitable for embedding inside of the Konqueror browser. This is accomplished in four simple steps with copious code listings and explanations.

Preface: Tutorial Conventions

Copyright

This tutorial is Copyright (C) 2000 Kurt Granroth <granroth@kde.org>. All rights reserved.

Version History

1.0 (Jan 03, 2000) - Initial Version
1.1 (Jan 25, 2000) - Converted to KParts
1.2 (Mar 03, 2000) - Change to new KParts::BrowserExtension

Sections

Most steps in the tutorial will have at least four sections:
The Plan
This section tells you what you will be doing in this step

Line By Line
This section will go into the important lines of code in some detail. It will address only those lines of code that need explanation.

Visible Result
This section contains a screenshot of the example app as it should appear after the current step

Practical Matters
If you are reading this tutorial, it is likely because you want to use this knowledge in your own application. Tutorials are necessarily very dependent on one example application, however. This section tries to bring to light any practical matters that you should keep in mind when transferring the procedure used for the example app to to your own app.

Things to Remember

Every now and then, a point will come up that the author thinks is very important to remember. This information will often be repeated in a small box like so:

Thing To Remember:
Important points will often appear in boxes like this

Code Listing

Most sections will have quite a bit of code listed. Individual lines will usually be listed like so:


some_code = new IndividualLine(of_code);

Listings that exceed a few lines of code (entire files, for instance) will be displayed in a box as shown below. The lines that the author feels are important will be highlighted in bold.

 Listing Description

class ExampleClass: public ParentClass
{
    Q_OBJECT
public:
    ExampleClass(QWidget *parent, const char *name);
    virtual ~AktionKonqView();

    virtual void someImportantMethod();

private:
    QWidget *widget;

    NewWidget *m_newWidget;
};

[ Edit ]

Global navigation links