QTfrontend/teamselhelper.cpp
author unc0rr
Sat, 21 Jan 2006 16:18:19 +0000
changeset 55 e09f7c952a40
parent 50 9ab4067dabec
child 61 505691a09dee
permissions -rw-r--r--
Send run parameters by cmd line, game parameters by IPC... breaks network game

#include "teamselhelper.h"

#include <QPixmap>
#include <QPushButton>

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

TeamShowWidget::TeamShowWidget(tmprop team) :
  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);
}