Connect interface.
More...
#include <Connect.h>
|
void | sigConnected () |
| Emitted when the plugin is successfully connected.
|
|
void | sigDisconnect () |
| Notify the user to call disconnect.
|
|
void | sigDisconnected () |
| Successful disconnection signal.
|
|
void | sigError (const int nError, const QString &szError=QString()) |
| Triggered when an error is generated.
|
|
void | sigInformation (const QString &szInfo) |
| Triggering from a background thread displays information in the main thread without blocking the background thread.
|
|
void | sigShowMessageBox (const QString &szTitle, const QString &szMessage, 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 | sigBlockShowMessageBox (const QString &szTitle, const QString &szMessage, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton &nRet, bool &checkBox, QString checkBoxContext=QString()) |
| Block background threads and display message dialogs in foreground threads (QMessageBox)
|
|
void | sigBlockInputDialog (const QString &szTitle, const QString &szLable, const QString &szMessage, QString &szText) |
| Block background threads and display input dialogs in foreground threads (QInputDialog)
|
|
void | sigBlockShowWidget (const QString &className, int &nRet, void *pContext) |
| Blocks the background thread and displays the window in the foreground thread.
|
|
|
enum class | OnInitReturnValue { Fail = -1
, Success = 0
, UseOnProcess = Success
, NotUseOnProcess = 1
} |
|
|
virtual void | slotTimeOut () |
| a non-Qt event loop (that is, normal loop processing), It call OnProcess(), and start timer.
|
|
|
virtual OnInitReturnValue | OnInit ()=0 |
| Specific plug-in realizes connection initialization.
|
|
virtual int | OnClean ()=0 |
| Clean.
|
|
virtual int | OnProcess () |
| Specific operation processing of plug-in connection.
|
|
Connect interface.
It is implemented by the Protocol plugin. It starts a timer by default to start a non-Qt event loop (that is, normal loop processing) . See Connect(), slotTimeOut(), OnProcess() for details. Of course, it still supports Qt events (the signal-slot mechanism of QObject).
- Note
- The interface only is implemented by plug-in.
- If it's asynchronous (with a background thread), its instance is in a background thread.
- The plug-in needs to implement the following interface.
- See also
- CConnecterThread CFrmViewer
Definition at line 44 of file Connect.h.
◆ OnInitReturnValue
enum class CConnect::OnInitReturnValue |
|
strongprotected |
◆ CConnect()
◆ ~CConnect()
◆ Connect
int CConnect::Connect |
( |
| ) |
|
|
virtualslot |
◆ Disconnect
int CConnect::Disconnect |
( |
| ) |
|
|
virtualslot |
◆ OnClean()
virtual int CConnect::OnClean |
( |
| ) |
|
|
protectedpure virtual |
◆ OnInit()
virtual OnInitReturnValue CConnect::OnInit |
( |
| ) |
|
|
protectedpure virtual |
◆ OnProcess()
int CConnect::OnProcess |
( |
| ) |
|
|
protectedvirtual |
◆ SetConnecter()
int CConnect::SetConnecter |
( |
CConnecter * |
pConnecter | ) |
|
|
private |
◆ sigBlockInputDialog
void CConnect::sigBlockInputDialog |
( |
const QString & |
szTitle, |
|
|
const QString & |
szLable, |
|
|
const QString & |
szMessage, |
|
|
QString & |
szText |
|
) |
| |
|
signal |
◆ sigBlockShowMessageBox
void CConnect::sigBlockShowMessageBox |
( |
const QString & |
szTitle, |
|
|
const QString & |
szMessage, |
|
|
QMessageBox::StandardButtons |
buttons, |
|
|
QMessageBox::StandardButton & |
nRet, |
|
|
bool & |
checkBox, |
|
|
QString |
checkBoxContext = QString() |
|
) |
| |
|
signal |
Block background threads and display message dialogs in foreground threads (QMessageBox)
- Parameters
-
title | |
message | |
buttons | |
nRet | |
checkBox | |
checkBoxContext | |
- See also
- CConnecter::slotBlockShowMessageBox() SetConnecter
◆ sigBlockShowWidget
void CConnect::sigBlockShowWidget |
( |
const QString & |
className, |
|
|
int & |
nRet, |
|
|
void * |
pContext |
|
) |
| |
|
signal |
Blocks the background thread and displays the window in the foreground thread.
- Parameters
-
className | show windows class name The class must have follower public functions: Q_INVOKABLE void SetContext(void* pContext); Q_INVOKABLE void SetConnecter(CConnecter *pConnecter); |
nRet | If className is QDialog derived class, QDialog::exec() return value. Otherwise, ignore |
pContext | pass context to CConnecter::slotBlockShowWidget() |
- See also
- CConnecter::slotBlockShowWidget() SetConnecter
◆ sigConnected
void CConnect::sigConnected |
( |
| ) |
|
|
signal |
Emitted when the plugin is successfully connected.
Emitted only by plugins
- See also
- Connect
◆ sigDisconnect
void CConnect::sigDisconnect |
( |
| ) |
|
|
signal |
Notify the user to call disconnect.
Emitted only by plugins Emitted when you need to disconnect from the plug-in. For example, the peer disconnect or reset the connection or the connection is error
◆ sigDisconnected
void CConnect::sigDisconnected |
( |
| ) |
|
|
signal |
Successful disconnection signal.
Triggered only by plugins
- See also
- Disconnect
◆ sigInformation
void CConnect::sigInformation |
( |
const QString & |
szInfo | ) |
|
|
signal |
Triggering from a background thread displays information in the main thread without blocking the background thread.
- Note
- It differs from sigShowMessageBox in that sigShowMessageBox is displayed in a dialog box
- See also
- sigShowMessageBox SetConnecter CConnecter::sigInformation()
◆ sigShowMessageBox
void CConnect::sigShowMessageBox |
( |
const QString & |
szTitle, |
|
|
const QString & |
szMessage, |
|
|
const QMessageBox::Icon & |
icon = QMessageBox::Information |
|
) |
| |
|
signal |
Trigger the display of a message dialog (QMessageBox) in the main thread from a background thread without blocking the background thread.
- Note
- It differs from sigInformation in that sigInformation is not displayed in a dialog box
- See also
- sigInformation SetConnecter CConnecter::sigShowMessageBox()
◆ slotTimeOut
void CConnect::slotTimeOut |
( |
| ) |
|
|
protectedvirtualslot |
The documentation for this class was generated from the following files:
- /home/runner/work/RabbitRemoteControl/RabbitRemoteControl/Client/Connect.h
- /home/runner/work/RabbitRemoteControl/RabbitRemoteControl/Client/Connect.cpp