kickplayer

This commit is contained in:
doitux
2007-06-05 20:54:16 +00:00
parent daa4af9409
commit fc948c176d
3 changed files with 78 additions and 30 deletions
@@ -29,7 +29,8 @@ startNetworkGameDialogImpl::startNetworkGameDialogImpl(QWidget *parent)
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
connect( pushButton_startGame, SIGNAL( clicked() ), this, SLOT( startGame() ) );
connect( pushButton_Kick, SIGNAL( clicked() ), this, SLOT( kickPlayer() ) );
connect( treeWidget, SIGNAL( itemClicked ( QTreeWidgetItem*, int) ), this, SLOT( playerSelected(QTreeWidgetItem*, int) ) );
}
void startNetworkGameDialogImpl::startGame() {
@@ -59,6 +60,21 @@ void startNetworkGameDialogImpl::removePlayer(QString playerName) {
checkPlayerQuantity();
}
void startNetworkGameDialogImpl::playerSelected(QTreeWidgetItem*, int) {
pushButton_Kick->setEnabled(TRUE);
}
void startNetworkGameDialogImpl::kickPlayer() {
QTreeWidgetItem *item = treeWidget->currentItem();
QString playerName = item->text(0);
// kickplayerFunktion(playerName.toStdString());
pushButton_Kick->setEnabled(FALSE);
}
void startNetworkGameDialogImpl::checkPlayerQuantity() {
if(treeWidget->topLevelItemCount() == maxPlayerNumber) pushButton_startGame->setEnabled(TRUE);