logplus/WellLogUI/include/WellLogLabel.h
2025-10-29 17:23:30 +08:00

40 lines
819 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @file WelllogLabel.h
* @brief 定制QLabel,为了显示QLineEdit校验结果信息为了同时在QLabel上同时显示图标和文字。
* @date 2015-4-17
* @author hudfang
*/
#ifndef CWELLLOGLABEL_H
#define CWELLLOGLABEL_H
#pragma warning(push,0)
#include "qlabel.h"
#pragma warning(pop)
#pragma execution_character_set("utf-8")
enum PromptType
{
PT_Right, // 正确信息
PT_Warning, // 警告信息(不能为空)
PT_Error // 错误信息
};
class CWellLogLabel :
public QLabel
{
public:
CWellLogLabel(void);
~CWellLogLabel(void);
protected:
/**
* @brief 重新实现该函数来添加额外的元素
*/
void paintEvent(QPaintEvent *pEvent);
public:
void ShowPromtMessage(PromptType type);
private:
PromptType m_PromptType;
};
#endif