diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-08-23 08:25:16 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-24 18:21:33 +0200 |
commit | a6ebd29aa5c95712c964ff0301398f004d6d2011 (patch) | |
tree | 8885364324807f6551a88d4d40a5ac1cfc04a0c5 /Libraries/LibGUI | |
parent | 5b5ba91335b4a3263580295ec36a43bf70d00d8a (diff) | |
download | serenity-a6ebd29aa5c95712c964ff0301398f004d6d2011.zip |
Spreadsheet: Start making a spreadsheet application
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/ModelEditingDelegate.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Libraries/LibGUI/ModelEditingDelegate.h b/Libraries/LibGUI/ModelEditingDelegate.h index f13b5cc979..4d270f64a9 100644 --- a/Libraries/LibGUI/ModelEditingDelegate.h +++ b/Libraries/LibGUI/ModelEditingDelegate.h @@ -34,7 +34,7 @@ namespace GUI { class ModelEditingDelegate { public: - virtual ~ModelEditingDelegate() {} + virtual ~ModelEditingDelegate() { } void bind(Model& model, const ModelIndex& index) { @@ -53,10 +53,10 @@ public: virtual Variant value() const = 0; virtual void set_value(const Variant&) = 0; - virtual void will_begin_editing() {} + virtual void will_begin_editing() { } protected: - ModelEditingDelegate() {} + ModelEditingDelegate() { } virtual RefPtr<Widget> create_widget() = 0; void commit() @@ -65,6 +65,8 @@ protected: on_commit(); } + const ModelIndex& index() const { return m_index; } + private: RefPtr<Model> m_model; ModelIndex m_index; @@ -73,8 +75,8 @@ private: class StringModelEditingDelegate : public ModelEditingDelegate { public: - StringModelEditingDelegate() {} - virtual ~StringModelEditingDelegate() override {} + StringModelEditingDelegate() { } + virtual ~StringModelEditingDelegate() override { } virtual RefPtr<Widget> create_widget() override { |