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.

45 lines
996 B
C

#ifndef SARIBBONLINEWIDGETCONTAINER_H
#define SARIBBONLINEWIDGETCONTAINER_H
#include <QtCore/qglobal.h>
#include <QWidget>
#include <QLabel>
#include "SARibbonGlobal.h"
/**
* @brief pannel
*
*
*
* PrefixLabel|_Widget_|SuffixLabel
*
*/
class SA_RIBBON_EXPORT SARibbonLineWidgetContainer : public QWidget
{
public:
SARibbonLineWidgetContainer(QWidget* par = nullptr);
//设置widget,不允许设置一个nullptr
void setWidget(QWidget* innerWidget);
//设置前缀
void setPrefix(const QString& str);
//设置后缀
void setSuffix(const QString& str);
//前缀文本框
QLabel* labelPrefix() const;
//后缀文本框
QLabel* labelSuffix() const;
private:
//两个文本
QLabel* m_labelPrefix;
QLabel* m_labelSuffix;
QWidget* m_innerWidget;
};
#endif // SARIBBONWIDGETCONTAINER_H