dde-dock/widgets/tipswidget.h
zhaolong 4303f90d75 fix(bluetooth):popups display truncated
task20793 【TR4】【桌面专业版】【SP1】【华为】【Kunpeng920】【uos-20-pangu-daliy-20200424-build46】【任务栏】任务栏蓝牙显示截断

(cherry picked from commit 619ba29a258a215868a05e83f543f8a030f08d1d)
2020-05-14 13:14:57 +08:00

33 lines
619 B
C++

#ifndef TIPSWIDGET_H
#define TIPSWIDGET_H
#include <QFrame>
class TipsWidget : public QFrame
{
Q_OBJECT
enum ShowType
{
SingleLine,
MultiLine
};
public:
explicit TipsWidget(QWidget *parent = nullptr);
const QString& text(){return m_text;}
const QStringList &textList() { return m_textList; }
void setText(const QString &text);
void setTextList(const QStringList &textList);
protected:
void paintEvent(QPaintEvent *event) override;
private:
QString m_text;
QStringList m_textList;
int m_width;
ShowType m_type;
};
#endif // TIPSWIDGET_H