[nostalgia/studio] Add Export menu item and hook
This commit is contained in:
@@ -21,6 +21,7 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
private:
|
||||
QUndoStack m_cmdStack;
|
||||
bool m_unsavedChanges = false;
|
||||
bool m_exportable = false;
|
||||
|
||||
public:
|
||||
Editor(QWidget *parent);
|
||||
@@ -32,6 +33,8 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
*/
|
||||
virtual QString itemName() = 0;
|
||||
|
||||
virtual void exportFile();
|
||||
|
||||
/**
|
||||
* Save changes to item being edited.
|
||||
*/
|
||||
@@ -39,15 +42,21 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
|
||||
/**
|
||||
* Sets indication of item being edited has unsaved changes. Also emits
|
||||
* unsavedChangesUpdate signal.
|
||||
* unsavedChangesChanged signal.
|
||||
*/
|
||||
void setUnsavedChanges(bool);
|
||||
|
||||
[[nodiscard]] bool unsavedChanges() noexcept;
|
||||
|
||||
/**
|
||||
* Returns the undo stack holding changes to the item being edited.
|
||||
*/
|
||||
QUndoStack *undoStack();
|
||||
|
||||
void setExportable(bool);
|
||||
|
||||
bool exportable();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Save changes to item being edited.
|
||||
@@ -55,7 +64,9 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
virtual void saveItem();
|
||||
|
||||
signals:
|
||||
void unsavedChangesUpdate(bool);
|
||||
void unsavedChangesChanged(bool);
|
||||
|
||||
void exportableChanged(bool);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user