[nostalgia/studio] Actually add studio::Editor...
This commit is contained in:
parent
536435c057
commit
c6ecbd6d12
23
src/nostalgia/studio/lib/editor.cpp
Normal file
23
src/nostalgia/studio/lib/editor.cpp
Normal 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;
|
||||
}
|
||||
|
||||
}
|
41
src/nostalgia/studio/lib/editor.hpp
Normal file
41
src/nostalgia/studio/lib/editor.hpp
Normal 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();
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user