Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
Service.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CSERVICE_H_KL_2021_07_13
4#define CSERVICE_H_KL_2021_07_13
5
6#pragma once
7
8#include "ParameterService.h"
9#include <QSharedPointer>
10
11class CPluginService;
12
37class SERVICE_EXPORT CService : public QObject
38{
39 Q_OBJECT
40
41public:
42 explicit CService(CPluginService *plugin);
43 virtual ~CService();
44
51 virtual int Init();
52 virtual int Clean();
53
54 CParameterService* GetParameters();
55#ifdef HAVE_GUI
70 virtual QWidget* GetParameterWidget(QWidget* parent = nullptr) = 0;
71#endif
72
73 virtual int LoadConfigure(const QString& szDir = QString());
74 virtual int SaveConfigure(const QString& szDir = QString());
75
76protected Q_SLOTS:
81 virtual void slotProcess();
82
83protected:
96 virtual int OnInit() = 0;
103 virtual int OnClean() = 0;
114 virtual int OnProcess();
115
116 CParameterService* m_pPara;
117 CPluginService* m_pPlugin;
118};
119
120#endif // CSERVICE_H_KL_2021_07_13
The service plugin interface.
The service interface.
Definition Service.h:38
virtual int OnInit()=0
Init service.
virtual int OnClean()=0
Clean service.