summaryrefslogtreecommitdiff
path: root/LibGUI/GModel.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-29 17:03:30 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-29 17:03:30 +0100
commit4d3c5fd83e824fe2a3d8d56893fb65dbcccc00f0 (patch)
treeaf7eba9804bf1f156dc7e5573a7aac64defd1732 /LibGUI/GModel.h
parentf249c40aaa8101743b1ecc245c6c7c3b4ec7122e (diff)
downloadserenity-4d3c5fd83e824fe2a3d8d56893fb65dbcccc00f0.zip
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.
Diffstat (limited to 'LibGUI/GModel.h')
-rw-r--r--LibGUI/GModel.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/LibGUI/GModel.h b/LibGUI/GModel.h
index 4dd2df72ae..94364b6889 100644
--- a/LibGUI/GModel.h
+++ b/LibGUI/GModel.h
@@ -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();