Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
ParameterBase.h
1#ifndef CPARAMETERBASE_H
2#define CPARAMETERBASE_H
3
4#pragma once
5#include "ParameterNet.h"
6#include "ParameterProxy.h"
7#include "ParameterRecord.h"
8
44class CLIENT_EXPORT CParameterBase : public CParameterConnecter
45{
46 Q_OBJECT
47 Q_PROPERTY(QString Name READ GetName WRITE SetName NOTIFY sigNameChanged)
48 Q_PROPERTY(QString ServerName READ GetServerName WRITE SetServerName)
49 Q_PROPERTY(bool ShowServerName READ GetShowServerName
50 WRITE SetShowServerName NOTIFY sigShowServerNameChanged)
51 Q_PROPERTY(bool OnlyView READ GetOnlyView WRITE SetOnlyView)
52 Q_PROPERTY(bool LocalCursor READ GetLocalCursor WRITE SetLocalCursor)
53
54public:
55 explicit CParameterBase(QObject* parent = nullptr);
56 explicit CParameterBase(CParameterConnecter* parent,
57 const QString& szPrefix = QString());
58
59 const QString GetName() const;
60 void SetName(const QString& szName);
61
62 const QString GetServerName() const;
63 void SetServerName(const QString& szName);
64
65 bool GetShowServerName() const;
66 void SetShowServerName(bool NewShowServerName);
67
68 CParameterNet m_Net;
69 CParameterProxy m_Proxy;
70 CParameterRecord m_Record;
71
72 bool GetOnlyView() const;
73 void SetOnlyView(bool only);
74
75 const bool GetLocalCursor() const;
76 void SetLocalCursor(bool cursor);
77
78 const bool GetCursorPosition() const;
79 void SetCursorPosition(bool pos);
80
81 virtual const bool GetClipboard() const;
82 virtual void SetClipboard(bool c);
83
84 bool GetSupportsDesktopResize() const;
85 void SetSupportsDesktopResize(bool newSupportsDesktopResize);
86
87 bool GetLedState() const;
88 void SetLedState(bool state);
89
90Q_SIGNALS:
91 void sigNameChanged(const QString &name = QString());
92 void sigShowServerNameChanged();
93
94private:
95 int Init();
96
97 QString m_szName;
98
99 QString m_szServerName;
100 bool m_bShowServerName;
101 bool m_bOnlyView;
102 bool m_bLocalCursor;
103 bool m_bCursorPosition;
104 bool m_bClipboard;
105 bool m_bSupportsDesktopResize;
106 bool m_bLedState;
107
108 // Viewer
109public:
110 CFrmViewer::ADAPT_WINDOWS GetAdaptWindows();
111 void SetAdaptWindows(CFrmViewer::ADAPT_WINDOWS aw);
112Q_SIGNALS:
113 void sigAdaptWindowsChanged(CFrmViewer::ADAPT_WINDOWS aw);
114private:
115 CFrmViewer::ADAPT_WINDOWS m_AdaptWindows;
116 Q_PROPERTY(CFrmViewer::ADAPT_WINDOWS AdaptWindows READ GetAdaptWindows WRITE SetAdaptWindows NOTIFY sigAdaptWindowsChanged)
117public:
118 double GetZoomFactor() const;
119 void SetZoomFactor(double newZoomFactor);
120Q_SIGNALS:
121 void sigZoomFactorChanged(double newZoomFactor);
122private:
123 double m_dbZoomFactor;
124 Q_PROPERTY(double ZoomFactor READ GetZoomFactor WRITE SetZoomFactor NOTIFY sigZoomFactorChanged)
125
126 // CParameter interface
127protected:
128 virtual int OnLoad(QSettings &set) override;
129 virtual int OnSave(QSettings &set) override;
130
131 // CParameterConnecter interface
132 virtual void slotSetParameterClient() override;
133};
134
135#endif // CPARAMETERBASE_H
ADAPT_WINDOWS
The ADAPT_WINDOWS enum.
Definition FrmViewer.h:61
The interface of connecter parameters.
the parameters of connecter interface.
virtual void slotSetParameterClient()
Call after set CParameterClient.
Basic network parameters.
The proxy parameters.