Mobile Version

SpeedDial for KDE4

Tristan

SpeedDial for KDE4

About

Over a year ago a bug was filed in the KDE Bug Tracking System requesting a "Speed Dial" page for Konqueror. I made a comment myself, listing the required steps to implement this feature. But as I was busy at this time and did not use KDE 4.x (only in a virtual machine), I did not work on this issue myself. Since then, I switch to KDE4 completely and thus I wrote a prototype implementation.

The speed dial (codename ‘Tristan’) is implemented as a KPart and the file to be opened is the configuration file containing the URLs. Screenshots from web pages are retrieved by simply creating a KHTMLPart widget and rendering its content to a pixmap object.

Screenshots

The prototype looks as following. Initially, no images of web pages are available, so only blue globes mark the empty positions.

Screenshot

Gradually, the pages are loaded:

Screenshot

Finally, all web pages are available and shown:

Screenshot

URLs can be added from the bookmark menu (Konqueror's bookmarks)

Screenshot

Links

Source

Beware that the code is far from perfect. It produces warnings both during compilation time and when the part is used within Konqueror.

You can download the current version and test it on your KDE 4.x system. To use SpeedDial, you have to perform the following steps:

  1. Create a new directory debug inside the source folder. Go into this directory.
  2. Compile the source code
    cmake -DCMAKE_INSTALL_PREFIX=KDEDIR \
    -DCMAKE_BUILD_TYPE=debugfull ../ \
    && make

    where KDEDIR is the location of your KDE installation, e.g. /usr.
  3. Install the compiled code in your system
    sudo make install
    or without sudo as superuser (root).
  4. Rebuild the system configuration cache
    kbuildsycoca4 (as normal user)
  5. Configure the file association settings to use the embeddable Tristan part for the mime type application/x-tristan and its ending .trs.
    Setting file association - part 1Setting file association - part 2 Setting file association - part 3
  6. Restart Konqueror and open the file example.trs (supplied with the source code).

Issues

This speed dial piece of code is my first code for KDE 4. I used other parts from the KDE svn repository for inspiration as there is only little official documentation on KParts and browser extensions programming.

The code contains the following known issues:

  • Code produces warnings, is not well formatted and does not adhere any coding styles.
  • Embedding the part into Konqueror causes warnings about the QPainter object.
  • You have to open an application/x-tristan file to see the part.

I'd appreciate feedback on this code, especially from more experienced KDE programmers. Maybe the code can be included into the official codebase in the future...

Validome XHTML 1.0Valid XHTML 1.0!Valid CSS!The content of this page is licensed under a Creative Commons Attribution-Share Alike 3.0 License, unless noted otherwise.

Last Updated: 17-Jun-2013 Contact: Thomas FischerRSS feedRSS feed