Inspector: Make properties editable :^)

This patch makes it possible to live-edit remote object properties by
simply double clicking on them in the property table view.

This is pretty neat! :^)
This commit is contained in:
Andreas Kling 2020-03-05 15:47:24 +01:00
parent 3edcaa9b99
commit b2be8466fb
Notes: sideshowbarker 2024-07-19 08:53:48 +09:00
5 changed files with 39 additions and 0 deletions

View file

@ -49,7 +49,9 @@ public:
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; }
virtual String column_name(int) const override;
virtual GUI::Variant data(const GUI::ModelIndex&, Role = Role::Display) const override;
virtual void set_data(const GUI::ModelIndex&, const GUI::Variant&) override;
virtual void update() override;
virtual bool is_editable(const GUI::ModelIndex& index) const override { return index.column() == Column::Value; }
private:
explicit RemoteObjectPropertyModel(RemoteObject&);