Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
Desktop.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CDESKTOP_H
4#define CDESKTOP_H
5
6#pragma once
7
8#include "service_export.h"
9
10#include <QRect>
11#include <QImage>
12#include <QObject>
13
14class SERVICE_EXPORT CDesktop : public QObject
15{
16 Q_OBJECT
17public:
18 explicit CDesktop(QObject *parent = nullptr){};
19 virtual ~CDesktop(){};
20
21 static CDesktop* Instance();
22
23 virtual int Width() = 0;
24 virtual int Height() = 0;
25 virtual QImage GetDesktop() = 0;
26 virtual QImage GetDesktop(int x, int y, int width, int height) = 0;
27 virtual QImage GetCursor(QPoint &pos, QPoint &posHot) = 0;
28 virtual QPoint GetCursorPosition() = 0;
29 virtual bool GetHasCursor() const
30 {
31 return m_bHasCursor;
32 }
33 virtual void SetHasCursor(bool newHaveCursor)
34 {
35 m_bHasCursor = newHaveCursor;
36 }
37
38Q_SIGNALS:
39 void sigUpdate(QImage desktop, QRect rect);
40
41private:
42 bool m_bHasCursor;
43};
44
45#endif // CDESKTOP_H