SIEdit/app/panels/panel.cpp

30 lines
423 B
C++
Raw Normal View History

2022-06-24 13:46:25 -04:00
#include "panel.h"
Panel::Panel(QWidget *parent) :
QWidget{parent},
chunk_(nullptr)
2022-06-24 13:46:25 -04:00
{
outer_layout_ = new QVBoxLayout(this);
2022-06-24 13:46:25 -04:00
layout_ = new QGridLayout();
outer_layout_->addLayout(layout_);
2022-06-24 13:46:25 -04:00
}
void Panel::SetData(si::Chunk *chunk)
2022-06-24 13:46:25 -04:00
{
if (chunk_) {
OnClosingData(chunk_);
2022-06-24 13:46:25 -04:00
}
chunk_ = chunk;
2022-06-24 13:46:25 -04:00
if (chunk_) {
OnOpeningData(chunk_);
2022-06-24 13:46:25 -04:00
}
}
void Panel::FinishLayout()
{
outer_layout_->addStretch();
}