Rabbit Remote Control
0.1.0-bate14
Toggle main menu visibility
Loading...
Searching...
No Matches
Service
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
11
class
CPluginService
;
12
37
class
SERVICE_EXPORT CService :
public
QObject
38
{
39
Q_OBJECT
40
41
public
:
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
76
protected
Q_SLOTS:
81
virtual
void
slotProcess
();
82
83
protected
:
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
CParameterService
Definition
ParameterService.h:10
CPluginService
The service plugin interface.
Definition
PluginService.h:27
CService::OnInit
virtual int OnInit()=0
Init service.
CService::Init
virtual int Init()
Load parameters, support non-Qt event loop.
Definition
Service.cpp:24
CService::slotProcess
virtual void slotProcess()
Support non-Qt event loop.
Definition
Service.cpp:61
CService::OnClean
virtual int OnClean()=0
Clean service.
CService::OnProcess
virtual int OnProcess()
Process service.
Definition
Service.cpp:81
Author: Kang Lin (kl222@126.com)
Copyright (c) Kang Lin Studios All Rights Reserved