93 enum class OnInitReturnValue {
96 UseOnProcess = Success,
115 [[nodiscard]]
virtual OnInitReturnValue
OnInit() = 0;
138 [[nodiscard]]
virtual int OnProcess();
154 virtual void slotTimeOut();
185 void sigError(
const int nError,
const QString &szError = QString());
215 const QMessageBox::Icon& icon = QMessageBox::Information);
235 const QString& szMessage,
236 QMessageBox::StandardButtons buttons,
237 QMessageBox::StandardButton& nRet,
239 QString checkBoxContext = QString());
250 const QString& szLable,
251 const QString& szMessage,
后端接口。它由协议插件实现。 它默认启动一个定时器来开启一个非 Qt 事件循环(就是普通的循环处理)。 详见: Start()、 slotTimeOut()、 OnProcess() 。 当然,它仍然支...
void sigInformation(const QString &szInfo)
从后台线程中触发在主线程中显示信息,不阻塞后台线程
void sigStop()
需要通知用户停止时触发。仅由插件触发。 当从插件中需要停止时触发。例如:对端断开连接、重置连接或者连接出错。
virtual OnInitReturnValue OnInit()=0
初始化
virtual int OnClean()=0
清理
void sigShowMessageBox(const QString &szTitle, const QString &szMessage, const QMessageBox::Icon &icon=QMessageBox::Information)
从后台线程中触发在主线程中显示消息对话框(QMessageBox),不阻塞后台线程
void sigError(const int nError, const QString &szError=QString())
当有错误产生时触发
void sigBlockShowMessageBox(const QString &szTitle, const QString &szMessage, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton &nRet, bool &checkBox, QString checkBoxContext=QString())
阻塞后台线程,并在前台线程中显示消息对话框(QMessageBox)
void sigRunning()
当插件开始成功后触发。仅由插件触发
void sigFinished()
停止成功信号。仅由插件触发
void sigBlockShowWidget(const QString &className, int &nRet, void *pContext)
阻塞后台线程,并在前台线程中显示窗口。
bool m_bStopSignal
When an error occurs, emit a COperate::sigStop() signal
void sigBlockInputDialog(const QString &szTitle, const QString &szLable, const QString &szMessage, QString &szText)
阻塞后台线程,并在前台线程中显示输入对话框 (QInputDialog)
CBackend(COperate *pOperate=nullptr, bool bStopSignal=true)
CBackend