logplus/Workflow/WFEngine/Component/WorkflowWidget/include/PaiJobSummaryWidgetBar.h
2026-01-16 17:18:41 +08:00

67 lines
1.5 KiB
C++

/**
* @file PaiJobSummaryWidgetBar.h
* @brief SummaryWidgetBar参数信息显示控件
* @date 2013-04-20
*/
#ifndef PAI_FRAME_WORKFLOWWIDGET_PAIJOBSUMMARYWIDGETBAR_H
#define PAI_FRAME_WORKFLOWWIDGET_PAIJOBSUMMARYWIDGETBAR_H
#include <QWidget>
namespace pai
{
namespace gui
{
/**
* @class PaiJobSummaryWidgetBar
* @brief SummaryWidgetBar参数信息显示控件
*/
class PaiJobSummaryWidgetBar : public QWidget
{
Q_OBJECT
public:
/**
* @brief 构造函数
* @param[in] pParent 父亲
*/
PaiJobSummaryWidgetBar(QWidget *pParent = NULL);
/**
* @brief 析构函数
*/
virtual ~PaiJobSummaryWidgetBar();
/**
* @brief 设置显示条颜色
* @param[in] beforeColor 前面的渐变颜色
* @param[in] afterColor 后面的渐变颜色
*/
void SetColor(const QColor& beforeColor, const QColor& afterColor);
/**
* @brief 设置显示条的值
* @param[in] text 名称
* @param[in] progress 进度
*/
void SetName(const QString& text, const QString& progress);
protected:
/**
* @brief 绘制函数
* @param[in] pEvent 绘制事件
*/
virtual void paintEvent(QPaintEvent *pEvent) ;
private:
QColor m_BeforeColor; ///< 渐变色前部分颜色
QColor m_AfterColor; ///< 渐变色后部分颜色
QString m_value; ///< 显示文本
QString m_progress; ///< 进度
};
}
}
#endif ///< PAI_FRAME_WORKFLOWWIDGET_PAIJOBSUMMARYWIDGETBAR_H