mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 12:22:05 +08:00
进度更新
This commit is contained in:
14
plugin/dtkplugin/CMakeLists.txt
Normal file
14
plugin/dtkplugin/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
set(PLUGIN_SOURCE
|
||||
spkdtkplugin.h
|
||||
spkdtkplugin_impl.h
|
||||
spkdtkplugin.cpp)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(dtkwidget REQUIRED IMPORTED_TARGET dtkwidget)
|
||||
pkg_check_modules(dtkgui REQUIRED IMPORTED_TARGET dtkgui)
|
||||
pkg_check_modules(dtkcore REQUIRED IMPORTED_TARGET dtkcore)
|
||||
add_library(spkdtkplugin SHARED ${PLUGIN_SOURCE})
|
||||
|
||||
target_link_libraries(spkdtkplugin PkgConfig::dtkwidget PkgConfig::dtkgui PkgConfig::dtkcore ${REQUIRED_LIBS_QUALIFIED})
|
||||
|
||||
install(TARGETS spkdtkplugin LIBRARY DESTINATION lib)
|
||||
11
plugin/dtkplugin/spkdtkplugin.cpp
Normal file
11
plugin/dtkplugin/spkdtkplugin.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <DGuiApplicationHelper>
|
||||
#include <DPlatformWindowHandle>
|
||||
#include "spkdtkplugin_impl.h"
|
||||
|
||||
using Dtk::Widget::DPlatformWindowHandle;
|
||||
|
||||
void SpkDtkPluginImpl::addWindow(QWidget *w, QObject *parent)
|
||||
{
|
||||
DPlatformWindowHandle *h = new DPlatformWindowHandle(w, parent);
|
||||
Q_UNUSED(h);
|
||||
}
|
||||
15
plugin/dtkplugin/spkdtkplugin.h
Normal file
15
plugin/dtkplugin/spkdtkplugin.h
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class SpkDtkPlugin
|
||||
{
|
||||
public:
|
||||
virtual ~SpkDtkPlugin() = default;
|
||||
|
||||
virtual void addWindow(QWidget* w, QObject* parent) = 0;
|
||||
};
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_DECLARE_INTERFACE(SpkDtkPlugin, "org.spark-store.client.dtkplugin")
|
||||
QT_END_NAMESPACE
|
||||
16
plugin/dtkplugin/spkdtkplugin_impl.h
Normal file
16
plugin/dtkplugin/spkdtkplugin_impl.h
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QtPlugin>
|
||||
#include "spkdtkplugin.h"
|
||||
|
||||
class SpkDtkPluginImpl : public QObject, SpkDtkPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.spark-store.client.dtkplugin")
|
||||
Q_INTERFACES(SpkDtkPlugin)
|
||||
|
||||
public:
|
||||
void addWindow(QWidget* w, QObject* parent) override;
|
||||
};
|
||||
Reference in New Issue
Block a user