Cute Chess  0.1
enginemanager.h
1 /*
2  This file is part of Cute Chess.
3  Copyright (C) 2008-2018 Cute Chess authors
4 
5  Cute Chess 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 3 of the License, or
8  (at your option) any later version.
9 
10  Cute Chess is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef ENGINE_MANAGER_H
20 #define ENGINE_MANAGER_H
21 
22 #include <QSet>
23 #include "engineconfiguration.h"
24 
30 class LIB_EXPORT EngineManager : public QObject
31 {
32  Q_OBJECT
33 
34  public:
36  EngineManager(QObject* parent = nullptr);
37  virtual ~EngineManager();
38 
40  int engineCount() const;
42  EngineConfiguration engineAt(int index) const;
43 
45  void addEngine(const EngineConfiguration& engine);
47  void updateEngineAt(int index, const EngineConfiguration& engine);
49  void removeEngineAt(int index);
50 
52  QList<EngineConfiguration> engines() const;
54  void setEngines(const QList<EngineConfiguration>& engines);
55 
60  bool supportsVariant(const QString& variant) const;
61 
62  void loadEngines(const QString& fileName);
63  void saveEngines(const QString& fileName);
64 
66  QSet<QString> engineNames() const;
67 
68  signals:
73  void enginesReset();
75  void engineAdded(int index);
81  void engineAboutToBeRemoved(int index);
83  void engineUpdated(int index);
84 
85  private:
87 
88 };
89 
90 #endif // ENGINE_MANAGER_H
The EngineConfiguration class defines a chess engine configuration.
Definition: engineconfiguration.h:33
Manages chess engines and their configurations.
Definition: enginemanager.h:30