DtkCore
DTK Core module
载入中...
搜索中...
未找到
dexportedinterface.h
1
// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2
//
3
// SPDX-License-Identifier: LGPL-3.0-or-later
4
5
#ifndef DEXPORTEDINTERFACE_H
6
#define DEXPORTEDINTERFACE_H
7
8
#include <dtkcore_global.h>
9
#include <dobject.h>
10
11
#include <QObject>
12
13
#include <functional>
14
15
DCORE_BEGIN_NAMESPACE
16
17
namespace
DUtil {
18
class
DExportedInterfacePrivate;
19
class
LIBDTKCORESHARED_EXPORT
DExportedInterface
:
public
QObject,
public
DObject
20
{
21
Q_OBJECT
22
public
:
23
explicit
DExportedInterface
(QObject *parent =
nullptr
);
24
~DExportedInterface
();
25
26
void
registerAction(
const
QString &action,
const
QString &description,
const
std::function<QVariant(QString)> handler =
nullptr
);
27
virtual
QVariant invoke(
const
QString &action,
const
QString ¶meters)
const
;
28
private
:
29
D_DECLARE_PRIVATE(
DExportedInterface
)
30
};
31
}
32
33
DCORE_END_NAMESPACE
34
35
#endif
Dtk::Core::DObject
Definition
dobject.h:25
Dtk::Core::DUtil::DExportedInterface
Definition
dexportedinterface.h:20
include
util
dexportedinterface.h
文档生成时间:2024-11-15-05:50 +00
Doxygen Version
1.9.8
制作者:deepin doc doc go SIG
文档使用CC-BY-4.0共享