mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 16:45:08 +00:00
LibGUI: Move Model::index() out of line
This commit is contained in:
parent
82e949aa7c
commit
fe19cf0ff2
2 changed files with 6 additions and 1 deletions
|
@ -68,6 +68,11 @@ ModelIndex Model::create_index(int row, int column, const void* data) const
|
|||
return ModelIndex(*this, row, column, const_cast<void*>(data));
|
||||
}
|
||||
|
||||
ModelIndex Model::index(int row, int column, const ModelIndex&) const
|
||||
{
|
||||
return create_index(row, column);
|
||||
}
|
||||
|
||||
ModelIndex Model::sibling(int row, int column, const ModelIndex& parent) const
|
||||
{
|
||||
if (!parent.is_valid())
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
virtual TriState data_matches(const ModelIndex&, Variant) const { return TriState::Unknown; }
|
||||
virtual void update() = 0;
|
||||
virtual ModelIndex parent_index(const ModelIndex&) const { return {}; }
|
||||
virtual ModelIndex index(int row, int column = 0, const ModelIndex& = ModelIndex()) const { return create_index(row, column); }
|
||||
virtual ModelIndex index(int row, int column = 0, const ModelIndex& parent = ModelIndex()) const;
|
||||
virtual ModelIndex sibling(int row, int column, const ModelIndex& parent) const;
|
||||
virtual bool is_editable(const ModelIndex&) const { return false; }
|
||||
virtual void set_data(const ModelIndex&, const Variant&) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue