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

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



class FancyRibbonPage;
class FancyRibbonPrivate;

class FRAMELESS_SHARED_EXPORT FancyRibbon : public QWidget
{
    Q_OBJECT
public:
    explicit FancyRibbon(QWidget *parent = nullptr);
    ~FancyRibbon();

public:
    FancyRibbonPage *addPage(const QString &text);
    void addPage(FancyRibbonPage *page);
    FancyRibbonPage *insertPage(int index, const QString &text);
    void insertPage(int index, FancyRibbonPage *page);

    void removePage(FancyRibbonPage *page);
    void removePage(int index);

    void clearPages();

    FancyRibbonPage *page(int index) const;
    int pageCount() const;
    int currentPageIndex() const;
    QList<FancyRibbonPage *> pages() const;

    int addAction(QAction *action);

    void setHoverColor(const QColor &color);
    void setPressColor(const QColor &color);
    void setTextColor(const QColor &color);
    void setSelectedTextColor(const QColor &color);
    void setBackgroundColor(const QColor &color);

private:
    FancyRibbonPrivate *d;
};



#endif // FANCYRIBBON_H
