mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00

task20793 【TR4】【桌面专业版】【SP1】【华为】【Kunpeng920】【uos-20-pangu-daliy-20200424-build46】【任务栏】任务栏蓝牙显示截断 (cherry picked from commit 619ba29a258a215868a05e83f543f8a030f08d1d)
33 lines
619 B
C++
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
|