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.
16 #include <boost/shared_ptr.hpp>
17 #include "controllers/entitytoken.h"
23 struct EngineDetails
{
38 EngineDetails(const QString
& name
, const QString
& path
, const EngineType
& type
)
39 : name(name
), path(path
), type(type
) { }
42 static QString
typeName(EngineType t
) {
59 static EngineType
typeFromName(const QString
& name
) {
62 else if (name
== "UCI")
64 else if (name
== "tagua-text")
66 else if (name
== "tagua-dbus")
68 else if (name
== "gnushogi")
73 void load(Settings s
);
74 void save(Settings s
);
77 class EngineInfo
: public QObject
{
79 EngineDetails m_details
;
81 EntityToken m_token
[2];
83 virtual boost::shared_ptr
<Engine
> engine(int player
);
84 void playAs(int player
);
86 EngineInfo(const EngineDetails
& details
, UI
& ui
);
87 void setWorkPath(const QString
& wp
) { m_details
.workPath
= wp
; }
94 #endif // ENGINEINFO_H