QxtWebSlotService Class Reference
[QxtWeb module]

Provides a Slot based webservice. More...

 #include <QxtWebSlotService>

Inherits QxtAbstractWebService.

Public Functions

Protected Functions


Detailed Description

Implements the behaviour of the old QxtWebController from qxt 0.3.
path names are resolved to slot names.

class MyService : public QxtWebSlotService
{
    Q_OBJECT
    public slots:
     void hello(QxtWebRequestEvent* event, QString a)
     {
         postEvent(new QxtWebPageEvent(event->sessionID, event->requestID, "<h1>"+a.toUtf8()+"</h1>));
     }
}

/path/to/service/hello/foo
will output
<h1>Foo</h1>

see See also: QxtAbstractWebService

Member Documentation

QxtWebSlotService ( QxtAbstractWebSessionManager * sm , QObject * parent = 0 )




QUrl self ( QxtWebRequestEvent * event )

returns the current absolute url of this service depending on the request






Copyright © 2007 Qxt Foundation Trademarks
Qt Extension Library 0.4