/***************************************************************************
 **
 **  Copyright (C) 2018-2023 wangjianjun <wangjianjun1018@qq.com>
 **  Contact: https://blog.csdn.net/wocanimei007?type=blog
 **
 **
****************************************************************************/
/*******************************************************************************************
  * MiniStack
  *
  *     \author: canpool@163.com
  *     \version: 0.0.1
  *     \date: 2017-10-22
  *
  *     \brief: A mini stack control widget
  *
  *     ---------------------------------------------------------------------------------
  *     |   title    |      appendix        |       tabbar         |     toolbar   |^ * |
  *     |--------------------------------------------------------------------------------
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                   stack                                       |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     |                                                                               |
  *     ---------------------------------------------------------------------------------
  *
  *******************************************************************************************
  */
#ifndef MINISTACK_H
#define MINISTACK_H

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



class MiniStackPrivate;
class FRAMELESS_SHARED_EXPORT MiniStack : public QWidget
{
    Q_OBJECT
public:
    explicit MiniStack(QWidget *parent = nullptr);

    void addTab(const QString &text, QWidget *widget, QWidget *appendix = nullptr);

    void addAction(QAction *action);

    void setIconSize(const QSize &size);

    void setBodySpacing(int spacing);
    void setBodyMargins(int left, int top, int right, int bottom);

    void setTitleSpacing(int spacing);
    void setTitleMargins(int left, int top, int right, int bottom);

    void setTitle(const QString &text);

    void setTitleColor(const QColor &color);
    void setSpacerColor(const QColor &color);
    void setBackgroundColor(const QColor &color);

    void setTabBackgroundColor(const QColor &color);
    void setTabTextColor(const QColor &color);
    void setTabHoverBackgroundColor(const QColor &color);
    void setTabHoverTextColor(const QColor &color);
    void setTabSelectedBackgroundColor(const QColor &color);
    void setTabSelectedTextColor(const QColor &color);

signals:
    void sigSetupClicked();

private:
    MiniStackPrivate *d;
};



#endif // MINISTACK_H
