mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00

语音助手中使用的类TipsWidget与任务栏项目中的同名类的实现不一样,导致符号冲突 解决方法是在任务栏的代码中加上命名空间, Log: 修复符号冲突导致的概率性崩溃问题 Bug: https://pms.uniontech.com/zentao/bug-view-35037.html
35 lines
677 B
C++
35 lines
677 B
C++
#ifndef TIPSWIDGET_H
|
|
#define TIPSWIDGET_H
|
|
|
|
#include <QFrame>
|
|
namespace Dock {
|
|
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;
|
|
bool event(QEvent *event) override;
|
|
|
|
private:
|
|
QString m_text;
|
|
QStringList m_textList;
|
|
int m_width;
|
|
ShowType m_type;
|
|
};
|
|
}
|
|
|
|
#endif // TIPSWIDGET_H
|