SIEdit/app/panel.h

37 lines
549 B
C
Raw Normal View History

2022-06-24 13:46:25 -04:00
#ifndef PANEL_H
#define PANEL_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-07-11 04:48:50 -04:00
void *GetData() const { return data_; }
void SetData(void *data);
2022-06-24 13:46:25 -04:00
void ResetData();
2022-06-24 13:46:25 -04:00
signals:
protected:
virtual void OnOpeningData(void *data){}
virtual void OnClosingData(void *data){}
QGridLayout *layout() const { return layout_; }
void FinishLayout();
2022-06-24 13:46:25 -04:00
private:
void *data_;
QVBoxLayout *outer_layout_;
QGridLayout *layout_;
2022-06-24 13:46:25 -04:00
};
#endif // PANEL_H