blob: 47e4621c96359d4d987035b9741ffc4025f9e300 (
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
31
|
#pragma once
#include <AK/Function.h>
#include <LibGUI/GModel.h>
class IRCClient;
class IRCWindow;
class IRCWindowListModel final : public GModel {
public:
enum Column {
Name,
};
static Retained<IRCWindowListModel> create(IRCClient& client) { return adopt(*new IRCWindowListModel(client)); }
virtual ~IRCWindowListModel() 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;
Function<void(IRCWindow&)> on_activation;
private:
explicit IRCWindowListModel(IRCClient&);
IRCClient& m_client;
};
|