20 #ifndef KEXTHIGHSCORE_GUI_H 21 #define KEXTHIGHSCORE_GUI_H 23 #include <tqcheckbox.h> 26 #include <tqtabwidget.h> 28 #include <tdelistview.h> 29 #include <klineedit.h> 30 #include <kpushbutton.h> 31 #include <kdialogbase.h> 33 #include "kexthighscore.h" 45 class ShowItem :
public TDEListViewItem
48 ShowItem(TQListView *,
bool highlight);
51 virtual void paintCell(TQPainter *,
const TQColorGroup &,
int column,
52 int width,
int align);
58 class ScoresList :
public TDEListView
63 ScoresList(TQWidget *parent);
65 void addHeader(
const ItemArray &);
68 TQListViewItem *addLine(
const ItemArray &, uint index,
bool highlight);
69 virtual TQString itemText(
const ItemContainer &, uint row)
const = 0;
72 virtual void addLineItem(
const ItemArray &, uint index,
73 TQListViewItem *item);
77 class HighscoresList :
public ScoresList
82 HighscoresList(TQWidget *parent);
84 void load(
const ItemArray &,
int highlight);
87 TQString itemText(
const ItemContainer &, uint row)
const;
90 class HighscoresWidget :
public TQWidget
95 HighscoresWidget(TQWidget *parent);
100 void tabChanged(
int i);
103 void changeTab(
int i);
106 void showURL(
const TQString &)
const;
107 void tabChanged() { emit tabChanged(_tw->currentPageIndex()); }
111 HighscoresList *_scoresList, *_playersList;
112 KURLLabel *_scoresUrl, *_playersUrl;
113 AdditionalTab *_statsTab, *_histoTab;
116 class HighscoresDialog :
public KDialogBase
121 HighscoresDialog(
int rank, TQWidget *parent);
126 void tabChanged(
int i) { _tab = i; }
127 void createPage(TQWidget *);
132 TQValueVector<HighscoresWidget *> _widgets;
136 class LastMultipleScoresList :
public ScoresList
141 LastMultipleScoresList(
const TQValueVector<Score> &, TQWidget *parent);
144 void addLineItem(
const ItemArray &, uint index, TQListViewItem *line);
145 TQString itemText(
const ItemContainer &, uint row)
const;
148 const TQValueVector<Score> &_scores;
151 class TotalMultipleScoresList :
public ScoresList
156 TotalMultipleScoresList(
const TQValueVector<Score> &, TQWidget *parent);
159 void addLineItem(
const ItemArray &, uint index, TQListViewItem *line);
160 TQString itemText(
const ItemContainer &, uint row)
const;
163 const TQValueVector<Score> &_scores;
167 class ConfigDialog :
public KDialogBase
172 ConfigDialog(TQWidget *parent);
174 bool hasBeenSaved()
const {
return _saved; }
180 void slotApply() { save(); }
181 void nickNameChanged(
const TQString &);
185 TQCheckBox *_WWHEnabled;
186 TQLineEdit *_nickname, *_comment;
187 KLineEdit *_key, *_registeredName;
188 KPushButton *_removeButton;
195 class AskNameDialog :
public KDialogBase
200 AskNameDialog(TQWidget *parent);
202 TQString name()
const {
return _edit->text(); }
203 bool dontAskAgain()
const {
return _checkbox->isChecked(); }
210 TQCheckBox *_checkbox;