Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
61 linhas
1.5 KiB
61 linhas
1.5 KiB
/* VierGewinnt - A simple 4-in-a-row network game
|
|
*
|
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
|
* http://www.seba-geek.de
|
|
*
|
|
* This file is part of VierGewinnt.
|
|
*
|
|
* VierGewinnt is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* VierGewinnt is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with VierGewinnt. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __NEWGAME_H
|
|
#define __NEWGAME_H
|
|
|
|
#include <QDialog>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
#include <QVBoxLayout>
|
|
#include <QHBoxLayout>
|
|
#include <QTcpSocket>
|
|
#include <QTextStream>
|
|
|
|
|
|
class NewGameDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
NewGameDialog(QTcpSocket *sock, QWidget *parent=0);
|
|
|
|
void reset(bool won);
|
|
void netPlayerAck();
|
|
|
|
private slots:
|
|
void localAck();
|
|
void closeGame();
|
|
|
|
private:
|
|
QVBoxLayout *layout;
|
|
QHBoxLayout *buttonrow;
|
|
QLabel *gameend;
|
|
QLabel *newgame;
|
|
QLabel *netplayer;
|
|
QPushButton *ok;
|
|
QPushButton *cancel;
|
|
QTcpSocket *mysock;
|
|
|
|
bool myack, youack;
|
|
};
|
|
|
|
#endif
|