You are not logged in.

1

Monday, January 24th 2011, 12:11pm

(Brainstorming) Makeing Qt ready for the network ?

Could it be possible to make Qt ready for network transparency ?
Imagine you would add a virtual commandline interpreter to QWidget.

class QWidget : public QObject
{
//<snip>
public slots:
virtual void commandlineInterpreter(QString *command);
//<snip>

public:
signals:
virtual void commandlineResponse(QString *response);
//<snip>
};

Now you could tell every widget what it should do.
Examples:
command = setGeometry(10,10,200,100)
response = ok>
command = setToolTip("hello world")
response = ok>
command = hide()
response = ok>
command = isVisible()
response = true>
command = anUnimplementedFunction("nonsens")
command = not implemented>
...

In our project http://pvbrowser.org we do something similar but
we can't change QWidget.
Instead we have implemented a global commandline interpreter and
have to code something like the above for each widget by hand.

Of course it would be much easier with an commandline interpreter like the above.

What do you think about such a feature ?
Wouldn't it be great ?
regards, Rainer Lehrig
http://pvbrowser.org

2

Monday, January 24th 2011, 3:25pm

Can that be accomplished with the qt's scripting module ? Exposing the properties to JavaScript?
--
My programs never have bugs, they just develop random features.
--
C/C++ ... I don't see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste - fat_boy(code project)

3

Monday, January 24th 2011, 5:55pm

> Can that be accomplished with the qt's scripting module ? Exposing the properties to JavaScript?
Eventually this could work.
I will have a look at it.

For me it must be possible to call scripting code giving the code a QWidget* pointer.
I was thinking on using something like http://www.lua.org/ which can be embedded in a C/C++ host program.
If the Qt Widgets could be wrapped with http://swig.org we were done.
But i doubt if it is possible because of signals and slots.
regards, Rainer Lehrig
http://pvbrowser.org

4

Monday, January 24th 2011, 6:16pm

as far as i know you can and you can also use signal and slots in JavaScript code
--
My programs never have bugs, they just develop random features.
--
C/C++ ... I don't see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste - fat_boy(code project)