Files
ox/src/nostalgia/studio/lib/editor.cpp
T

93 lines
1.5 KiB
C++

/*
* Copyright 2016 - 2021 gary@drinkingtea.net
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <ox/std/string.hpp>
#include "editor.hpp"
namespace nostalgia::studio {
ox::String Editor::itemDisplayName() const {
return itemName();
}
void Editor::cut() {
}
void Editor::copy() {
}
void Editor::paste() {
}
void Editor::exportFile() {
}
void Editor::close() {
this->closed.emit(itemName());
}
void Editor::save() {
saveItem();
setUnsavedChanges(false);
}
void Editor::setUnsavedChanges(bool uc) {
m_unsavedChanges = uc;
unsavedChangesChanged.emit(uc);
}
bool Editor::unsavedChanges() const noexcept {
return m_unsavedChanges;
}
UndoStack *Editor::undoStack() {
return &m_cmdStack;
}
void Editor::setExportable(bool exportable) {
m_exportable = exportable;
exportableChanged.emit(exportable);
}
bool Editor::exportable() const {
return m_exportable;
}
void Editor::setCutEnabled(bool v) {
m_cutEnabled = v;
cutEnabledChanged.emit(v);
}
bool Editor::cutEnabled() const {
return m_cutEnabled;
}
void Editor::setCopyEnabled(bool v) {
m_copyEnabled = v;
copyEnabledChanged.emit(v);
}
bool Editor::copyEnabled() const {
return m_copyEnabled;
}
void Editor::setPasteEnabled(bool v) {
m_pasteEnabled = v;
pasteEnabledChanged.emit(v);
}
bool Editor::pasteEnabled() const {
return m_pasteEnabled;
}
void Editor::saveItem() {
}
}