2022-06-24 13:46:25 -04:00
|
|
|
#ifndef PANEL_H
|
|
|
|
#define PANEL_H
|
|
|
|
|
2022-06-27 12:44:50 -04:00
|
|
|
#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_; }
|
2022-07-10 23:51:49 -04:00
|
|
|
void SetData(void *data);
|
2022-06-24 13:46:25 -04:00
|
|
|
|
2022-07-18 14:30:19 -04:00
|
|
|
void ResetData();
|
|
|
|
|
2022-06-24 13:46:25 -04:00
|
|
|
signals:
|
|
|
|
|
|
|
|
protected:
|
2022-07-10 23:51:49 -04:00
|
|
|
virtual void OnOpeningData(void *data){}
|
|
|
|
virtual void OnClosingData(void *data){}
|
2022-06-27 12:44:50 -04:00
|
|
|
|
|
|
|
QGridLayout *layout() const { return layout_; }
|
|
|
|
|
|
|
|
void FinishLayout();
|
2022-06-24 13:46:25 -04:00
|
|
|
|
|
|
|
private:
|
2022-07-10 23:51:49 -04:00
|
|
|
void *data_;
|
2022-06-27 12:44:50 -04:00
|
|
|
|
|
|
|
QVBoxLayout *outer_layout_;
|
|
|
|
QGridLayout *layout_;
|
2022-06-24 13:46:25 -04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PANEL_H
|