logic: UndoRedo

UndoRedo working for ActiveTokensMessages
This commit is contained in:
Andreas Stallinger
2015-02-03 10:47:56 +01:00
parent 00f15a2ce3
commit 944554d034
27 changed files with 588 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
#include "component/view/UndoRedoView.h"
#include "component/controller/UndoRedoController.h"
UndoRedoView::UndoRedoView(ViewLayout* viewLayout)
: View(viewLayout, Vec2i(100,100))
{
}
UndoRedoView::~UndoRedoView()
{
}
std::string UndoRedoView::getName() const
{
return "UndoRedoView";
}
UndoRedoController* UndoRedoView::getController()
{
return View::getController<UndoRedoController>();
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef UNDO_REDO_VIEW_H
#define UNDO_REDO_VIEW_H
#include "component/view/View.h"
class UndoRedoController;
class UndoRedoView : public View
{
public:
UndoRedoView(ViewLayout* viewLayout);
~UndoRedoView(void);
virtual std::string getName() const;
virtual void setRedoButtonEnabled(bool enabled) = 0;
virtual void setUndoButtonEnabled(bool enabled) = 0;
protected:
UndoRedoController* getController();
};
#endif //UNDO_REDO_VIEW_H
+2
View File
@@ -8,6 +8,7 @@ class GraphView;
class MainView;
class SearchView;
class StatusBarView;
class UndoRedoView;
class ViewLayout;
class ViewFactory
@@ -21,6 +22,7 @@ public:
virtual std::shared_ptr<GraphView> createGraphView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr<SearchView> createSearchView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr<StatusBarView> createStatusBarView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr<UndoRedoView> createUndoRedoView(ViewLayout* viewLayout) const = 0;
};
#endif // VIEW_FACTORY_H