File: kupengine.h

package info (click to toggle)
kup-backup 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,576 kB
  • sloc: cpp: 8,422; xml: 311; makefile: 6; sh: 3
file content (38 lines) | stat: -rw-r--r-- 947 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
// SPDX-FileCopyrightText: 2020 Simon Persson <simon.persson@mykolab.com>
//
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL

#ifndef KUPENGINE_H
#define KUPENGINE_H

#include <QtGlobal>

#if QT_VERSION_MAJOR == 5
#include <Plasma/DataEngine>
#else
#include <Plasma5Support/DataEngine>
namespace Plasma = Plasma5Support;
#endif

#include <QLocalSocket>

class KupEngine : public Plasma::DataEngine
{
    Q_OBJECT
public:
    KupEngine(QObject *pParent, const QVariantList &pArgs);
    Plasma::Service *serviceForSource(const QString &pSource) override;

public slots:
    //	void refresh();
    void processData();
    void checkConnection(QLocalSocket::LocalSocketState pState);

private:
    void setPlanData(int i, const QJsonObject &pPlan, const QString &pKey);
    void setCommonData(const QJsonObject &pCommonStatus, const QString &pKey);
    QLocalSocket *mSocket;
    QString mSocketName;
};

#endif // KUPENGINE_H