QTfrontend/teamselhelper.cpp
author unc0rr
Wed, 28 Jun 2006 18:27:42 +0000
changeset 71 5f56c6979496
parent 63 27e2b5bb6d4b
child 80 3c3dc6a148ca
permissions -rw-r--r--
- Changed falling damage scoring - Update version to 0.2 - Bots avoid explosions caused by their weapon - Fix camera movement

#include "teamselhelper.h"

#include <QPixmap>
#include <QPushButton>

#include <iostream>

void TeamLabel::teamButtonClicked()
{
  emit teamActivated(text());
}

TeamShowWidget::TeamShowWidget(tmprop team, QWidget * parent) :
  QWidget(parent), mainLayout(this), m_team(team)
{
  QLabel* pixlbl=new QLabel();
  pixlbl->setPixmap(QPixmap("./Data/Graphics/thinking.png"));
  mainLayout.addWidget(pixlbl);

  TeamLabel* lbl=new TeamLabel(team.teamName);
  mainLayout.addWidget(lbl);

  QPushButton* butt=new QPushButton("o");
  mainLayout.addWidget(butt);

  QObject::connect(butt, SIGNAL(clicked()), this, SLOT(activateTeam()));
}

void TeamShowWidget::activateTeam()
{
  emit teamStatusChanged(m_team);
}