File indexing completed on 2024-04-28 04:03:11

0001 /*
0002  *  This file is part of Knights, a chess board for KDE SC 4.
0003  *  SPDX-FileCopyrightText: 2009, 2010, 2011 Miha Čančula <miha@noughmad.eu>
0004  *
0005  *  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006  */
0007 
0008 #ifndef KNIGHTS_EXTERNALCONTROL_H
0009 #define KNIGHTS_EXTERNALCONTROL_H
0010 
0011 #include <QObject>
0012 
0013 namespace Knights {
0014 
0015 class Move;
0016 
0017 class ExternalControl : public QObject {
0018     Q_OBJECT
0019     Q_CLASSINFO("D-Bus Interface", "org.kde.Knights")
0020 
0021 public:
0022     explicit ExternalControl(QObject* parent = nullptr);
0023     ~ExternalControl() override;
0024 
0025 public Q_SLOTS:
0026     void movePiece(const QString& move);
0027     void pauseGame();
0028     void resumeGame();
0029     void undo();
0030     void offerDraw();
0031     void adjourn();
0032     void abort();
0033     void slotMoveMade(const Move& move);
0034 
0035 Q_SIGNALS:
0036     void moveMade(const QString& move);
0037 };
0038 
0039 }
0040 
0041 #endif // KNIGHTS_EXTERNALCONTROL_H