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

Spreadsheet: Start making a spreadsheet application

This commit is contained in:
AnotherTest 2020-08-23 08:25:16 +04:30 committed by Andreas Kling
parent 5b5ba91335
commit a6ebd29aa5
13 changed files with 1183 additions and 5 deletions

View file

@ -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
{