2022-06-24 13:46:25 -04:00
|
|
|
#ifndef PANEL_H
|
|
|
|
#define PANEL_H
|
|
|
|
|
2022-06-27 12:44:50 -04:00
|
|
|
#include <chunk.h>
|
|
|
|
#include <QGridLayout>
|
2022-06-24 13:46:25 -04:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class Panel : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit Panel(QWidget *parent = nullptr);
|
|
|
|
|
2022-06-27 12:44:50 -04:00
|
|
|
void SetData(si::Chunk *chunk);
|
2022-06-24 13:46:25 -04:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
protected:
|
2022-06-27 12:44:50 -04:00
|
|
|
virtual void OnOpeningData(si::Chunk *chunk){}
|
|
|
|
virtual void OnClosingData(si::Chunk *chunk){}
|
|
|
|
|
|
|
|
QGridLayout *layout() const { return layout_; }
|
|
|
|
|
|
|
|
void FinishLayout();
|
2022-06-24 13:46:25 -04:00
|
|
|
|
|
|
|
private:
|
2022-06-27 12:44:50 -04:00
|
|
|
si::Chunk *chunk_;
|
|
|
|
|
|
|
|
QVBoxLayout *outer_layout_;
|
|
|
|
QGridLayout *layout_;
|
2022-06-24 13:46:25 -04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PANEL_H
|