Imported existing sources
This commit is contained in:
12
helloworldapplication.cpp
Normal file
12
helloworldapplication.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "helloworldapplication.h"
|
||||
|
||||
HelloWorldApplication::HelloWorldApplication(const QJsonObject &config, QObject *parent) :
|
||||
WebApplication(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void HelloWorldApplication::start()
|
||||
{
|
||||
|
||||
}
|
15
helloworldapplication.h
Normal file
15
helloworldapplication.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "webapplication.h"
|
||||
|
||||
class QJsonObject;
|
||||
|
||||
class HelloWorldApplication : public WebApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
HelloWorldApplication(const QJsonObject &config, QObject *parent = Q_NULLPTR);
|
||||
|
||||
void start() Q_DECL_OVERRIDE;
|
||||
};
|
20
helloworldplugin.cpp
Normal file
20
helloworldplugin.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "helloworldplugin.h"
|
||||
|
||||
#include "helloworldapplication.h"
|
||||
|
||||
HelloWorldPlugin::HelloWorldPlugin(QObject *parent) :
|
||||
WebPlugin(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString HelloWorldPlugin::pluginName() const
|
||||
{
|
||||
return QStringLiteral("helloworld");
|
||||
}
|
||||
|
||||
WebApplication *HelloWorldPlugin::createApplication(const QJsonObject &config) const
|
||||
{
|
||||
return new HelloWorldApplication(config);
|
||||
}
|
||||
|
16
helloworldplugin.h
Normal file
16
helloworldplugin.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "webplugin.h"
|
||||
|
||||
class HelloWorldPlugin : public WebPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "dbsoftware.webserver.plugin/1.0" FILE "helloworldplugin.json")
|
||||
Q_INTERFACES(WebPlugin)
|
||||
|
||||
public:
|
||||
HelloWorldPlugin(QObject *parent = Q_NULLPTR);
|
||||
|
||||
QString pluginName() const Q_DECL_OVERRIDE;
|
||||
WebApplication *createApplication(const QJsonObject &config) const Q_DECL_OVERRIDE;
|
||||
};
|
0
helloworldplugin.json
Normal file
0
helloworldplugin.json
Normal file
19
helloworldplugin.pro
Normal file
19
helloworldplugin.pro
Normal file
@@ -0,0 +1,19 @@
|
||||
QT += core network
|
||||
|
||||
DBLIBS += webserverlib
|
||||
|
||||
HEADERS += helloworldplugin.h \
|
||||
helloworldapplication.h
|
||||
|
||||
SOURCES += helloworldplugin.cpp \
|
||||
helloworldapplication.cpp
|
||||
|
||||
FORMS +=
|
||||
|
||||
RESOURCES +=
|
||||
|
||||
TRANSLATIONS +=
|
||||
|
||||
OTHER_FILES += helloworldplugin.json
|
||||
|
||||
include(../plugin.pri)
|
Reference in New Issue
Block a user