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

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



class FancyRibbonGroupPrivate;
class FRAMELESS_SHARED_EXPORT FancyRibbonGroup : public QWidget
{
    Q_OBJECT
public:
    enum GroupSize {
        GroupLarge, GroupMedium, GroupSmall
    };

public:
    explicit FancyRibbonGroup(const QString &title, QWidget *parent = nullptr);
    ~FancyRibbonGroup();

    void setTitle(const QString &title);
    QString title() const;

    void setTitleFont(const QFont &font);
    QFont titleFont() const;

    void setOptionButtonVisible(bool visible = true);
    bool isOptionButtonVisible() const;

    QAction *addAction(const QIcon &icon, const QString &text, GroupSize size);
    void addAction(QAction *action, GroupSize size); // for action that has menu

    void addWidget(QWidget *widget);
    void removeWidget(QWidget *widget);

signals:
    void optionClicked();

private:
    FancyRibbonGroupPrivate *d;
};



#endif // FANCYRIBBONGROUP_H
