You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB
C

#ifndef SARIBBONCTROLCONTAINER_H
#define SARIBBONCTROLCONTAINER_H
#include "SARibbonGlobal.h"
#include <QWidget>
#include <QScopedPointer>
class QStyleOption;
/**
* @brief SARibbonCtrlContainericontitle
*
* ----------------------
* |icon|text| widget |
* ----------------------
*/
class SA_RIBBON_EXPORT SARibbonCtrlContainer : public QWidget
{
Q_OBJECT
SA_RIBBON_DECLARE_PRIVATE(SARibbonCtrlContainer)
public:
SARibbonCtrlContainer(QWidget* parent = Q_NULLPTR);
~SARibbonCtrlContainer();
void setEnableShowIcon(bool b);
void setEnableShowTitle(bool b);
// 判断是否存在容器窗口
bool hasContainerWidget() const;
// 图标
void setIcon(const QIcon& i);
void setIcon(const QPixmap& pixmap);
QIcon icon() const;
// 图标
void setText(const QString& t);
QString text() const;
// 设置窗口
void setContainerWidget(QWidget* w);
QWidget* containerWidget();
const QWidget* containerWidget() const;
// 获取线索icon的窗口
QWidget* iconWidget() const;
};
#endif // SARIBBONCTROLCONTAINER_H