logplus/Workflow/WFWidget/include/PaiLabel.h

77 lines
1.6 KiB
C
Raw Normal View History

2026-01-17 12:55:45 +08:00
/*
* PaiLabel.h
*
* Created on: 2011-10-17
* Author: dev
*/
#ifndef PAI_FRAME_WIDGET_PAILABEL_H
#define PAI_FRAME_WIDGET_PAILABEL_H
#include <QLabel>
#include "Turtle.h"
namespace pai
{
namespace gui
{
/**
* @class PaiLabel
* @brief
*/
class PAI_WIDGET_EXPORT PaiLabel : public QLabel
{
Q_OBJECT
public:
/**
* @enum PromptType
* @brief
*/
enum PromptType
{
PT_Information, ///< 普通信息
PT_Question, ///< 疑问信息
PT_Warning, ///< 警告信息
PT_Error, ///< 错误信息
PT_NO_STYLE_Text, ///< 不设置任何风格的纯文本信息
PT_NO_STYLE ///< 无风格
};
/**
* @brief
* @param[in] pParent
*/
PaiLabel(QWidget *pParent = NULL);
/**
* @brief
* @param[in] text
* @param[in] pParent
*/
PaiLabel(const QString & text, QWidget *pParent = NULL);
/**
* @brief
*/
virtual ~PaiLabel();
/**
* @brief
* @param[in] type
*/
void ShowPromptMessge(PromptType type = PT_Information);
protected:
/**
* @brief
* @param[in] pEvent
*/
virtual void paintEvent(QPaintEvent *pEvent);
private:
PromptType m_PromptType; ///< 显示信息类型
};
}
}
#endif ///< PAI_FRAME_WIDGET_PAILABEL_H