mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 03:45:08 +00:00

Now you can hook activation via GAbstractView::on_activation. The design still isn't quite right, we should eventually move the selection away from the model somehow.
25 lines
833 B
C++
25 lines
833 B
C++
#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;
|
|
};
|