[nostalgia/studio] Add save action and cleanup

This commit is contained in:
2020-02-29 00:28:32 -06:00
parent eddf89a321
commit 320d8c1143
17 changed files with 100 additions and 53 deletions
+18 -1
View File
@@ -18,6 +18,9 @@ namespace nostalgia::studio {
class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
Q_OBJECT
private:
bool m_unsavedChanges = false;
public:
Editor(QWidget *parent);
@@ -31,13 +34,27 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
/**
* Save changes to item being edited.
*/
virtual void save();
virtual void saveItem();
/**
* Returns the undo stack holding changes to the item being edited.
*/
virtual QUndoStack *undoStack();
/**
* Save changes to item being edited.
*/
void save();
/**
* Sets indication of item being edited has unsaved changes. Also emits
* unsavedChangesUpdate signal.
*/
void setUnsavedChanges(bool);
signals:
void unsavedChangesUpdate(bool);
};
}