[nostalgia] Split PaletteEditor into Imgui and general files, other cleanup
This commit is contained in:
@@ -11,12 +11,17 @@
|
||||
|
||||
#include "nostalgiastudio_export.h"
|
||||
|
||||
namespace nostalgia {
|
||||
class StudioUI;
|
||||
}
|
||||
|
||||
namespace nostalgia::studio {
|
||||
|
||||
class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
|
||||
|
||||
friend StudioUI;
|
||||
|
||||
private:
|
||||
UndoStack m_cmdStack;
|
||||
bool m_unsavedChanges = false;
|
||||
bool m_exportable = false;
|
||||
bool m_cutEnabled = false;
|
||||
@@ -43,20 +48,12 @@ class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
|
||||
|
||||
virtual void exportFile();
|
||||
|
||||
/**
|
||||
* Returns the undo stack holding changes to the item being edited.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
virtual UndoStack *undoStack() noexcept {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void close();
|
||||
|
||||
/**
|
||||
* Save changes to item being edited.
|
||||
*/
|
||||
void save();
|
||||
void save() noexcept;
|
||||
|
||||
/**
|
||||
* Sets indication of item being edited has unsaved changes. Also emits
|
||||
@@ -91,7 +88,15 @@ class NOSTALGIASTUDIO_EXPORT Editor: public Widget {
|
||||
/**
|
||||
* Save changes to item being edited.
|
||||
*/
|
||||
virtual void saveItem();
|
||||
virtual ox::Error saveItem() noexcept;
|
||||
|
||||
/**
|
||||
* Returns the undo stack holding changes to the item being edited.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
virtual UndoStack *undoStack() noexcept {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// signals
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user