blob: 0d7ee5909b16b8912d823b185ea0308be6584309 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include <LibGUI/GModel.h>
class VBWidget;
class VBProperty;
class VBWidgetPropertyModel : public GModel {
public:
enum Column {
Name = 0,
Value,
__Count
};
static Retained<VBWidgetPropertyModel> create(VBWidget& widget) { return adopt(*new VBWidgetPropertyModel(widget)); }
virtual ~VBWidgetPropertyModel() override;
virtual int row_count(const GModelIndex&) const override;
virtual int column_count(const GModelIndex&) const override { return Column::__Count; }
virtual String column_name(int column) const override;
virtual ColumnMetadata column_metadata(int column) const override;
virtual GVariant data(const GModelIndex&, Role = Role::Display) const override;
virtual void update() override { did_update(); }
private:
explicit VBWidgetPropertyModel(VBWidget&);
VBWidget& m_widget;
};
|