Cute Chess  0.1
enginemanagementwidget.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 ENGINEMANAGEMENTWIDGET_H
19 #define ENGINEMANAGEMENTWIDGET_H
20 
21 #include <QWidget>
22 #include <engineconfiguration.h>
23 
24 class EngineManager;
26 class QModelIndex;
27 
28 namespace Ui {
30 }
31 
37 {
38  Q_OBJECT
39 
40  public:
42  EngineManagementWidget(QWidget* parent = nullptr);
44  virtual ~EngineManagementWidget();
45 
50  bool hasConfigChanged() const;
51 
53  void saveConfig();
54 
55  private slots:
56  void updateUi();
57  void updateSearch(const QString& terms);
58  void addEngine();
59  void configureEngine();
60  void configureEngine(const QModelIndex& index);
61  void removeEngine();
62  void browseDefaultLocation();
63 
64  private:
65  void updateEngineCount();
66 
67  EngineManager* m_engineManager;
68  bool m_hasChanged;
69  QSortFilterProxyModel* m_filteredModel;
70  Ui::EngineManagementWidget* ui;
71 };
72 
73 #endif // ENGINEMANAGEMENTWIDGET_H
The EngineManagementWidget class provides a dialog for chess engine management.
Definition: enginemanagementwidget.h:36
Definition: engineconfigurationdlg.h:30
Manages chess engines and their configurations.
Definition: enginemanager.h:29
bool hasConfigChanged() const
Definition: enginemanagementwidget.cpp:86
virtual ~EngineManagementWidget()
Definition: enginemanagementwidget.cpp:81
void saveConfig()
Definition: enginemanagementwidget.cpp:91
EngineManagementWidget(QWidget *parent=nullptr)
Definition: enginemanagementwidget.cpp:34