Viergewinnt (four-in-a-row) implementation in c++ and QT
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

creategame.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __CREATEGAME_H
  2. /* VierGewinnt - A simple 4-in-a-row network game
  3. *
  4. * Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
  5. * http://www.seba-geek.de
  6. *
  7. * This file is part of VierGewinnt.
  8. *
  9. * VierGewinnt is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation, either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * VierGewinnt is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with VierGewinnt. If not, see <http://www.gnu.org/licenses/>.
  21. */
  22. #define __CREATEGAME_H
  23. #include <QDialog>
  24. #include <QString>
  25. #include <QLabel>
  26. #include <QLineEdit>
  27. #include <QGridLayout>
  28. #include <QPushButton>
  29. #include <QMessageBox>
  30. #include <QTextStream>
  31. #include <QTcpSocket>
  32. #include <sstream>
  33. class CreateGameDialog : public QDialog {
  34. Q_OBJECT
  35. public:
  36. CreateGameDialog(QTcpSocket *_mysock, QWidget *parent=0);
  37. // void reset();
  38. private slots:
  39. void startListen();
  40. private:
  41. QTcpSocket *mysock;
  42. QGridLayout *layout;
  43. // QLabel *stat;
  44. QLabel *gname;
  45. QLineEdit *editgname;
  46. QPushButton *ok;
  47. QPushButton *cancel;
  48. };
  49. #endif