Rabbit Remote Control 0.0.37
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 Q_INVOKABLE CBackendInstanceBackend ()=0
 New CBackend.
 
virtual CParameterBaseGetParameter ()
 Get parameter.
 
virtual int SetParameter (CParameterBase *p)
 Set parameter pointer.
 
virtual const QString Id () override
 Identity.
 
virtual const QString Name () override
 Name.
 
virtual const QString Description () override
 Description.
 
virtual const qint16 Version () const override
 Version.
 
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 SecurityLevel GetSecurityLevel ()
 
virtual QString GetSecurityLevelString ()
 
virtual QColor GetSecurityLevelColor ()
 
virtual int Start ()=0
 Start.
 
virtual int Stop ()=0
 Stop.
 
virtual const QString Protocol () const
 Protocol.
 
virtual const QIcon Icon () const
 Icon.
 
virtual const QString GetTypeName () const
 Get type name.
 
virtual QString GetSettingsFile ()
 
virtual int SetSettingsFile (const QString &szFile)
 

Protected Member Functions

virtual int SetGlobalParameters (CParameterPlugin *pPara) override
 Apply the global parameters of the plug-in.
 
virtual int Initial () override
 Initial parameters and resource.
 
virtual int Clean () override
 Clean parameters and resource.
 
virtual int Load (QSettings &set) override
 Load parameters.
 
virtual 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)
 

Private Member Functions

int LoadAdaptWindows ()
 

Private Attributes

CParameterBasem_pPara
 
CBackendThreadm_pThread
 
CFrmViewerm_pFrmViewer
 
CFrmScrollm_pScroll
 
QString m_szServerName
 

Additional Inherited Members

- Public Types inherited from COperate
enum class  SecurityLevel {
  No , Secure , NonSecureAuthentication , SecureChannel ,
  Normal = SecureChannel , SecureAuthentication , Risky
}
 
- Signals inherited from COperate
void sigRunning ()
 Start success signal.
 
void sigStop ()
 Notify the user to stop.
 
void sigFinished ()
 Successful disconnection signal.
 
void sigViewerFocusIn (QWidget *pView)
 The view is focus.
 
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 ()
 
- Static Public Member Functions inherited from COperate
static QString GetSecurityLevelString (SecurityLevel level)
 
static QColor GetSecurityLevelColor (SecurityLevel level)
 
- Static Protected Member Functions inherited from COperate
static QObject * createObject (const QString &className, QObject *parent=NULL)
 

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 186 of file OperateDesktop.cpp.

◆ Description()

const QString COperateDesktop::Description ( )
overridevirtual

Description.

Reimplemented from COperate.

Definition at line 97 of file OperateDesktop.cpp.

◆ GetParameter()

CParameterBase * COperateDesktop::GetParameter ( )
virtual

Get parameter.

Definition at line 413 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 350 of file OperateDesktop.cpp.

◆ Id()

const QString COperateDesktop::Id ( )
overridevirtual

Identity.

Reimplemented from COperate.

Reimplemented in COperateVnc.

Definition at line 40 of file OperateDesktop.cpp.

◆ Initial()

int COperateDesktop::Initial ( )
overrideprotectedvirtual

Initial parameters and resource.

See also
CManager::CreateOperate

Reimplemented from COperate.

Reimplemented in COperateFreeRDP, COperateLibVNCServer, COperatePlayer, and COperateVnc.

Definition at line 163 of file OperateDesktop.cpp.

◆ InitialMenu()

int COperateDesktop::InitialMenu ( )
protectedvirtual

Definition at line 199 of file OperateDesktop.cpp.

◆ InstanceBackend()

virtual Q_INVOKABLE CBackend * COperateDesktop::InstanceBackend ( )
pure 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.

Reimplemented from COperate.

Definition at line 483 of file OperateDesktop.cpp.

◆ LoadAdaptWindows()

int COperateDesktop::LoadAdaptWindows ( )
private

Definition at line 454 of file OperateDesktop.cpp.

◆ Name()

const QString COperateDesktop::Name ( )
overridevirtual

Name.

Reimplemented from COperate.

Definition at line 84 of file OperateDesktop.cpp.

◆ Save()

int COperateDesktop::Save ( QSettings &  set)
overrideprotectedvirtual

Save parameters.

Reimplemented from COperate.

Definition at line 507 of file OperateDesktop.cpp.

◆ ServerName()

QString COperateDesktop::ServerName ( )
protectedvirtual

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

eg: Server name or Ip:Port

Returns
Current connect server name.

Reimplemented in COperateVnc.

Definition at line 601 of file OperateDesktop.cpp.

◆ SetGlobalParameters()

int COperateDesktop::SetGlobalParameters ( CParameterPlugin pPara)
overrideprotectedvirtual

Apply the global parameters of the plug-in.

Note
If you don't need the global parameters of the plugin, override it in the derived class and ignore.
See also
CManager::CreateOperate CParameterPlugin

Implements COperate.

Definition at line 383 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 418 of file OperateDesktop.cpp.

◆ slotScreenShot

void COperateDesktop::slotScreenShot ( )
virtualslot

Definition at line 561 of file OperateDesktop.cpp.

◆ slotSetServerName

void COperateDesktop::slotSetServerName ( const QString &  szName)
privatevirtualslot
Note
The slot only is used by CBackendDesktop::SetConnect()

Definition at line 622 of file OperateDesktop.cpp.

◆ slotShortcutCtlAltDel

void COperateDesktop::slotShortcutCtlAltDel ( )
privateslot

Definition at line 576 of file OperateDesktop.cpp.

◆ slotShortcutLock

void COperateDesktop::slotShortcutLock ( )
privateslot

Definition at line 589 of file OperateDesktop.cpp.

◆ slotValueChanged

void COperateDesktop::slotValueChanged ( int  v)
privateslot

emit by zoom menu in the class

Definition at line 553 of file OperateDesktop.cpp.

◆ Start

int COperateDesktop::Start ( )
overridevirtualslot

Definition at line 355 of file OperateDesktop.cpp.

◆ Stop

int COperateDesktop::Stop ( )
overridevirtualslot

Definition at line 370 of file OperateDesktop.cpp.

◆ Version()

const qint16 COperateDesktop::Version ( ) const
overridevirtual

Version.

Implements COperate.

Reimplemented in COperateFreeRDP, COperateLibVNCServer, COperatePlayer, and COperateVnc.

Definition at line 158 of file OperateDesktop.cpp.

Member Data Documentation

◆ m_pFrmViewer

CFrmViewer* COperateDesktop::m_pFrmViewer
private

Definition at line 160 of file OperateDesktop.h.

◆ m_pMenuZoom

QAction* COperateDesktop::m_pMenuZoom
protected

Definition at line 187 of file OperateDesktop.h.

◆ m_pPara

CParameterBase* COperateDesktop::m_pPara
private

Definition at line 158 of file OperateDesktop.h.

◆ m_psbZoomFactor

QSpinBox* COperateDesktop::m_psbZoomFactor
protected

Definition at line 193 of file OperateDesktop.h.

◆ m_pScreenShot

QAction* COperateDesktop::m_pScreenShot
protected

Definition at line 194 of file OperateDesktop.h.

◆ m_pScroll

CFrmScroll* COperateDesktop::m_pScroll
private

Definition at line 161 of file OperateDesktop.h.

◆ m_pThread

CBackendThread* COperateDesktop::m_pThread
private

Definition at line 159 of file OperateDesktop.h.

◆ m_pZoomAspectRatio

QAction* COperateDesktop::m_pZoomAspectRatio
protected

Definition at line 189 of file OperateDesktop.h.

◆ m_pZoomIn

QAction* COperateDesktop::m_pZoomIn
protected

Definition at line 191 of file OperateDesktop.h.

◆ m_pZoomOriginal

QAction* COperateDesktop::m_pZoomOriginal
protected

Definition at line 190 of file OperateDesktop.h.

◆ m_pZoomOut

QAction* COperateDesktop::m_pZoomOut
protected

Definition at line 192 of file OperateDesktop.h.

◆ m_pZoomToWindow

QAction* COperateDesktop::m_pZoomToWindow
protected

Definition at line 188 of file OperateDesktop.h.

◆ m_szServerName

QString COperateDesktop::m_szServerName
private

Definition at line 177 of file OperateDesktop.h.


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