QTfrontend/teamselect.h
author unc0rr
Wed, 26 Jul 2006 12:25:48 +0000
changeset 87 ff213e443336
parent 63 27e2b5bb6d4b
child 117 d21a48200772
permissions -rw-r--r--
Convert all pages to classes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     1
#ifndef _TEAM_SELECT_INCLUDED
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     2
#define _TEAM_SELECT_INCLUDED
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     3
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     4
#include <QWidget>
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     5
#include <QVBoxLayout>
63
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
     6
class QFrame;
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     7
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     8
#include <list>
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
     9
#include <map>
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    10
63
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    11
class TeamSelWidget;
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    12
class FrameTeams;
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    13
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    14
using namespace std;
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    15
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    16
struct tmprop
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    17
{
63
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    18
  tmprop(QString nm) : teamName(nm) {};
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    19
  QString teamName;
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    20
  QString pixmapFileName;
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    21
  bool operator==(const tmprop& t1) const {
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    22
    return teamName==t1.teamName;
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    23
  };
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    24
  bool operator<(const tmprop& t1) const {
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    25
    return teamName<t1.teamName;
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    26
  };
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    27
};
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    28
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    29
class TeamSelWidget : public QWidget
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    30
{
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    31
  Q_OBJECT
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    32
 
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    33
 public:
61
505691a09dee colors added to teamselwidget
displacer
parents: 50
diff changeset
    34
  TeamSelWidget(QWidget* parent=0);
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    35
  void addTeam(tmprop team);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    36
  void removeTeam(tmprop team);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    37
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    38
private slots:
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    39
  void changeTeamStatus(tmprop team);
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    40
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    41
 private:
63
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    42
  void addScrArea(FrameTeams* pfteams, QColor color);
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    43
  FrameTeams* frameDontPlaying;
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    44
  FrameTeams* framePlaying;
61
505691a09dee colors added to teamselwidget
displacer
parents: 50
diff changeset
    45
63
27e2b5bb6d4b Scroll added to team control widget
displacer
parents: 61
diff changeset
    46
  QVBoxLayout mainLayout;
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    47
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    48
  list<tmprop> curPlayingTeams;
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    49
  list<tmprop> curDontPlayingTeams;
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    50
};
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    51
9ab4067dabec TeamSelect widget alpha added
displacer
parents:
diff changeset
    52
#endif // _TEAM_SELECT_INCLUDED