Files
pokerth/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h
T

99 lines
2.2 KiB
C++
Raw Normal View History

2007-08-20 21:23:03 +00:00
//
// 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 <QtGui>
#include <QtCore>
#include <iostream>
2007-08-21 23:31:09 +00:00
#include "createinternetgamedialogimpl.h"
2007-08-29 22:30:18 +00:00
#include "sdlplayer.h"
#include "mainwindowimpl.h"
2007-08-21 23:31:09 +00:00
class Session;
class ConfigFile;
2007-09-07 20:26:13 +00:00
class LobbyChat;
2007-08-20 21:23:03 +00:00
/**
@author FThauer FHammer <webmaster@pokerth.net>
*/
class gameLobbyDialogImpl: public QDialog, public Ui::gameLobbyDialog {
Q_OBJECT
public:
gameLobbyDialogImpl(QWidget *parent = 0, ConfigFile* = 0);
~gameLobbyDialogImpl();
2007-08-20 21:23:03 +00:00
void exec();
void setSession(Session *session);
2007-09-07 20:26:13 +00:00
Session& getSession() { return *mySession; }
2007-08-29 22:30:18 +00:00
void setMyW ( mainWindowImpl* theValue ) { myW = theValue; }
2007-08-20 21:23:03 +00:00
public slots:
void createGame();
void joinGame();
2007-08-20 21:23:03 +00:00
void gameSelected(QTreeWidgetItem*, QTreeWidgetItem*);
void updateGameItem(QTreeWidgetItem *item, unsigned gameId);
void addGame(unsigned gameId);
void removeGame(unsigned gameId);
void gameAddPlayer(unsigned gameId, unsigned playerId);
void gameRemovePlayer(unsigned gameId, unsigned playerId);
void setCurrentGameName ( const QString& theValue ) { currentGameName = theValue; }
QString getCurrentGameName() const { return currentGameName; }
2007-08-29 22:30:18 +00:00
void checkPlayerQuantity();
void joinedNetworkGame(unsigned, QString, int);
void addConnectedPlayer(unsigned, QString, int);
void updatePlayer(unsigned, QString);
void removePlayer(unsigned, QString);
void playerSelected(QTreeWidgetItem*, QTreeWidgetItem*);
void refresh(int actionID);
void removedFromGame(int reason);
void startGame();
void leaveGame();
void kickPlayer();
void gameModeDialogUpdate();
void clearDialog();
void sendChatMessage();
void displayChatMessage(QString nickName, QString msg);
2007-09-07 20:26:13 +00:00
void checkChatInputLength(QString string);
void keyPressEvent(QKeyEvent * event);
private:
2007-08-29 22:30:18 +00:00
mainWindowImpl* myW;
ConfigFile *myConfig;
Session *mySession;
2007-08-21 23:31:09 +00:00
createInternetGameDialogImpl *myCreateInternetGameDialog;
2007-09-07 20:26:13 +00:00
LobbyChat *myChat;
QString currentGameName;
2007-08-29 22:30:18 +00:00
bool isAdmin;
2007-08-20 21:23:03 +00:00
};
#endif