/thirdparty/qxt/qxtweb-standalone/example/myservice.h
http://github.com/tomahawk-player/tomahawk · C Header · 23 lines · 18 code · 5 blank · 0 comment · 0 complexity · f94723d96aedacf1f095e387aea8b356 MD5 · raw file
- #ifndef MYSERVICE
- #define MYSERVICE
- #include <QxtHttpServerConnector>
- #include <QxtHttpSessionManager>
- #include <QxtWebSlotService>
- #include <QxtWebPageEvent>
- class MyService : public QxtWebSlotService{
- Q_OBJECT;
- public:
- MyService(QxtAbstractWebSessionManager * sm, QObject * parent = 0 ): QxtWebSlotService(sm,parent){
- }
- public slots:
- void index(QxtWebRequestEvent* event)
- {
- postEvent(new QxtWebPageEvent(event->sessionID, event->requestID, "<h1>It Works!</h1>"));
- }
- };
- #endif