SIEdit/app/panel.cpp
2022-07-18 11:32:09 -07:00

34 lines
457 B
C++

#include "panel.h"
Panel::Panel(QWidget *parent) :
QWidget{parent},
data_(nullptr)
{
outer_layout_ = new QVBoxLayout(this);
layout_ = new QGridLayout();
outer_layout_->addLayout(layout_);
}
void Panel::SetData(void *data)
{
if (data_) {
OnClosingData(data_);
}
data_ = data;
if (data_) {
OnOpeningData(data_);
}
}
void Panel::ResetData()
{
SetData(data_);
}
void Panel::FinishLayout()
{
outer_layout_->addStretch();
}