1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +00:00

Spreadsheet: Implement state-preserving saves and loads

This commit is contained in:
AnotherTest 2020-08-25 00:53:22 +04:30 committed by Andreas Kling
parent 916e5e8cb3
commit fdf0660064
5 changed files with 215 additions and 22 deletions

View file

@ -39,13 +39,18 @@ public:
~SpreadsheetWidget();
void save(const StringView& filename);
void load(const StringView& filename);
private:
SpreadsheetWidget();
explicit SpreadsheetWidget(NonnullRefPtrVector<Sheet>&& sheets = {}, bool should_add_sheet_if_empty = true);
void setup_tabs();
NonnullRefPtrVector<Sheet> m_sheets;
SpreadsheetView* m_selected_view { nullptr };
RefPtr<GUI::TabWidget> m_tab_widget;
RefPtr<GUI::Label> m_current_cell_label;
RefPtr<GUI::TextEditor> m_cell_value_editor;
};
}