Reply
Thread Tools
Posts: 145 | Thanked: 237 times | Joined on Mar 2010 @ Helsinki
#1
Mobile devices offer a lot of potential for remote control, but the user experience is pretty bad. Even if your video player can be accessed remotely, you have to find an app for your platform, install it, and then hope that it works like advertised. Some programs even offer bad, HTML-based remote user interfaces.

This doesn't encourage users to use their devices like this, and application developers may think it's too hard to add such features. You can pretty much forget about getting remote control in many places it would be useful, like photo album slideshows.

And that's why I've started writing a remote GUI library! I just applied for Garage hosting, but I thought I'd start this thread immediately since I have a few screenshots. (Edit: hosting approved. Project page, SVN.)

It works like this:

1. The client scans the local network for remotely controllable software and presents a simple list.
2. The user selects a program.
3. The client downloads a QtScript file and executes it.
4. The file creates a GUI and communicates with the server using signals and slots.

I have a basic example working. I duplicated (over the network) the Play-button from the Music Player example that comes with Qt Creator. Here are some screenshots.

In my next post, I'll show how easy this is for the application developer.
Attached Images
   

Last edited by jnwi; 2010-08-24 at 19:32.
 
Posts: 145 | Thanked: 237 times | Joined on Mar 2010 @ Helsinki
#2
This is how little code was needed to create that button:

New class inheriting from my library:

Code:
#ifndef QMPKITESERVER_H
#define QMPKITESERVER_H

#include <QObject>
#include "kiteserver.h"


class QmpKiteServer : public kiteserver
{
    Q_OBJECT
public:
    QmpKiteServer(QObject *parent);

signals:
    void play();

public slots:

};

#endif // QMPKITESERVER_H
The constructor is trivial and omitted.

Then, this is added to the main application:

Code:
    kite = new QmpKiteServer(this);

    QString script = "function play() {kiteConn.emitRemote(\"play\", \"\");} w = new QWidget; mainL = new QVBoxLayout; pl = new QPushButton(); pl.text=\">\"; w.setLayout(mainL); mainL.addWidget(pl); pl.clicked.connect(play); w.show();";

    kite->init("QMp", "test", script, kite);

    connect(kite, SIGNAL(play()), playAction, SIGNAL(triggered()));

    kite->start();
And that's it!

The contents of the script may be a bit hard to read due to the way I posted this, but it simply creates a layout, button and signal handler that passes on the signal to the server.

I'm not documenting the rest of the API here, because no one should rely on it yet.

But if you're interested in helping, get in touch! I could use help at least with security, discovery (the list above is hard coded), and GUI programming for more test apps.
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:44.