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