20#ifndef KEXTHIGHSCORE_TAB_H
21#define KEXTHIGHSCORE_TAB_H
23#include <tqcombobox.h>
24#include <tqmemarray.h>
30namespace KExtHighscore
34class PlayersCombo :
public TQComboBox
39 PlayersCombo(TQWidget *parent = 0,
const char *name = 0);
44 void playerSelected(uint i);
49 void activatedSlot(
int i);
53class AdditionalTab :
public TQWidget
58 AdditionalTab(TQWidget *parent,
const char *name);
63 void playerSelected(uint i) { display(i) ; }
68 static TQString percent(uint n, uint total,
bool withBraces =
false);
69 virtual void display(uint i) = 0;
76class StatisticsTab :
public AdditionalTab
81 StatisticsTab(TQWidget *parent);
86 enum Count { Total = 0, Won, Lost, Draw, Nb_Counts };
87 static const char *COUNT_LABELS[Nb_Counts];
88 enum Trend { CurrentTrend = 0, WonTrend, LostTrend, Nb_Trends };
89 static const char *TREND_LABELS[Nb_Trends];
91 uint count[Nb_Counts];
92 double trend[Nb_Trends];
94 TQMemArray<Data> _data;
95 TQLabel *_nbs[Nb_Counts], *_percents[Nb_Counts], *_trends[Nb_Trends];
97 TQString percent(
const Data &, Count)
const;
102class HistogramTab :
public AdditionalTab
107 HistogramTab(TQWidget *parent);
112 TQMemArray<uint> _counts;
113 TQMemArray<uint> _data;
116 void display(uint i);