[nostalgia/studio] Actually add studio::Editor...

This commit is contained in:
Gary Talent 2019-12-06 23:46:12 -06:00
parent 536435c057
commit c6ecbd6d12
2 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,23 @@
/*
* Copyright 2016 - 2019 gtalent2@gmail.com
*
* 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 "editor.hpp"
namespace nostalgia::studio {
Editor::Editor(QWidget *parent): QWidget(parent) {
}
void Editor::save() {
}
QUndoStack *Editor::undoStack() {
return nullptr;
}
}

View File

@ -0,0 +1,41 @@
/*
* Copyright 2016 - 2019 gtalent2@gmail.com
*
* 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/.
*/
#pragma once
#include <QUndoStack>
#include <QWidget>
namespace nostalgia::studio {
class Editor: public QWidget {
Q_OBJECT
public:
Editor(QWidget *parent);
virtual ~Editor() = default;
/**
* Returns the name of item being edited.
*/
virtual QString itemName() = 0;
/**
* Save changes to item being edited.
*/
virtual void save();
/**
* Returns the undo stack holding changes to the item being edited.
*/
virtual QUndoStack *undoStack();
};
}