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

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



class FancyTabWidget;
class FancyMode;

/* FancyTabWidget + FancyMode */
class FRAMELESS_SHARED_EXPORT FancyModeManager : public QObject
{
    Q_OBJECT
public:
    explicit FancyModeManager(FancyTabWidget *modeStack, QObject *parent = nullptr);
    ~FancyModeManager();

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

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

signals:
    void currentModeChanged(FancyMode *mode);

public slots:
    void objectAdded(QObject *obj);
    void objectRemoved(QObject *obj);
    void currentTabChanged(int index);
};



#endif // FANCYMODEMANAGER_H
