Rabbit Remote Control 0.1.0-bate8
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
COperateDesktop Class Referenceabstract

Remote desktop operate interface. More...

#include <OperateDesktop.h>

Inheritance diagram for COperateDesktop:
Inheritance graph
[legend]
Collaboration diagram for COperateDesktop:
Collaboration graph
[legend]

Public Slots

virtual int Start () override
 
virtual int Stop () override
 
virtual void slotScreenShot ()
 

Public Member Functions

 COperateDesktop (CPlugin *plugin)
 
virtual CParameterBaseGetParameter () const
 Get parameter.
 
virtual int SetParameter (CParameterBase *p)
 Set parameter pointer.
 
virtual const QString Id () override
 
virtual const QString Name () override
 [The name of the desktop operate]
 
virtual const QString Description () override
 [The name of the desktop operate]
 
virtual const qint16 Version () const override
 [The description of the desktop operate]
 
virtual QWidget * GetViewer () override
 Get Viewer.
 
- Public Member Functions inherited from COperate
 COperate (CPlugin *plugin)
 
virtual int OpenDialogSettings (QWidget *parent=nullptr)
 Open settings dialog.
 
virtual QMenu * GetMenu (QWidget *parent=nullptr)
 Get menu.
 
virtual const QString Protocol () const
 
virtual const QIcon Icon () const
 
virtual const QString GetTypeName () const
 
virtual QString GetSettingsFile ()
 
virtual int SetSettingsFile (const QString &szFile)
 
virtual CStatsGetStats ()
 Get statistics.
 
virtual CSecurityLevel::Levels GetSecurityLevel () const
 Get Security Level.
 
virtual int Start ()=0
 Start.
 
virtual int Stop ()=0
 Stop.
 

Protected Member Functions

virtual Q_INVOKABLE CBackendInstanceBackend ()=0
 New CBackend.
 
virtual int SetGlobalParameters (CParameterPlugin *pPara) override
 Set Global Parameters.
 
virtual int Initial () override
 Initial parameters and resource.
 
virtual int Clean () override
 Clean parameters and resource.
 
virtual Q_INVOKABLE int Load (QSettings &set) override
 Load parameters.
 
virtual Q_INVOKABLE int Save (QSettings &set) override
 Save parameters.
 
virtual int InitialMenu ()
 
virtual QString ServerName ()
 Current connect server name (remote desktop name, if not present, then IP:PORT).
 
- Protected Member Functions inherited from COperate
Q_INVOKABLE CPluginGetPlugin () const
 Get plugin.
 
virtual Q_INVOKABLE int Load (QString szFile=QString())
 Load parameters from file.
 
virtual Q_INVOKABLE int Save (QString szFile=QString())
 Save parameters to file.
 

Protected Attributes

QAction * m_pMenuZoom
 
QAction * m_pZoomToWindow
 
QAction * m_pZoomAspectRatio
 
QAction * m_pZoomOriginal
 
QAction * m_pZoomIn
 
QAction * m_pZoomOut
 
QSpinBox * m_psbZoomFactor
 
QAction * m_pScreenShot
 
- Protected Attributes inherited from COperate
QMenu m_Menu
 
QAction * m_pActionSettings
 

Private Slots

void slotValueChanged (int v)
 emit by zoom menu in the class
 
void slotShortcutCtlAltDel ()
 
void slotShortcutLock ()
 
virtual void slotSetServerName (const QString &szName)
 [Get server name]
 

Private Member Functions

int LoadAdaptWindows ()
 

Private Attributes

CParameterBasem_pPara
 
CBackendThreadm_pThread
 
CFrmViewerm_pFrmViewer
 
CFrmScrollm_pScroll
 
QString m_szServerName
 

Additional Inherited Members

- Signals inherited from COperate
void sigViewerFocusIn (QWidget *pView)
 The view is focus.
 
void sigFullScreen (bool bFullScreen)
 Full screen.
 
void sigUpdateName (const QString &szName)
 
void sigUpdateParameters (COperate *pOperate)
 Update parameters, notify application to save or show parameters.
 
void sigError (const int nError, const QString &szError)
 Triggered when an error is generated.
 
void sigInformation (const QString &szInfo)
 Show information in main windows.
 
void sigShowMessageBox (const QString &title, const QString &message, const QMessageBox::Icon &icon=QMessageBox::Information)
 Trigger the display of a message dialog (QMessageBox) in the main thread from a background thread without blocking the background thread.
 
void sigClipBoardChanged ()
 
void sigSecurityLevel ()
 Triggered when the security level changes.
 
void sigRunning ()
 Start success signal.
 
void sigStop ()
 Notify the user to stop.
 
void sigFinished ()
 Successful disconnection signal.
 
- Protected Slots inherited from COperate
void slotUpdateName ()
 
void slotSetSecurityLevel (CSecurityLevel::Levels level)
 
- Static Protected Member Functions inherited from COperate
static QObject * createObject (const QString &className, QObject *parent=NULL)
 Create Object.
 

Detailed Description

Remote desktop operate interface.

It starts a background thread by default. It implements a background thread to handle a operate. Can be used with plugins whose plugin interface derives from CPluginClient for operate is blocking model.

Principle: Start a background thread (CBackendThread) in Start() . Call InstanceBackend() in the thread to instantiate CBackend, and start the timer in CBackend::Start(). This timer is called in the background thread. Through the operation of the timer, start a non-Qt event loop (that is, normal loop processing. May block), See CBackend. And CBackend supports the Qt event (the signal-slot mechanism of QObject. no-block).

Sequen diagram:

Note
The interface only is implemented by plug-in
The specific plug-in needs to implement the following interface.
  1. Implement InstanceConnect() . Generate a connection object. The connection object runs in a background thread.
See also
CBackend CBackendThread COperate CPlugin CFrmViewer

Definition at line 68 of file OperateDesktop.h.

Constructor & Destructor Documentation

◆ COperateDesktop()

COperateDesktop::COperateDesktop ( CPlugin plugin)
explicit
Parameters
pluginThe plugin pointer must be specified as the corresponding CPlugin derived class
Note
If request the global parameters of the plugin, Please instantiate the parameters and call COperateDesktop::SetParameter in the derived class( or Initial() ) to set the parameters pointer. If you are sure the parameter does not need CParameterClient. please overload the COperate::SetGlobalParameters in the derived class. don't set it. Add commentMore actions
See also
CManager::CreateConnecter SetGlobalParameters SetParameter CParameterOperate CParameterClient

◆ ~COperateDesktop()

COperateDesktop::~COperateDesktop ( )
virtual

Definition at line 35 of file OperateDesktop.cpp.

Member Function Documentation

◆ Clean()

int COperateDesktop::Clean ( )
overrideprotectedvirtual

Clean parameters and resource.

See also
CManager::DeleteOperate

Reimplemented from COperate.

Reimplemented in COperateFreeRDP, COperateLibVNCServer, COperatePlayer, and COperateVnc.

Definition at line 212 of file OperateDesktop.cpp.

◆ Description()

const QString COperateDesktop::Description ( )
overridevirtual

[The name of the desktop operate]

[The description of the desktop operate]

Reimplemented from COperate.

Definition at line 117 of file OperateDesktop.cpp.

◆ GetParameter()

CParameterBase * COperateDesktop::GetParameter ( ) const
virtual

Get parameter.

[Desktop set global paramets]

Definition at line 446 of file OperateDesktop.cpp.

◆ GetViewer()

QWidget * COperateDesktop::GetViewer ( )
overridevirtual

Get Viewer.

Returns
QWidget*: the ownership is a instance of this class or its derivative class
Note
If you implement the view yourself, you need to disable the view at the beginning and allow the view after sigRun.
See also
sigRunning CFrmViewer::CFrmViewer

Implements COperate.

Definition at line 376 of file OperateDesktop.cpp.

◆ Id()

const QString COperateDesktop::Id ( )
overridevirtual

Reimplemented from COperate.

Definition at line 40 of file OperateDesktop.cpp.

◆ Initial()

int COperateDesktop::Initial ( )
overrideprotectedvirtual

Initial parameters and resource.

Note
Call before Load()
See also
CManager::CreateOperate Load

Reimplemented from COperate.

Reimplemented in COperateFreeRDP, COperateLibVNCServer, COperatePlayer, and COperateVnc.

Definition at line 189 of file OperateDesktop.cpp.

◆ InitialMenu()

int COperateDesktop::InitialMenu ( )
protectedvirtual

Definition at line 225 of file OperateDesktop.cpp.

◆ InstanceBackend()

virtual Q_INVOKABLE CBackend * COperateDesktop::InstanceBackend ( )
protectedpure virtual

New CBackend.

the ownership is caller. if don't use, the caller must delete it.

Implemented in COperateFreeRDP, COperateLibVNCServer, COperatePlayer, and COperateVnc.

◆ Load()

int COperateDesktop::Load ( QSettings &  set)
overrideprotectedvirtual

Load parameters.

Implements COperate.

Definition at line 516 of file OperateDesktop.cpp.

◆ LoadAdaptWindows()

int COperateDesktop::LoadAdaptWindows ( )
private

Definition at line 487 of file OperateDesktop.cpp.

◆ Name()

const QString COperateDesktop::Name ( )
overridevirtual

[The name of the desktop operate]

Reimplemented from COperate.

Definition at line 86 of file OperateDesktop.cpp.

◆ Save()

int COperateDesktop::Save ( QSettings &  set)
overrideprotectedvirtual

Save parameters.

Implements COperate.

Definition at line 539 of file OperateDesktop.cpp.

◆ ServerName()

QString COperateDesktop::ServerName ( )
protectedvirtual

Current connect server name (remote desktop name, if not present, then IP:PORT).

[Get server name]

eg: Server name or Ip:Port

Returns
Current connect server name.
See also
slotSetServerName

Reimplemented in COperateVnc.

Definition at line 632 of file OperateDesktop.cpp.

◆ SetGlobalParameters()

int COperateDesktop::SetGlobalParameters ( CParameterPlugin pPara)
overrideprotectedvirtual

Set Global Parameters.

[Desktop set global paramets]

Parameters
pPara
Returns

Implements COperate.

Definition at line 410 of file OperateDesktop.cpp.

◆ SetParameter()

int COperateDesktop::SetParameter ( CParameterBase p)
virtual

Set parameter pointer.

Note
establishes the parameter first, and then calls this function in the constructor or Initial() to set the parameter pointer

Definition at line 451 of file OperateDesktop.cpp.

◆ slotScreenShot

void COperateDesktop::slotScreenShot ( )
virtualslot

Definition at line 592 of file OperateDesktop.cpp.

◆ slotSetServerName

void COperateDesktop::slotSetServerName ( const QString &  szName)
privatevirtualslot

[Get server name]

Note
The slot only is used by CBackendDesktop::SetConnect()

Definition at line 658 of file OperateDesktop.cpp.

◆ slotShortcutCtlAltDel

void COperateDesktop::slotShortcutCtlAltDel ( )
privateslot

Definition at line 607 of file OperateDesktop.cpp.

◆ slotShortcutLock

void COperateDesktop::slotShortcutLock ( )
privateslot

Definition at line 620 of file OperateDesktop.cpp.

◆ slotValueChanged

void COperateDesktop::slotValueChanged ( int  v)
privateslot

emit by zoom menu in the class

Definition at line 584 of file OperateDesktop.cpp.

◆ Start

int COperateDesktop::Start ( )
overridevirtualslot

Definition at line 381 of file OperateDesktop.cpp.

◆ Stop

int COperateDesktop::Stop ( )
overridevirtualslot

Definition at line 396 of file OperateDesktop.cpp.

◆ Version()

const qint16 COperateDesktop::Version ( ) const
overridevirtual

[The description of the desktop operate]

Implements COperate.

Reimplemented in COperateFreeRDP, COperateLibVNCServer, COperatePlayer, and COperateVnc.

Definition at line 184 of file OperateDesktop.cpp.

Member Data Documentation

◆ m_pFrmViewer

CFrmViewer* COperateDesktop::m_pFrmViewer
private

Definition at line 165 of file OperateDesktop.h.

◆ m_pMenuZoom

QAction* COperateDesktop::m_pMenuZoom
protected

Definition at line 194 of file OperateDesktop.h.

◆ m_pPara

CParameterBase* COperateDesktop::m_pPara
private

Definition at line 163 of file OperateDesktop.h.

◆ m_psbZoomFactor

QSpinBox* COperateDesktop::m_psbZoomFactor
protected

Definition at line 200 of file OperateDesktop.h.

◆ m_pScreenShot

QAction* COperateDesktop::m_pScreenShot
protected

Definition at line 201 of file OperateDesktop.h.

◆ m_pScroll

CFrmScroll* COperateDesktop::m_pScroll
private

Definition at line 166 of file OperateDesktop.h.

◆ m_pThread

CBackendThread* COperateDesktop::m_pThread
private

Definition at line 164 of file OperateDesktop.h.

◆ m_pZoomAspectRatio

QAction* COperateDesktop::m_pZoomAspectRatio
protected

Definition at line 196 of file OperateDesktop.h.

◆ m_pZoomIn

QAction* COperateDesktop::m_pZoomIn
protected

Definition at line 198 of file OperateDesktop.h.

◆ m_pZoomOriginal

QAction* COperateDesktop::m_pZoomOriginal
protected

Definition at line 197 of file OperateDesktop.h.

◆ m_pZoomOut

QAction* COperateDesktop::m_pZoomOut
protected

Definition at line 199 of file OperateDesktop.h.

◆ m_pZoomToWindow

QAction* COperateDesktop::m_pZoomToWindow
protected

Definition at line 195 of file OperateDesktop.h.

◆ m_szServerName

QString COperateDesktop::m_szServerName
private

Definition at line 184 of file OperateDesktop.h.


The documentation for this class was generated from the following files: