Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

85 rindas
2.0 KiB

#ifndef __FINDSERVER_H
#define __FINDSERVER_H
#include <QApplication>
#include <QStringList>
#include <QTreeWidget>
#include <QTextEdit>
/* 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/>.
*/
#include <QLayout>
#include <QPushButton>
#include <QWidget>
#include <QTcpSocket>
#include "selectmaster.h"
#include "creategame.h"
#include "viergewinnt.h"
#include "about.h"
class FindServerWidget : public QWidget {
Q_OBJECT
public:
FindServerWidget(QWidget *parent=0);
private slots:
void refreshServerList();
void changeMaster();
void createGame();
void joinGame();
void procNet();
void procNetError(QAbstractSocket::SocketError e);
void procNetDisconnect();
private:
// main stuff
void addLog(QString str);
void startConnect();
void goToGameWindow();
// gns stuff
QTcpSocket *mysock;
QString masterserver;
int masterport;
bool ingame;
bool refreshonconnect;
int loginstate;
CreateGameDialog *cgamedialog;
// gui stuff
QTreeWidget *nettable;
QHBoxLayout *buttonrow;
QPushButton *refresh;
QPushButton *create;
QPushButton *join;
QPushButton *othermaster;
QPushButton *butabout;
QTextEdit *status;
SelectMasterDialog *masterdialog;
QVBoxLayout *layout;
VierGewinntWidget *vwinwid;
AboutDialog *about;
};
#endif