mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 20:25:07 +00:00
LibGUI: Start working on a GFileSystemModel and hook that up in FileManager.
This is a read-only model for the tree view, at least initially. We'll see where we take it from there once it's more polished.
This commit is contained in:
parent
f249c40aaa
commit
4d3c5fd83e
7 changed files with 205 additions and 6 deletions
|
@ -53,6 +53,8 @@ public:
|
|||
virtual ColumnMetadata column_metadata(int) const { return { }; }
|
||||
virtual GVariant data(const GModelIndex&, Role = Role::Display) const = 0;
|
||||
virtual void update() = 0;
|
||||
virtual GModelIndex parent_index(const GModelIndex&) const { return { }; }
|
||||
virtual GModelIndex index(int row, int column = 0, const GModelIndex& = GModelIndex()) const { return create_index(row, column); }
|
||||
virtual void activate(const GModelIndex&) { }
|
||||
|
||||
bool is_valid(const GModelIndex& index) const
|
||||
|
@ -76,9 +78,6 @@ public:
|
|||
Function<void(GModel&)> on_model_update;
|
||||
Function<void(const GModelIndex&)> on_selection_changed;
|
||||
|
||||
virtual GModelIndex parent_index(const GModelIndex&) const { return { }; }
|
||||
virtual GModelIndex index(int row, int column = 0, const GModelIndex& = GModelIndex()) const { return create_index(row, column); }
|
||||
|
||||
protected:
|
||||
GModel();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue