[nostalgia/studio] Add Cut action hook

This commit is contained in:
2020-10-19 20:14:20 -05:00
parent 79acffcc29
commit 9effdad200
4 changed files with 41 additions and 0 deletions
+9
View File
@@ -22,6 +22,7 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
QUndoStack m_cmdStack;
bool m_unsavedChanges = false;
bool m_exportable = false;
bool m_cutEnabled = false;
bool m_copyEnabled = false;
bool m_pasteEnabled = false;
@@ -35,6 +36,8 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
*/
virtual QString itemName() const = 0;
virtual void cut();
virtual void copy();
virtual void paste();
@@ -63,6 +66,10 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
[[nodiscard]] bool exportable() const;
void setCutEnabled(bool);
[[nodiscard]] bool cutEnabled() const;
void setCopyEnabled(bool);
[[nodiscard]] bool copyEnabled() const;
@@ -82,6 +89,8 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget {
void exportableChanged(bool);
void cutEnabledChanged(bool);
void copyEnabledChanged(bool);
void pasteEnabledChanged(bool);