mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
添加dbus功能
This commit is contained in:
12
src/dbus/dbussparkstoreservice.cpp
Normal file
12
src/dbus/dbussparkstoreservice.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "dbussparkstoreservice.h"
|
||||
#include <QDebug>
|
||||
DBusSparkStoreService::DBusSparkStoreService(QObject *parent)
|
||||
: QDBusAbstractAdaptor(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DBusSparkStoreService::activeWindow(const QString & arg)
|
||||
{
|
||||
emit sigOpenUrl(arg);
|
||||
}
|
||||
24
src/dbus/dbussparkstoreservice.h
Normal file
24
src/dbus/dbussparkstoreservice.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef DBUSSPARKSTORESERVICE_H
|
||||
#define DBUSSPARKSTORESERVICE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
||||
class Wallpaper;
|
||||
class DBusSparkStoreService : public QDBusAbstractAdaptor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "com.gitee.spark.store")
|
||||
public:
|
||||
explicit DBusSparkStoreService(QObject *parent);
|
||||
|
||||
signals :
|
||||
void sigOpenUrl(const QString &url);
|
||||
|
||||
public Q_SLOTS:
|
||||
void activeWindow(const QString &arg);
|
||||
|
||||
};
|
||||
|
||||
#endif // DBUSSPARKSTORESERVICE_H
|
||||
Reference in New Issue
Block a user