Cute Chess  0.1
enginemanager.h
1 /*
2  This file is part of Cute Chess.
3 
4  Cute Chess is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  Cute Chess is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef ENGINE_MANAGER_H
19 #define ENGINE_MANAGER_H
20 
21 #include <QSet>
22 #include "engineconfiguration.h"
23 
29 class LIB_EXPORT EngineManager : public QObject
30 {
31  Q_OBJECT
32 
33  public:
35  EngineManager(QObject* parent = nullptr);
36  virtual ~EngineManager();
37 
39  int engineCount() const;
41  EngineConfiguration engineAt(int index) const;
42 
44  void addEngine(const EngineConfiguration& engine);
46  void updateEngineAt(int index, const EngineConfiguration& engine);
48  void removeEngineAt(int index);
49 
51  QList<EngineConfiguration> engines() const;
53  void setEngines(const QList<EngineConfiguration>& engines);
54 
59  bool supportsVariant(const QString& variant) const;
60 
61  void loadEngines(const QString& fileName);
62  void saveEngines(const QString& fileName);
63 
65  QSet<QString> engineNames() const;
66 
67  signals:
72  void enginesReset();
74  void engineAdded(int index);
80  void engineAboutToBeRemoved(int index);
82  void engineUpdated(int index);
83 
84  private:
86 
87 };
88 
89 #endif // ENGINE_MANAGER_H
The EngineConfiguration class defines a chess engine configuration.
Definition: engineconfiguration.h:32
Manages chess engines and their configurations.
Definition: enginemanager.h:29