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.

selectmaster.h 1.5KB

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