#include "TitleLabelItem.h"

#include <QHBoxLayout>

TitleLabelItem::TitleLabelItem(QLabel* label, QWidget* parent)
    : m_pLabel(label), QWidget(parent)
{
    initUi();
}

void TitleLabelItem::initUi()
{
    m_pLabel->setFixedHeight(28);
    auto hLayout = new QHBoxLayout;
    hLayout->addItem(new QSpacerItem(16, 20, QSizePolicy::Fixed));
    hLayout->addWidget(m_pLabel);
    setLayout(hLayout);
}

QWidget* TitleLabelItem::getWidget()
{
    return this;
}
