#ifndef LogWindowUIFunction_H #define LogWindowUIFunction_H #include #include #include #include "UIFunctionBase.h" #include #include class LogWindowUIFunction : public UIFunctionBase { Q_OBJECT public: LogWindowUIFunction(); ~LogWindowUIFunction(); void from(const json& j); void to(json); void out_log(const QString message); void logFunction(); void stopThread(); public slots: // 定义槽 void onLogMessageReceived(const QString message); signals: // 定义信号 void logMessageReceived(const QString message); // 这是你可以发出的信号 private: std::atomic m_running; // 控制线程是否继续运行的标志 std::thread m_logThread; // 子线程 }; #endif // LogWindowUIFunction_H