[nostalgia/studio] Start on ImGui version of Studio
This commit is contained in:
@@ -8,18 +8,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QUndoStack>
|
||||
#include <QWidget>
|
||||
#include <ox/event/signal.hpp>
|
||||
|
||||
#include "undostack.hpp"
|
||||
|
||||
#include "nostalgiastudio_export.h"
|
||||
|
||||
namespace nostalgia::studio {
|
||||
|
||||
class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
Q_OBJECT
|
||||
class NOSTALGIASTUDIO_EXPORT Editor: public ox::SignalHandler {
|
||||
|
||||
private:
|
||||
QUndoStack m_cmdStack;
|
||||
UndoStack m_cmdStack;
|
||||
bool m_unsavedChanges = false;
|
||||
bool m_exportable = false;
|
||||
bool m_cutEnabled = false;
|
||||
@@ -27,15 +27,13 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
bool m_pasteEnabled = false;
|
||||
|
||||
public:
|
||||
explicit Editor(QWidget *parent);
|
||||
|
||||
~Editor() override = default;
|
||||
|
||||
/**
|
||||
* Returns the name of item being edited.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
virtual QString itemName() const = 0;
|
||||
virtual ox::String itemName() const = 0;
|
||||
|
||||
virtual void cut();
|
||||
|
||||
@@ -63,7 +61,7 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
* Returns the undo stack holding changes to the item being edited.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
QUndoStack *undoStack();
|
||||
UndoStack *undoStack();
|
||||
|
||||
void setExportable(bool);
|
||||
|
||||
@@ -91,16 +89,12 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
|
||||
*/
|
||||
virtual void saveItem();
|
||||
|
||||
signals:
|
||||
void unsavedChangesChanged(bool);
|
||||
|
||||
void exportableChanged(bool);
|
||||
|
||||
void cutEnabledChanged(bool);
|
||||
|
||||
void copyEnabledChanged(bool);
|
||||
|
||||
void pasteEnabledChanged(bool);
|
||||
public:
|
||||
ox::Signal<ox::Error(bool)> unsavedChangesChanged;
|
||||
ox::Signal<ox::Error(bool)> exportableChanged;
|
||||
ox::Signal<ox::Error(bool)> cutEnabledChanged;
|
||||
ox::Signal<ox::Error(bool)> copyEnabledChanged;
|
||||
ox::Signal<ox::Error(bool)> pasteEnabledChanged;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user