[nostalgia/studio] Cleanup save hooks and add unsaved changes marker to tabs
This commit is contained in:
@@ -18,7 +18,7 @@ namespace nostalgia::studio {
|
||||
class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
private:
|
||||
bool m_unsavedChanges = false;
|
||||
|
||||
public:
|
||||
@@ -31,11 +31,6 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
*/
|
||||
virtual QString itemName() = 0;
|
||||
|
||||
/**
|
||||
* Save changes to item being edited.
|
||||
*/
|
||||
virtual void saveItem();
|
||||
|
||||
/**
|
||||
* Returns the undo stack holding changes to the item being edited.
|
||||
*/
|
||||
@@ -52,6 +47,12 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
*/
|
||||
void setUnsavedChanges(bool);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Save changes to item being edited.
|
||||
*/
|
||||
virtual void saveItem();
|
||||
|
||||
signals:
|
||||
void unsavedChangesUpdate(bool);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user