1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

LibGUI: Make GTreeView inherit from GAbstractColumnView

This makes GTreeView able to support multi-column models!

Only one column can be the "tree column", this is column 0 by default
but can be changed by overriding GModel::tree_column().
This commit is contained in:
Andreas Kling 2019-12-13 23:36:36 +01:00
parent b909d991f1
commit 0ac74d3778
7 changed files with 248 additions and 121 deletions

View file

@ -52,6 +52,7 @@ public:
virtual GModelIndex sibling(int row, int column, const GModelIndex& parent) const;
virtual bool is_editable(const GModelIndex&) const { return false; }
virtual void set_data(const GModelIndex&, const GVariant&) {}
virtual int tree_column() const { return 0; }
bool is_valid(const GModelIndex& index) const
{