Home · Modules · Classes · Namespaces · Functions

QxtWebSlotService Class Reference
[QxtWeb module]

The QxtWebSlotService class provides a Slot based webservice More...

    #include <QxtWebSlotService>

Inherits QxtAbstractWebService.

Public Functions

Protected Functions

Additional Inherited Members


Detailed Description

The QxtWebSlotService class provides a Slot based webservice

A WebService that resolves the first part of the path to a slot name and passes the rest as arguments.

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

/hello/foo<br> will output<br> &lth1&gtFoo&lt/h1&gt<br>

See also QxtAbstractWebService.


Member Function Documentation

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

Constructs a new QxtWebSlotService with sm and parent.

QUrl QxtWebSlotService::self ( QxtWebRequestEvent * event )   [protected]

Returns the current absolute url of this service depending on the request event.


Copyright © 2007-2010 Qxt Foundation
Qxt 0.6.1