QTfrontend/teamselhelper.cpp
author unc0rr
Wed, 01 Feb 2006 20:42:53 +0000
changeset 57 e1a77ae57065
parent 50 9ab4067dabec
child 61 505691a09dee
permissions -rw-r--r--
- Fixed compiling .) - Fixed camera following gears
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
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    11
TeamShowWidget::TeamShowWidget(tmprop team) :
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    12
  mainLayout(this), m_team(team)
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
}