add GameLobbyDialog

This commit is contained in:
doitux
2007-08-20 21:23:03 +00:00
parent e08f8126aa
commit 23963e4ac5
7 changed files with 238 additions and 7 deletions
+129
View File
@@ -0,0 +1,129 @@
<ui version="4.0" >
<class>gameLobbyDialog</class>
<widget class="QDialog" name="gameLobbyDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>476</width>
<height>470</height>
</rect>
</property>
<property name="windowTitle" >
<string>Game Lobby</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QTreeWidget" name="treeWidget_GameList" >
<column>
<property name="text" >
<string>Game</string>
</property>
</column>
</widget>
</item>
<item row="2" column="0" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Lobby-Chat</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>7</number>
</property>
<property name="spacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QTextBrowser" name="textBrowser_ChatDisplay" />
</item>
<item row="1" column="0" >
<widget class="QLineEdit" name="lineEdit_ChatInput" />
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_CreateGame" >
<property name="text" >
<string>Create Game</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_JoinGame" >
<property name="text" >
<string>Join Game</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Cancel" >
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>treeWidget_GameList</tabstop>
<tabstop>pushButton_CreateGame</tabstop>
<tabstop>pushButton_Cancel</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>pushButton_Cancel</sender>
<signal>clicked()</signal>
<receiver>gameLobbyDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>465</x>
<y>213</y>
</hint>
<hint type="destinationlabel" >
<x>276</x>
<y>163</y>
</hint>
</hints>
</connection>
</connections>
</ui>
@@ -0,0 +1,32 @@
//
// C++ Implementation: gamelobbydialogimpl
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "gamelobbydialogimpl.h"
gameLobbyDialogImpl::gameLobbyDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c)
{
setupUi(this);
}
void gameLobbyDialogImpl::exec()
{
QDialog::exec();
}
gameLobbyDialogImpl::~gameLobbyDialogImpl()
{
}
@@ -0,0 +1,41 @@
//
// C++ Interface: gamelobbydialogimpl
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef GAMELOBBYDIALOGIMPL_H
#define GAMELOBBYDIALOGIMPL_H
#include <ui_gamelobbydialog.h>
#include "configfile.h"
#include <QtGui>
#include <QtCore>
/**
@author FThauer FHammer <webmaster@pokerth.net>
*/
class gameLobbyDialogImpl: public QDialog, public Ui::gameLobbyDialog {
Q_OBJECT
public:
gameLobbyDialogImpl(QWidget *parent = 0, ConfigFile* = 0);
~gameLobbyDialogImpl();
void exec();
public slots:
private:
ConfigFile *myConfig;
};
#endif
+14 -2
View File
@@ -6084,9 +6084,16 @@
<property name="title" >
<string>Game</string>
</property>
<widget class="QMenu" name="menuNetwork_Game" >
<property name="title" >
<string>Network Game</string>
</property>
<addaction name="actionCreate_network_Game" />
<addaction name="actionJoin_network_Game" />
</widget>
<addaction name="actionNewGame" />
<addaction name="actionCreate_network_Game" />
<addaction name="actionJoin_network_Game" />
<addaction name="menuNetwork_Game" />
<addaction name="actionInternet_Game" />
<addaction name="actionSettings" />
<addaction name="actionAboutPokerth" />
<addaction name="actionQuit" />
@@ -6175,6 +6182,11 @@
<string>Ctrl+L</string>
</property>
</action>
<action name="actionInternet_Game" >
<property name="text" >
<string>Internet Game ...</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
+9 -1
View File
@@ -28,6 +28,7 @@
#include "createnetworkgamedialogimpl.h"
#include "startnetworkgamedialogimpl.h"
#include "changehumanplayernamedialogimpl.h"
#include "gamelobbydialogimpl.h"
#include "startsplash.h"
#include "mycardspixmaplabel.h"
@@ -528,7 +529,8 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
myStartNetworkGameDialog = new startNetworkGameDialogImpl(this, myConfig);
myCreateNetworkGameDialog = new createNetworkGameDialogImpl(this, myConfig);
myAboutPokerthDialog = new aboutPokerthImpl(this);
myGameLobbyDialog = new gameLobbyDialogImpl(this, myConfig);
myStartNetworkGameDialog->setMyW(this);
// //ShortCuts
@@ -578,6 +580,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
connect( actionSettings, SIGNAL( triggered() ), this, SLOT( callSettingsDialog() ) );
connect( actionJoin_network_Game, SIGNAL( triggered() ), this, SLOT( callJoinNetworkGameDialog() ) );
connect( actionCreate_network_Game, SIGNAL( triggered() ), this, SLOT( callCreateNetworkGameDialog() ) );
connect( actionInternet_Game, SIGNAL( triggered() ), this, SLOT( callGameLobbyDialog() ) );
connect( actionQuit, SIGNAL( triggered() ), this, SLOT( quitPokerTH() ) );
connect( actionFullScreen, SIGNAL( triggered() ), this, SLOT( switchFullscreen() ) );
connect( actionShowHideChat, SIGNAL( triggered() ), this, SLOT( switchChatWindow() ) );
@@ -803,6 +806,11 @@ void mainWindowImpl::callJoinNetworkGameDialog() {
}
}
void mainWindowImpl::callGameLobbyDialog() {
myGameLobbyDialog->exec();
}
void mainWindowImpl::callSettingsDialog() {
mySettingsDialog->exec();
+4
View File
@@ -49,6 +49,7 @@ class connectToServerDialogImpl;
class createNetworkGameDialogImpl;
class startNetworkGameDialogImpl;
class changeHumanPlayerNameDialogImpl;
class gameLobbyDialogImpl;
class QColor;
@@ -168,6 +169,7 @@ public slots:
void callSettingsDialog();
void callCreateNetworkGameDialog();
void callJoinNetworkGameDialog();
void callGameLobbyDialog();
void myBetRaise();
void myFoldAllin();
@@ -378,6 +380,8 @@ private:
connectToServerDialogImpl *myConnectToServerDialog;
startNetworkGameDialogImpl *myStartNetworkGameDialog;
createNetworkGameDialogImpl *myCreateNetworkGameDialog;
gameLobbyDialogImpl *myGameLobbyDialog;
//Sound
SDLPlayer *mySDLPlayer;