From f85d962af28bb4b916e5755acad9047d2d47b6c8 Mon Sep 17 00:00:00 2001 From: doitux Date: Thu, 15 Feb 2007 00:57:04 +0000 Subject: [PATCH] add joinnewgamedialog --- pokerth.pro | 5 +- src/gui/qt/joinnetworkgamedialog.ui | 209 +++++++++++------- .../joinnetworkgamedialog.cpp | 32 +++ .../joinnetworkgamedialog.h | 39 ++++ src/gui/qt/mainwindow/mainwindowimpl.cpp | 12 +- src/gui/qt/mainwindow/mainwindowimpl.h | 2 + 6 files changed, 217 insertions(+), 82 deletions(-) create mode 100644 src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.cpp create mode 100644 src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.h diff --git a/pokerth.pro b/pokerth.pro index 97e23e1e..4989d99c 100755 --- a/pokerth.pro +++ b/pokerth.pro @@ -9,13 +9,15 @@ TARGET.path = /usr/bin/ FORMS += mainwindow.ui \ aboutpokerth.ui \ newgamedialog.ui \ - settingsdialog.ui + settingsdialog.ui \ + joinnetworkgamedialog.ui HEADERS += tinystr.h \ tinyxml.h \ mainwindowimpl.h \ newgamedialogimpl.h \ aboutpokerthimpl.h \ settingsdialogimpl.h \ + joinnetworkgamedialog.h \ configfile.h \ log.h \ guiinterface.h \ @@ -51,6 +53,7 @@ SOURCES += pokerth.cpp \ newgamedialogimpl.cpp \ aboutpokerthimpl.cpp \ settingsdialogimpl.cpp \ + joinnetworkgamedialog.cpp \ configfile.cpp \ log.cpp \ guiinterface.cpp \ diff --git a/src/gui/qt/joinnetworkgamedialog.ui b/src/gui/qt/joinnetworkgamedialog.ui index 17d824bd..cb474fa1 100644 --- a/src/gui/qt/joinnetworkgamedialog.ui +++ b/src/gui/qt/joinnetworkgamedialog.ui @@ -19,18 +19,110 @@ 6 - - + + Qt::Horizontal - - - 40 - 20 - + + + + + + Quick Connect - + + + 9 + + + 6 + + + + + IP Address / Domain Name: + + + + + + + Port: + + + + + + + Password (optional): + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 8 + 20 + + + + + + + + + + + + + + + + + Connect + + + + + + + Use IPv6 + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 1 + + + + + + + + + + + Close + + @@ -84,17 +176,17 @@ - Server + Server - Address + Address - Port + Port @@ -107,81 +199,38 @@ - - + + Qt::Horizontal - - - - - - Quick Connect + + + 40 + 20 + - - - 9 - - - 6 - - - - - - - - Password (optional): - - - - - - - Use IPv6 - - - - - - - - - - - - - Port: - - - - - - - IP Address / Domain Name: - - - - - - - Connect - - - - - - - - - - Close - - + - + + + pushButton + clicked() + joinNetworkGameDialog + reject() + + + 512 + 446 + + + 405 + 443 + + + + diff --git a/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.cpp b/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.cpp new file mode 100644 index 00000000..861f7185 --- /dev/null +++ b/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.cpp @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * This program 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. * + * * + * This program 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 this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "joinnetworkgamedialog.h" +// #include "configfile.h" + +joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent) + : QDialog(parent) +{ + + setupUi(this); + + + +} + diff --git a/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.h b/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.h new file mode 100644 index 00000000..6df96e8f --- /dev/null +++ b/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialog.h @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * This program 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. * + * * + * This program 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 this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef JOINNETWORKGAMEDIALOGIMPL_H +#define JOINNETWORKGAMEDIALOGIMPL_H + +#include "ui_joinnetworkgamedialog.h" + +#include +#include +#include + + +class joinNetworkGameDialogImpl: public QDialog, public Ui::joinNetworkGameDialog { +Q_OBJECT +public: + joinNetworkGameDialogImpl(QWidget *parent = 0); + +public slots: + +}; + +#endif diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 2769a01d..8fe2852a 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -22,6 +22,8 @@ #include "newgamedialogimpl.h" #include "aboutpokerthimpl.h" #include "settingsdialogimpl.h" +#include "joinnetworkgamedialog.h" + #include "startsplash.h" #include "mycardspixmaplabel.h" @@ -429,8 +431,10 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent) connect( actionNewGame, SIGNAL( triggered() ), this, SLOT( callNewGameDialog() ) ); connect( actionAboutPokerth, SIGNAL( triggered() ), this, SLOT( callAboutPokerthDialog() ) ); connect( actionSettings, SIGNAL( triggered() ), this, SLOT( callSettingsDialog() ) ); + connect( actionJoin_network_Game, SIGNAL( triggered() ), this, SLOT( callJoinNetworkGameDialog() ) ); connect( actionQuit, SIGNAL( triggered() ), qApp, SLOT( quit() ) ); - + actionCreate_network_Game->setVisible(FALSE); + connect( pushButton_raise, SIGNAL( clicked() ), this, SLOT( myRaise() ) ); connect( pushButton_call, SIGNAL( clicked() ), this, SLOT( myCall() ) ); connect( pushButton_bet, SIGNAL( clicked() ), this, SLOT( myBet() ) ); @@ -537,6 +541,12 @@ void mainWindowImpl::callAboutPokerthDialog() { v->exec(); } +void mainWindowImpl::callJoinNetworkGameDialog() { + + joinNetworkGameDialogImpl *v = new joinNetworkGameDialogImpl(); + v->exec(); +} + void mainWindowImpl::callSettingsDialog() { settingsDialogImpl *v = new settingsDialogImpl(); diff --git a/src/gui/qt/mainwindow/mainwindowimpl.h b/src/gui/qt/mainwindow/mainwindowimpl.h index 3a636ba2..0a32b96c 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.h +++ b/src/gui/qt/mainwindow/mainwindowimpl.h @@ -90,6 +90,8 @@ public slots: void callNewGameDialog() ; void callAboutPokerthDialog(); void callSettingsDialog(); + void callJoinNetworkGameDialog(); + void myFold(); void myCheck(); void myCall();