|
Rabbit Remote Control 0.0.36
|
It starts a background thread by default. More...
#include <ConnecterThread.h>
Public Slots | |
| virtual int | Connect () override |
| Start a background thread, and create an instance of CConnect . | |
| virtual int | DisConnect () override |
| emit sigConnected() in CConnectThread::run() | |
| virtual void | slotScreenShot () |
Public Slots inherited from CConnecterConnect | |
| virtual int | Connect () override |
| virtual int | DisConnect () override |
| emit sigDisconnected() in here | |
Public Slots inherited from CConnecter | |
| virtual int | Connect ()=0 |
| Start connect. | |
| virtual int | DisConnect ()=0 |
| Close connect. | |
Public Member Functions | |
| CConnecterThread (CPluginClient *plugin) | |
| virtual QWidget * | GetViewer () override |
| Get Viewer. | |
Public Member Functions inherited from CConnecterConnect | |
| CConnecterConnect (CPluginClient *plugin) | |
| virtual const QString | Id () override |
| Identity. | |
| virtual const QString | Name () override |
| Display order: | |
| virtual const QString | Description () override |
| Description. | |
| virtual CConnect * | InstanceConnect ()=0 |
| New connect. | |
| virtual CParameterBase * | GetParameter () |
| Get parameter. | |
| virtual int | SetParameter (CParameterBase *p) |
Public Member Functions inherited from CConnecter | |
| CConnecter (CPluginClient *plugin) | |
| virtual const QString | Protocol () const |
| Protocol. | |
| virtual qint16 | Version ()=0 |
| Version. | |
| virtual const QIcon | Icon () const |
| Icon. | |
| virtual int | OpenDialogSettings (QWidget *parent=nullptr) |
| Open settings dialog. | |
| virtual QMenu * | GetMenu (QWidget *parent=nullptr) |
| Get operate menu. | |
| virtual QString | GetSettingsFile () |
| virtual int | SetSettingsFile (const QString &szFile) |
Protected Member Functions | |
| virtual QString | ServerName () override |
| Current connect server name (remote desktop name, if not present, then IP:PORT). | |
| 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 () |
Protected Member Functions inherited from CConnecter | |
| virtual int | SetParameter (CParameter *p) |
| Set parameters. | |
| CParameter * | GetParameter () |
| Q_INVOKABLE CPluginClient * | GetPlugClient () const |
| 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 CConnecter | |
| QMenu | m_Menu |
| QAction * | m_pSettings |
Private Slots | |
| void | slotValueChanged (int v) |
| emit by zoom menu in the class | |
| void | slotShortcutCtlAltDel () |
| void | slotShortcutLock () |
Private Attributes | |
| CConnectThread * | m_pThread |
| CFrmViewer * | m_pFrmViewer |
| CFrmScroll * | m_pScroll |
Additional Inherited Members | |
Signals inherited from CConnecterConnect | |
| void | sigOpenConnect (CConnecterConnect *) |
| void | sigCloseconnect (CConnecterConnect *) |
Signals inherited from CConnecter | |
| void | sigConnected () |
| Successful connection signal. | |
| void | sigDisconnect () |
| Notify the user to disconnect. | |
| void | sigDisconnected () |
| Successful disconnection signal. | |
| void | sigViewerFocusIn (QWidget *pView) |
| The view is focus. | |
| void | sigUpdateName (const QString &szName) |
| void | sigUpdateParameters (CConnecter *pConnecter) |
| 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 Protected Member Functions inherited from CConnecter | |
| static QObject * | createObject (const QString &className, QObject *parent=NULL) |
It starts a background thread by default.
It implements a background thread to handle a connection. Can be used with plugins whose plugin interface derives from CPluginClient for connection is blocking model.
Principle: Start a background thread (CConnectThread) in Connect() . Call InstanceConnect() in the thread to instantiate CConnect, and start the timer in CConnect::Connect(). 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 CConnect. And CConnect supports the Qt event (the signal-slot mechanism of QObject. no-block).
Sequen diagram:
Definition at line 56 of file ConnecterThread.h.
|
virtual |
Definition at line 36 of file ConnecterThread.cpp.
|
overrideprotectedvirtual |
Clean parameters and resource.
Reimplemented from CConnecter.
Reimplemented in CConnecterFreeRDP, CConnecterLibVNCServer, CConnecterPlayer, and CConnecterVnc.
Definition at line 64 of file ConnecterThread.cpp.
|
overridevirtualslot |
Start a background thread, and create an instance of CConnect .
Definition at line 201 of file ConnecterThread.cpp.
|
overridevirtualslot |
emit sigConnected() in CConnectThread::run()
Definition at line 216 of file ConnecterThread.cpp.
|
overridevirtual |
Get Viewer.
Implements CConnecter.
Definition at line 196 of file ConnecterThread.cpp.
|
overrideprotectedvirtual |
Initial parameters and resource.
Reimplemented from CConnecter.
Reimplemented in CConnecterFreeRDP, CConnecterLibVNCServer, CConnecterPlayer, and CConnecterVnc.
Definition at line 41 of file ConnecterThread.cpp.
|
protectedvirtual |
Definition at line 78 of file ConnecterThread.cpp.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Current connect server name (remote desktop name, if not present, then IP:PORT).
eg: Server name or Ip:Port
Reimplemented from CConnecterConnect.
Reimplemented in CConnecterVnc.
Definition at line 229 of file ConnecterThread.cpp.
|
virtualslot |
Definition at line 321 of file ConnecterThread.cpp.
|
privateslot |
Definition at line 336 of file ConnecterThread.cpp.
|
privateslot |
Definition at line 350 of file ConnecterThread.cpp.
|
privateslot |
emit by zoom menu in the class
Definition at line 314 of file ConnecterThread.cpp.
|
private |
Definition at line 108 of file ConnecterThread.h.
|
protected |
Definition at line 112 of file ConnecterThread.h.
|
protected |
Definition at line 118 of file ConnecterThread.h.
|
protected |
Definition at line 119 of file ConnecterThread.h.
|
private |
Definition at line 109 of file ConnecterThread.h.
|
private |
Definition at line 107 of file ConnecterThread.h.
|
protected |
Definition at line 114 of file ConnecterThread.h.
|
protected |
Definition at line 116 of file ConnecterThread.h.
|
protected |
Definition at line 115 of file ConnecterThread.h.
|
protected |
Definition at line 117 of file ConnecterThread.h.
|
protected |
Definition at line 113 of file ConnecterThread.h.