51 lines
758 B
C++
Executable File
51 lines
758 B
C++
Executable File
#pragma once
|
|
|
|
#include "lts_widgets_export.h"
|
|
#include <QWidget>
|
|
#include <QPainterPath>
|
|
|
|
|
|
class QPaintEvent;
|
|
class QResizeEvent;
|
|
|
|
|
|
namespace Ui
|
|
{
|
|
class NotiBox;
|
|
}
|
|
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
class LTSWIDGETS_EXPORT LtsNotificationBox : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
enum class MessageType
|
|
{
|
|
Success,
|
|
Error,
|
|
Warning,
|
|
Info,
|
|
};
|
|
|
|
explicit LtsNotificationBox(QWidget *parent = nullptr);
|
|
|
|
void message(const QString &title, const QString &text, MessageType type = MessageType::Error);
|
|
|
|
signals:
|
|
void signalClose();
|
|
void signalAck();
|
|
void signalLinkClicked(const QString &link);
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *) override;
|
|
|
|
private:
|
|
Ui::NotiBox *m_ui;
|
|
QPainterPath roundRectPath;
|
|
const static int margin;
|
|
};
|
|
}
|
|
|