Factored out action code in the Action class.
[tagua/yd.git] / src / controllers / abstract.cpp
blob135cfdfd640d7eeca0068e6a147575581523a753
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #include "abstract.h"
12 #include "entities/userentity.h"
14 Controller::Controller(ChessTable* view)
15 : m_view(view) { }
17 Controller::~Controller() { }
19 bool Controller::undo() {
20 return entity()->undo();
23 bool Controller::redo() {
24 return entity()->redo();
27 bool Controller::truncate() {
28 return entity()->truncate();
31 bool Controller::promoteVariation() {
32 return entity()->promoteVariation();
35 bool Controller::back() {
36 return entity()->back();
39 bool Controller::forward() {
40 return entity()->forward();
43 void Controller::gotoFirst() {
44 entity()->gotoFirst();
47 void Controller::gotoLast() {
48 entity()->gotoLast();
51 QString Controller::save() {
52 return entity()->save();
55 void Controller::loadPGN(const PGN& pgn) {
56 entity()->loadPGN(pgn);