summaryrefslogtreecommitdiffstats
path: root/blinken/src/highscoredialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'blinken/src/highscoredialog.cpp')
-rw-r--r--blinken/src/highscoredialog.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/blinken/src/highscoredialog.cpp b/blinken/src/highscoredialog.cpp
index 9c5a5287..b5dc749f 100644
--- a/blinken/src/highscoredialog.cpp
+++ b/blinken/src/highscoredialog.cpp
@@ -27,20 +27,20 @@ static const int namesFontSize = 25;
/* scoresWidget */
-class scoresWidget : public QWidget
+class scoresWidget : public TQWidget
{
public:
- scoresWidget(TQWidget *parent, const TQValueList< QPair<int, TQString> > &scores);
+ scoresWidget(TQWidget *tqparent, const TQValueList< TQPair<int, TQString> > &scores);
TQSize calcSize();
protected:
void paintEvent(TQPaintEvent *);
private:
- const TQValueList< QPair<int, TQString> > &m_scores;
+ const TQValueList< TQPair<int, TQString> > &m_scores;
};
-scoresWidget::scoresWidget(TQWidget *parent, const TQValueList< QPair<int, TQString> > &scores) : TQWidget(parent, 0, WStaticContents | WNoAutoErase), m_scores(scores)
+scoresWidget::scoresWidget(TQWidget *tqparent, const TQValueList< TQPair<int, TQString> > &scores) : TQWidget(tqparent, 0, WStaticContents | WNoAutoErase), m_scores(scores)
{
}
@@ -66,7 +66,7 @@ void scoresWidget::paintEvent(TQPaintEvent *)
p.translate(margin, margin);
- TQValueList< QPair<int, TQString> >::const_iterator it;
+ TQValueList< TQPair<int, TQString> >::const_iterator it;
for (it = m_scores.begin(); it != m_scores.end(); ++it)
{
counter::paint(p, !(*it).second.isEmpty(), (*it).first, false, TQColor(), TQColor(), TQColor());
@@ -92,11 +92,11 @@ TQSize scoresWidget::calcSize()
for (int i = 0; i < 3; i++)
{
lt = 0;
- TQValueList< QPair<int, TQString> >::const_iterator it;
+ TQValueList< TQPair<int, TQString> >::const_iterator it;
for (it = m_scores.begin(); it != m_scores.end(); ++it)
{
- r = p.boundingRect(TQRect(), Qt::AlignAuto, (*it).second);
- lt = QMAX(lt, r.width());
+ r = p.boundingRect(TQRect(), TQt::AlignAuto, (*it).second);
+ lt = TQMAX(lt, r.width());
}
}
@@ -112,20 +112,20 @@ TQSize scoresWidget::calcSize()
/* myTabWidget */
-class myTabWidget : public QTabWidget
+class myTabWidget : public TQTabWidget
{
public:
- myTabWidget(TQWidget *parent) : TQTabWidget(parent) {}
+ myTabWidget(TQWidget *tqparent) : TQTabWidget(tqparent) {}
TQSize tabBarSizeHint() const
{
- return tabBar() -> sizeHint();
+ return tabBar() -> tqsizeHint();
}
};
/* highScoreDialog */
-highScoreDialog::highScoreDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Highscores"), KDialogBase::Close)
+highScoreDialog::highScoreDialog(TQWidget *tqparent) : KDialogBase(tqparent, 0, true, i18n("Highscores"), KDialogBase::Close)
{
m_tw = new myTabWidget(this);
setMainWidget(m_tw);
@@ -133,10 +133,10 @@ highScoreDialog::highScoreDialog(TQWidget *parent) : KDialogBase(parent, 0, true
KConfig *cfg = kapp -> config();
for (int i = 1; i <= 3; i++)
{
- cfg -> setGroup(TQString("Level%1").arg(i));
+ cfg -> setGroup(TQString("Level%1").tqarg(i));
for (int j = 1; j <= 5; j++)
{
- m_scores[i-1].append(qMakePair(cfg->readNumEntry(TQString("Score%1").arg(j)), cfg->readEntry(TQString("Name%1").arg(j))));
+ m_scores[i-1].append(tqMakePair(cfg->readNumEntry(TQString("Score%1").tqarg(j)), cfg->readEntry(TQString("Name%1").tqarg(j))));
}
}
@@ -148,7 +148,7 @@ highScoreDialog::highScoreDialog(TQWidget *parent) : KDialogBase(parent, 0, true
bool highScoreDialog::scoreGoodEnough(int level, int score)
{
level--;
- TQValueList< QPair<int, TQString> >::iterator it, itEnd;
+ TQValueList< TQPair<int, TQString> >::iterator it, itEnd;
it = m_scores[level].begin();
itEnd = m_scores[level].end();
while (it != itEnd && (*it).first >= score) it++;
@@ -159,23 +159,23 @@ bool highScoreDialog::scoreGoodEnough(int level, int score)
void highScoreDialog::addScore(int level, int score, const TQString &name)
{
level--;
- TQValueList< QPair<int, TQString> >::iterator it, itEnd;
+ TQValueList< TQPair<int, TQString> >::iterator it, itEnd;
it = m_scores[level].begin();
itEnd = m_scores[level].end();
while (it != itEnd && (*it).first >= score) it++;
if (it != itEnd)
{
- m_scores[level].insert(it, qMakePair(score, name));
+ m_scores[level].insert(it, tqMakePair(score, name));
m_scores[level].remove(--m_scores[level].end());
KConfig *cfg = kapp -> config();
- cfg -> setGroup(TQString("Level%1").arg(level + 1));
+ cfg -> setGroup(TQString("Level%1").tqarg(level + 1));
int j;
for (it = m_scores[level].begin(), j = 1; it != m_scores[level].end(); ++it, j++)
{
- cfg->writeEntry(TQString("Score%1").arg(j), (*it).first);
- cfg->writeEntry(TQString("Name%1").arg(j), (*it).second);
+ cfg->writeEntry(TQString("Score%1").tqarg(j), (*it).first);
+ cfg->writeEntry(TQString("Name%1").tqarg(j), (*it).second);
}
cfg -> sync();
}