#ifndef TIPWIDGET_H
#define TIPWIDGET_H

#include <QDialog>
#include <QDebug>
#include <QWidget>
#include <QPainter>
#include <QPalette>

class RoundedWidget : public QWidget
{
    Q_OBJECT
public:
    explicit RoundedWidget(QWidget *parent = nullptr);
    void setBackgroundColor(const QColor &color);

protected:
    void paintEvent(QPaintEvent *event) override;

private:
    QColor backgroundColor;
};

class TipWidget : public QDialog
{
    Q_OBJECT
public:
    enum TipType {
        OK,
        ERROR,
        WARNING
    };

    explicit TipWidget(QWidget *parent = nullptr);
    ~TipWidget();

    void setLightTheme();
    void setBlackTheme();
    QWidget *getWidget(){return w;}
    static void showTip(QString tip, int show_time, QSize size, QWidget* parent = nullptr, TipType type = OK);

signals:

private:

    QWidget *w;
};

#endif // TIPWIDGET_H
