mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
36 lines
794 B
C++
36 lines
794 B
C++
#include "vuetitlecontentpanel.h"
|
|
|
|
#include <QLabel>
|
|
#include <QVBoxLayout>
|
|
#include <QVariant>
|
|
#include <QString>
|
|
|
|
VUETitleContentPanel::VUETitleContentPanel(QWidget *p_contentWidget,
|
|
QWidget *p_parent)
|
|
: QWidget(p_parent)
|
|
{
|
|
m_titleLabel = new QLabel(this);
|
|
m_titleLabel->setProperty("TitleLabel", true);
|
|
|
|
p_contentWidget->setParent(this);
|
|
|
|
QVBoxLayout *layout = new QVBoxLayout();
|
|
layout->addWidget(m_titleLabel);
|
|
layout->addWidget(p_contentWidget);
|
|
|
|
layout->setContentsMargins(0, 0, 0, 0);
|
|
layout->setSpacing(0);
|
|
|
|
setLayout(layout);
|
|
}
|
|
|
|
void VUETitleContentPanel::setTitle(const QString &p_title)
|
|
{
|
|
m_titleLabel->setText(p_title);
|
|
}
|
|
|
|
void VUETitleContentPanel::clearTitle()
|
|
{
|
|
m_titleLabel->clear();
|
|
}
|