KDELirc is back in kdeutils

Get out your infrared remote control, wipe the dust from it and grap for some fresh batteries! (Hm, are there solardriven infrared remotecontrols?) With KDE 4.3 you will be able to command the programs on your computer from your armchair again. KDELirc (homepage, code) has returned to KDE, is back in the kdeutils module.

IRKick, the applet of KDELirc, in KDE4

It was almost six years ago, the 27th of May 2003, when Gav Wood moved KDELirc into the KDE repository:

“Initial import of kdelirc, an advanced KDE LIRC system;
Code mostly works on my system and is being uploaded here in order to ease collaboration and testing.”

Following it made its first public release on the 3rd of February 2004, as part of KDE 3.2, sharing a debut with such programs as Kontact, Kopete, KGpg, and KWallet (which may be the reason why it is missing in the changelog then, oh well).

It was not until the great porting to KDE4 that KDELirc then had to be dropped from the main branch of the kdeutils module, as the old maintainers had lost time (or their remote controls?), so noone finished the little but important details in the port to the KDE4 platform (The KDE3 version of course is still available).

Then Michael Zanetti and Frank Scheffold, who obviously still own some remote controls and armchairs, but also like to run KDE4, took over and have been giving the code their love and care, that finally KDELirc is able to enjoy the KDE4 platform, too. So there it is, back at home. Now that the initial port is completed, Michael and Frank have quite some ideas how to evolve KDELirc from here.

So, armchair riders, be prepared to get more. By getting out of your armchair and helping 😉 And if is only by finding out the data for your remote control, so it can be added to LIRC or KDELirc. Check out the KDE 4.3 Beta1, soon coming to a mirror near you, and open the System Settings, look for “Remote Control” and see yourself. Even better would be to make sure LIRC also works on *BSD and OpenSolaris. If you are ambitious, you could try to write a backend for ReactOS. Perhaps even Windows or OS X, if you really need to.

Getting tooltipped how cute Qt is…

I have seen others praising Qt. Thought they are just a little bit too euphoric. But then I never really had to code against the Win32 API or to use AWT, so perhaps I miss some experience in hell to recognize heaven.

And looking at Qt4 I especially miss to see brilliance if looking at the printing framework or the QDockWidget system, those are not really pleasing me and my needs. And connections of signals and slots not being checked at compile-time has always annoyed me.

But now and then I find solutions that are really making me happy:
Yesterday I wanted to add tooltip support to bookmarks in Okteta, so if hovering over a bookmark mark in the view the name of the bookmark (now editable) would be shown in a tooltip. After I had thought a while about how to achieve this, involving QTimer and mouse events, I was not too satisfied with my ideas and hoped this could be done easier. So I used a well known index service and was pointed to this coding example by the Trolls themselves, which showed me how to do this with just a few lines in a very straightforward way. I liked this. Thank you who made this possible 🙂

It basically boiled down to (real code needs refactoring):


bool AbstractByteArrayViewPrivate::event( QEvent* event )
{
    Q_Q( AbstractByteArrayView );

    if( event->type() == QEvent::ToolTip )
    {
        QHelpEvent* helpEvent = static_cast( event );

        KHECore::Bookmark* bookmark = 0;

        KHECore::Bookmarkable* bookmarks = qobject_cast( mByteArrayModel );
        if( bookmarks )
        {
            const int index = indexByPoint( helpEvent->pos() );
            if( index != -1 )
                bookmark = bookmarks->bookmarkFor( index );
        }

        if( bookmark) )
            QToolTip::showText( helpEvent->globalPos(), bookmark->name() );
        else
        {
            QToolTip::hideText();
            event->ignore();
        }

        return true;
     }

    return q->ColumnsView::event( event );
}

So with KDE 4.3 you will have tooltips if hovering over bookmarks marks in Okteta. Have a good look at them, because you will loose all of them if closing the file they are set for, because storing the bookmarks will not be done in time for the hard feature freeze and has to wait for at least KDE 4.4, yes, a pity.