/***************************************************************************
 **
 **  Copyright (C) 2023 wangjianjun <wangjianjun1018@qq.com>
 **  Contact: https://blog.csdn.net/wocanimei007?type=blog
 **
 **
****************************************************************************/
#ifndef FANCYBANNER_H
#define FANCYBANNER_H

#include <QWidget>
#include "frameless_global.h"



class FancyBannerPrivate;
class FRAMELESS_SHARED_EXPORT FancyBanner : public QWidget
{
    Q_OBJECT
public:
    explicit FancyBanner(QWidget *parent = nullptr);

    void addPage(QPixmap pixmap);
    void addPages(QList<QPixmap> pixmaps);

    void startAutoPlay();
    void stopAutoPlay();
    void setDelayTime(int msec, bool start = false);

    void setIndicatorFrontColor(QColor color);
    void setIndicatorBackColor(QColor color);

    void setPageSize(int w, int h);

signals:
    void currentClicked(int index);

protected:
    void paintEvent(QPaintEvent *event);

private:
    FancyBannerPrivate *d;
};



#endif // FANCYBANNER_H
