2019-03-15 20:25:51 +03:00
|
|
|
#pragma once
|
|
|
|
|
2019-03-23 03:42:49 +03:00
|
|
|
#include <LibGUI/GModel.h>
|
2019-03-15 20:25:51 +03:00
|
|
|
#include <AK/Function.h>
|
|
|
|
|
|
|
|
class IRCChannel;
|
|
|
|
|
2019-03-23 03:42:49 +03:00
|
|
|
class IRCChannelMemberListModel final : public GModel {
|
2019-03-15 20:25:51 +03:00
|
|
|
public:
|
|
|
|
enum Column { Name };
|
2019-03-20 05:27:07 +03:00
|
|
|
static Retained<IRCChannelMemberListModel> create(IRCChannel& channel) { return adopt(*new IRCChannelMemberListModel(channel)); }
|
2019-03-15 20:25:51 +03:00
|
|
|
virtual ~IRCChannelMemberListModel() override;
|
|
|
|
|
2019-03-29 05:27:03 +03:00
|
|
|
virtual int row_count(const GModelIndex&) const override;
|
|
|
|
virtual int column_count(const GModelIndex&) const override;
|
2019-03-15 20:25:51 +03:00
|
|
|
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;
|
|
|
|
|
|
|
|
private:
|
2019-03-20 05:27:07 +03:00
|
|
|
explicit IRCChannelMemberListModel(IRCChannel&);
|
|
|
|
|
2019-03-15 20:25:51 +03:00
|
|
|
IRCChannel& m_channel;
|
|
|
|
};
|