Cute Chess 0.1
newtournamentdialog.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 NEWTOURNAMENTDIALOG_H
20#define NEWTOURNAMENTDIALOG_H
21
22#include <QDialog>
23#include <timecontrol.h>
24
25class QModelIndex;
26class QItemSelection;
27class EngineManager;
30class GameManager;
31class Tournament;
32
33namespace Ui {
34 class NewTournamentDialog;
35}
36
37class NewTournamentDialog : public QDialog
38{
39 Q_OBJECT
40
41 public:
42 explicit NewTournamentDialog(EngineManager* engineManager,
43 QWidget* parent = nullptr);
44 virtual ~NewTournamentDialog();
45
46 Tournament* createTournament(GameManager* gameManager) const;
47
48 private slots:
49 void addEngineOnDblClick(const QModelIndex& index);
50 void addEngine();
51 void removeEngine();
52 void configureEngine(const QModelIndex& index);
53 void onVariantChanged(const QString& variant);
54 void onPlayerSelectionChanged(const QItemSelection& selected,
55 const QItemSelection& deselected);
56
57 private:
58 void moveEngine(int offset);
59 bool canStart() const;
60 void readSettings();
61
62 EngineManager* m_srcEngineManager;
63 EngineManager* m_addedEnginesManager;
64 EngineConfigurationModel* m_srcEnginesModel;
65 EngineConfigurationModel* m_addedEnginesModel;
67 Ui::NewTournamentDialog* ui;
68};
69
70#endif // NEWTOURNAMENTDIALOG_H
The EngineConfigurationModel class represents a chess engine configuration based model.
Definition engineconfigurationmodel.h:44
A proxy model for sorting and filtering engine configurations.
Definition engineconfigproxymodel.h:33
Manages chess engines and their configurations.
Definition enginemanager.h:31
A class for managing chess games and players.
Definition gamemanager.h:41
Base class for chess tournaments.
Definition tournament.h:45