QTfrontend/teamselhelper.cpp
author displacer
Sun, 05 Feb 2006 12:48:35 +0000
changeset 61 505691a09dee
parent 50 9ab4067dabec
child 63 27e2b5bb6d4b
permissions -rw-r--r--
colors added to teamselwidget
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     1
#include "teamselhelper.h"
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     2
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     3
#include <QPixmap>
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     4
#include <QPushButton>
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     5
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     6
void TeamLabel::teamButtonClicked()
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     7
{
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     8
  emit teamActivated(text());
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     9
}
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    10
61
505691a09dee colors added to teamselwidget
displacer
parents: 50
diff changeset
    11
TeamShowWidget::TeamShowWidget(tmprop team, QWidget * parent) :
505691a09dee colors added to teamselwidget
displacer
parents: 50
diff changeset
    12
  QWidget(parent), mainLayout(this), m_team(team)
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    13
{
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    14
  QLabel* pixlbl=new QLabel();
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    15
  pixlbl->setPixmap(QPixmap("./Data/Graphics/thinking.png"));
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    16
  mainLayout.addWidget(pixlbl);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    17
  
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    18
  TeamLabel* lbl=new TeamLabel(team.teamName);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    19
  mainLayout.addWidget(lbl);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    20
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    21
  QPushButton* butt=new QPushButton("o");
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    22
  mainLayout.addWidget(butt);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    23
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    24
  QObject::connect(butt, SIGNAL(clicked()), this, SLOT(activateTeam()));
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    25
}
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    26
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    27
void TeamShowWidget::activateTeam()
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    28
{
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    29
  emit teamStatusChanged(m_team);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    30
}