dde-dock/widgets/tipswidget.h
Robert 0427e19b72
chore: adapt license and copyright (#680)
Modify project to pass the REUSE check

Log: Modify project to pass the REUSE check
Task: https://pms.uniontech.com/task-view-185215.html
Change-Id: Ie954cf985f16c1a243bfc912aa7458c6e85ce9de
2022-09-06 11:36:55 +08:00

38 lines
778 B
C++

// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#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;
ShowType m_type;
};
}
#endif // TIPSWIDGET_H