mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-26 19:22:30 -05:00
29 lines
836 B
C
29 lines
836 B
C
|
#pragma once
|
||
|
|
||
|
#include <LibGUI/GModel.h>
|
||
|
|
||
|
class Profile;
|
||
|
|
||
|
class ProfileModel final : public GModel {
|
||
|
public:
|
||
|
static NonnullRefPtr<ProfileModel> create(Profile& profile)
|
||
|
{
|
||
|
return adopt(*new ProfileModel(profile));
|
||
|
}
|
||
|
|
||
|
virtual ~ProfileModel() override;
|
||
|
|
||
|
virtual int row_count(const GModelIndex& = GModelIndex()) const override;
|
||
|
virtual int column_count(const GModelIndex& = GModelIndex()) const override;
|
||
|
virtual GVariant data(const GModelIndex&, Role = Role::Display) const override;
|
||
|
virtual GModelIndex index(int row, int column, const GModelIndex& parent = GModelIndex()) const override;
|
||
|
virtual GModelIndex parent_index(const GModelIndex&) const override;
|
||
|
virtual void update() override;
|
||
|
|
||
|
private:
|
||
|
explicit ProfileModel(Profile&);
|
||
|
|
||
|
Profile& m_profile;
|
||
|
GIcon m_frame_icon;
|
||
|
};
|