12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef LHTRANSMITTERSWITCHAPI_H
- #define LHTRANSMITTERSWITCHAPI_H
- #include <QString>
- #include <QWidget>
- struct InitData
- {
- QString url;
- QString serverID;
- QString serverKey;
- };
- /* 回调函数 */
- using trackCallBack = void(*)(int actionID, QString strMemo);
- class LHTransmitterSwitchAPI
- {
- using pInit = int(*)(const InitData*);
- using pCreateWindow = int(*)(int, QWidget*);
- using pShowWindow = int(*)(int, bool);
- using pGetExecPlanFromEQM = int(*)();
- using pSaveExecPlanToEQM = int(*)();
- using pRelease = int(*)();
- using pSetCallBack = int(*)(trackCallBack);
- public:
- LHTransmitterSwitchAPI();
- ~LHTransmitterSwitchAPI();
- /* 加载动态库 */
- bool loadLibrary();
- int DoInit(const InitData* pData);
- int DoCreateWindow(int skintype, QWidget* parent);
- int DoShowWindow(int skintype, bool showWindow);
- int DoGetExecPlanFromEQM();
- int DoSaveExecPlanToEQM();
- int DoRelease();
- int DoSetCallBack(trackCallBack cb);
- private:
- pInit m_pInit = nullptr;
- pCreateWindow m_pCreateWindow = nullptr;
- pShowWindow m_pShowWindow = nullptr;
- pGetExecPlanFromEQM m_pGetExecPlanFromEQM = nullptr;
- pSaveExecPlanToEQM m_pSaveExecPlanToEQM = nullptr;
- pRelease m_pRelease = nullptr;
- pSetCallBack m_pSetCallBack = nullptr;
- };
- #endif /* LHTRANSMITTERSWITCHAPI_H */
|