File indexing completed on 2024-04-28 04:03:11
0001 /*************************************************************************** 0002 File : gamedialog.cpp 0003 Project : Knights 0004 Description : Game Dialog 0005 -------------------------------------------------------------------- 0006 SPDX-FileCopyrightText: 2016-2018 Alexander Semke (alexander.semke@web.de) 0007 SPDX-FileCopyrightText: 2009-2011 Miha Čančula (miha@noughmad.eu) 0008 0009 ***************************************************************************/ 0010 0011 /*************************************************************************** 0012 * * 0013 * SPDX-License-Identifier: GPL-2.0-or-later 0014 * * 0015 * This program is distributed in the hope that it will be useful, * 0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0018 * GNU General Public License for more details. * 0019 * * 0020 * You should have received a copy of the GNU General Public License * 0021 * along with this program; if not, write to the Free Software * 0022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0023 * Boston, MA 02110-1301 USA * 0024 * * 0025 ***************************************************************************/ 0026 #ifndef KNIGHTS_GAMEDIALOG_H 0027 #define KNIGHTS_GAMEDIALOG_H 0028 0029 #include <QDialog> 0030 0031 namespace Ui { 0032 class GameDialog; 0033 } 0034 0035 namespace Knights { 0036 0037 class GameDialog : public QDialog { 0038 Q_OBJECT 0039 0040 public: 0041 enum FicsMode { 0042 NoFics, 0043 PlayerVsFics, 0044 ComputerVsFics, 0045 BothPlayersFics 0046 }; 0047 0048 explicit GameDialog ( QWidget* parent = nullptr, Qt::WindowFlags f = {} ); 0049 ~GameDialog() override; 0050 0051 void setupProtocols(); 0052 void save(); 0053 0054 private: 0055 Ui::GameDialog* ui; 0056 QPushButton* okButton; 0057 0058 private Q_SLOTS: 0059 void player1SettingsChanged(); 0060 void player2SettingsChanged(); 0061 void timeControlChanged(); 0062 void updateTimeEdits(); 0063 void networkStatusChanged(bool isOnline); 0064 void loadEngines(); 0065 void showEngineConfigDialog(); 0066 void checkOkButton(); 0067 }; 0068 0069 } 0070 0071 #endif // KNIGHTS_GAMEDIALOG_H