1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 15:25:07 +00:00
serenity/Applications/IRCClient/IRCWindowListModel.h
Robin Burchell 0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00

32 lines
873 B
C++

#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;
};