You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Component/FITKCompMessageWidget/FITKConsoleComponent.h

87 lines
2.3 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* 控制台插件声明
* @file FITKConsoleComponent.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-05
*
*/
#ifndef _FITKConsoleComponent_H_
#define _FITKConsoleComponent_H_
#include <QObject>
#include "FITKCompMessageWidgetAPI.h"
#include "FITK_Kernel/FITKAppFramework/FITKComponentInterface.h"
namespace Comp
{
class FITKConsole;
/**
* @brief 控制台插件接口声明
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-05
*/
class CompMesWidgetAPI ConsoleComponent :public QObject,
public AppFrame::FITKComponentInterface
{
Q_OBJECT
public:
/**
* @brief Construct a new Console Component object
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-05
*/
ConsoleComponent(QWidget* parent = nullptr);
/**
* @brief Destroy the Console Component object
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-05
*/
~ConsoleComponent();
/**
* @brief 是否接管qt的消息qdebug等
* @param[i] takeover 是否接管
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
void takeoverQtMessage(bool takeover = true);
/**
* @brief 获取控制台界面
* @param[i] indexPort 索引值
* @return QWidget*
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-05
*/
QWidget* getWidget(const int indexPort = 0) override;
/**
* @brief 获取控制台名称
* @return QString
* @author BaGuijun (baguijun@163.com)
* @date 2024-03-05
*/
QString getComponentName() override;
private:
/**
* @brief 端口-窗口字典。
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-27
*/
QHash<int, FITKConsole*> m_widgetHash;
/**
* @brief 父对象
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
QWidget* _parent{};
/**
* @brief 是否接管qt的消息qdebug等
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
bool _takeoverQt = false;
};
}
#endif