2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
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.
14 #include <boost/shared_ptr.hpp>
17 #include "controllers/entitytoken.h"
23 class ActionCollection
;
25 class UI
: public QObject
{
27 typedef std::map
<QWidget
*, boost::shared_ptr
<Controller
> > ControllerMap
;
28 ControllerMap m_controller
;
29 QWidget
* m_current_tab
;
30 boost::shared_ptr
<Controller
>& controller();
31 boost::shared_ptr
<Controller
> controller() const;
34 void addController(QWidget
* w
, const boost::shared_ptr
<Controller
>&);
35 void setController(const boost::shared_ptr
<Controller
>&);
36 void removeController(QWidget
* w
);
38 void setCurrentTab(QWidget
* w
);
43 bool promoteVariation();
49 void createCtrlAction();
50 void destroyCtrlAction();
51 ActionCollection
* variantActions() const;
55 void pgnPaste(const QString
&);
59 void setStartingPosition();
62 AbstractPosition::Ptr
position() const;
64 EntityToken
addPlayingEngine(int side
, const boost::shared_ptr
<Engine
>& engine
);
65 // EntityToken addAnalysingEngine(const boost::shared_ptr<Engine>& engine);
66 void removeEntity(const EntityToken
& token
);
71 QString
currentVariant() const;
72 void reloadSettings();