summaryrefslogtreecommitdiff
path: root/Applications/IRCClient/IRCChannelMemberListModel.h
blob: 2f67cf15caff6e0714e668d3b70fec9e3d97882b (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
#pragma once

#include <LibGUI/GModel.h>
#include <AK/Function.h>

class IRCChannel;

class IRCChannelMemberListModel final : public GModel {
public:
    enum Column { Name };
    static Retained<IRCChannelMemberListModel> create(IRCChannel& channel) { return adopt(*new IRCChannelMemberListModel(channel)); }
    virtual ~IRCChannelMemberListModel() override;

    virtual int row_count(const GModelIndex&) const override;
    virtual int column_count(const GModelIndex&) const override;
    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:
    explicit IRCChannelMemberListModel(IRCChannel&);

    IRCChannel& m_channel;
};