LibGUI: Show column names when using FilteringProxyModel with TableView
This commit is contained in:
parent
b944e8f505
commit
d1e6dcfbc2
Notes:
sideshowbarker
2024-07-17 11:12:53 +09:00
Author: https://github.com/Sauler Commit: https://github.com/SerenityOS/serenity/commit/d1e6dcfbc2 Pull-request: https://github.com/SerenityOS/serenity/pull/13934
2 changed files with 6 additions and 0 deletions
|
@ -33,6 +33,11 @@ int FilteringProxyModel::column_count(ModelIndex const& index) const
|
|||
return m_model->column_count(m_matching_indices[index.row()]);
|
||||
}
|
||||
|
||||
String FilteringProxyModel::column_name(int column) const
|
||||
{
|
||||
return m_model->column_name(column);
|
||||
}
|
||||
|
||||
Variant FilteringProxyModel::data(ModelIndex const& index, ModelRole role) const
|
||||
{
|
||||
if (!index.is_valid())
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
|
||||
virtual int row_count(ModelIndex const& = ModelIndex()) const override;
|
||||
virtual int column_count(ModelIndex const& = ModelIndex()) const override;
|
||||
virtual String column_name(int) const override;
|
||||
virtual Variant data(ModelIndex const&, ModelRole = ModelRole::Display) const override;
|
||||
virtual void invalidate() override;
|
||||
virtual ModelIndex index(int row, int column = 0, ModelIndex const& parent = ModelIndex()) const override;
|
||||
|
|
Loading…
Add table
Reference in a new issue