QTfrontend/teamselhelper.cpp
author displacer
Fri, 24 Feb 2006 16:06:12 +0000
changeset 63 27e2b5bb6d4b
parent 61 505691a09dee
child 80 3c3dc6a148ca
permissions -rw-r--r--
Scroll added to team control widget

#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);
}