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

#include "fancytabbar.h"
#include "frameless_global.h"

class QStackedWidget;



class FancyMode;
class FancyModeBarPrivate;

/* FancyTabBar + QStackedWidget + FancyMode */
class FRAMELESS_SHARED_EXPORT FancyModeBar : public FancyTabBar
{
    Q_OBJECT
public:
    explicit FancyModeBar(QStackedWidget *modeStack, QWidget *parent = nullptr);
    ~FancyModeBar();

    void addMode(FancyMode *mode);
    void removeMode(FancyMode *mode);
    void setCurrentMode(FancyMode *mode);
    FancyMode *currentMode() const;
    FancyMode* mode(int index) const;

    void setModeEnabled(FancyMode *mode, bool enable);
    void setModeVisible(FancyMode *mode, bool visible);

private:
    FancyModeBarPrivate *d;
};



#endif // FANCYMODEBAR_H
