logplus/Workflow/WFEngine/Component/WorkflowWidget/include/PaiJobErrorInfoWidget.h

126 lines
2.7 KiB
C
Raw Normal View History

2026-01-16 17:18:41 +08:00
/**
* @file PaiJobErrorInfoWidget.h
* @brief
* @date 2013-04-17
*/
#ifndef PAI_FRAME_WORKFLOWWIDGET_PAIJOBERRORINFOWIDGET_H
#define PAI_FRAME_WORKFLOWWIDGET_PAIJOBERRORINFOWIDGET_H
#include <QWidget>
#include <QList>
namespace pai
{
namespace gui
{
class PaiJobErrorInfoBar;
}
}
namespace pai
{
namespace gui
{
/**
* @struct ErrorBarPos
* @brief infoBar指针和infoBar相对高度
*/
struct ErrorBarPos
{
PaiJobErrorInfoBar *pJobErrorBar; ///< 错误信息提示条
int yPos; ///< 错误信息提示条y轴坐标
};
/**
* @class PaiJobErrorInofWidget
* @brief
*/
class PaiJobErrorInofWidget : public QWidget
{
Q_OBJECT
public:
/**
* @brief
* @param[in] pParent
*/
PaiJobErrorInofWidget(QWidget *pParent = NULL);
/**
* @brief
*/
virtual ~PaiJobErrorInofWidget();
/**
* @brief
* @param[in] error
*/
void AddErrorInofToBar(const QString& error);
/**
* @brief
* @param[in] error
*/
void UpdateEroorBarInfo(const QString& error);
/**
* @brief item中的所有infoBar信息
* @return infoBar信息
*/
QList<ErrorBarPos> GetErrorBarList() const;
/**
* @brief infoBar展开状态
* @return
*/
bool GetEnableExpand() const;
/**
* @brief
* @param[in] pExpandedError infoBar
*/
void SetExpandedError(PaiJobErrorInfoBar *pExpandedError);
/**
* @brief
* @return
*/
PaiJobErrorInfoBar* GetExpandedError() const;
public slots:
/**
* @brief
* @param[in] show
*/
void ErrorInfo(bool show);
/**
* @brief
*/
void UpdatePosition();
private:
/**
* @brief
* @param[in] pEvent
*/
void paintEvent(QPaintEvent *pEvent);
private:
QList<ErrorBarPos> m_list ; ///< infoBar信息
int m_Value; ///< 错误对话框序号
int m_NumErrorBar; ///< 错误条的数量
bool m_EnableExpand; ///< 表示有展开的inforbar
PaiJobErrorInfoBar *m_pJobErrorInfoBar; ///< 当前被展开的项
signals:
/**
* @brief infoBar被关闭时发送
*/
void HideItem();
};
}
}
#endif ///< PAI_FRAME_WORKFLOWWIDGET_PAIJOBERRORINFOWIDGET_H