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.
14 #include <boost/shared_ptr.hpp>
17 #include "controllers/entitytoken.h"
24 class UI
: public QObject
{
26 typedef std::map
<QWidget
*, boost::shared_ptr
<Controller
> > ControllerMap
;
27 ControllerMap m_controller
;
28 QWidget
* m_current_tab
;
29 boost::shared_ptr
<Controller
>& controller();
30 const boost::shared_ptr
<Controller
>& controller() const;
33 void addController(QWidget
* w
, const boost::shared_ptr
<Controller
>&);
34 void setController(const boost::shared_ptr
<Controller
>&);
35 void removeController(QWidget
* w
);
37 void setCurrentTab(QWidget
* w
);
42 bool promoteVariation();
48 void createCtrlAction();
49 void destroyCtrlAction();
53 void pgnPaste(const QString
&);
56 void promoteToQueen();
58 void promoteToBishop();
59 void promoteToKnight();
60 int promotionType() const;
63 void setDoPromotion(bool);
64 bool doPromotion() const;
68 void setStartingPosition();
71 AbstractPosition::Ptr
position() const;
73 void addPlayingEngine(int side
, const boost::shared_ptr
<Engine
>& engine
);
74 EntityToken
addAnalysingEngine(const boost::shared_ptr
<Engine
>& engine
);
75 void removeAnalysingEngine(const EntityToken
& token
);