File: ddbusinterface.h

package info (click to toggle)
dtkcore 5.7.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,728 kB
  • sloc: cpp: 22,021; ansic: 183; python: 68; xml: 58; makefile: 27; sh: 15
file content (41 lines) | stat: -rw-r--r-- 1,135 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

#pragma once
#include "dtkcore_global.h"
#include <QDBusAbstractInterface>

DCORE_BEGIN_NAMESPACE

class DDBusInterfacePrivate;

// Imported since 5.6.3
class DDBusInterface : public QDBusAbstractInterface
{
    Q_OBJECT

public:
    explicit DDBusInterface(const QString &service,
                            const QString &path,
                            const QString &interface,
                            const QDBusConnection &connection = QDBusConnection::sessionBus(),
                            QObject *parent = nullptr);
    virtual ~DDBusInterface() override;

    bool serviceValid() const;
    QString suffix() const;
    void setSuffix(const QString &suffix);

    QVariant property(const char *propName);
    void setProperty(const char *propName, const QVariant &value);

Q_SIGNALS:
    void serviceValidChanged(const bool valid) const;

private:
    QScopedPointer<DDBusInterfacePrivate> d_ptr;
    Q_DECLARE_PRIVATE(DDBusInterface)
    Q_DISABLE_COPY(DDBusInterface)
};
DCORE_END_NAMESPACE