summaryrefslogtreecommitdiffstats
path: root/konquest/scoredlg.cc
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-12-11 16:15:55 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-12-11 16:19:06 +0900
commit5a413fcfb0c67a3f8173216352c5c87dbe3097e5 (patch)
tree2c4110256a0faa017d803c802f2e3011c2f095e4 /konquest/scoredlg.cc
parent5f8a7a3105f27c7b45d98a7a6063ef561a45dd29 (diff)
downloadtdegames-5a413fcfb0c67a3f8173216352c5c87dbe3097e5.tar.gz
tdegames-5a413fcfb0c67a3f8173216352c5c87dbe3097e5.zip
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 931f81f9fe49f3fe339bb3cb23501393bfbb2d0a)
Diffstat (limited to 'konquest/scoredlg.cc')
-rw-r--r--konquest/scoredlg.cc80
1 files changed, 0 insertions, 80 deletions
diff --git a/konquest/scoredlg.cc b/konquest/scoredlg.cc
deleted file mode 100644
index a633e3b6..00000000
--- a/konquest/scoredlg.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-#include <tqlayout.h>
-#include <tdeapplication.h>
-#include <tdelocale.h>
-#include <kpushbutton.h>
-#include <kstdguiitem.h>
-
-#include "scoredlg.h"
-
-ScoreDlgListViewItem::ScoreDlgListViewItem(TQListView *parent, TQString s1, TQString s2, TQString s3, TQString s4, TQString s5, TQString s6) : TQListViewItem(parent, s1, s2, s3, s4, s5, s6)
-{
-}
-
-int ScoreDlgListViewItem::compare(TQListViewItem *i, int col, bool) const
-{
- if (col == 0)
- {
- if (text(col) > i -> text(col)) return 1;
- else if (text(col) < i -> text(col)) return -1;
- else return 0;
- }
- else
- {
- if (text(col).toInt() > i -> text(col).toInt()) return 1;
- else if (text(col).toInt() < i -> text(col).toInt()) return -1;
- else return compare(i, 0, true);
- }
-}
-
-
-ScoreDlg::ScoreDlg( TQWidget *parent, const TQString& title, PlayerList *players )
- : TQDialog(parent, "ScoreDlg", true ), plrList(players)
-{
- setCaption( kapp->makeStdCaption(title) );
-
- scoreTable = new TDEListView( this, 0 );
- scoreTable->addColumn(i18n("Player"));
- scoreTable->addColumn(i18n("Ships Built"));
- scoreTable->addColumn(i18n("Planets Conquered"));
- scoreTable->addColumn(i18n("Fleets Launched"));
- scoreTable->addColumn(i18n("Fleets Destroyed"));
- scoreTable->addColumn(i18n("Ships Destroyed"));
- scoreTable->setMinimumSize( scoreTable->sizeHint() );
-
- KPushButton *okButton = new KPushButton( KStdGuiItem::ok(), this );
- okButton->setMinimumSize( okButton->sizeHint() );
- okButton->setDefault(true);
-
- TQVBoxLayout *layout1 = new TQVBoxLayout( this );
- TQHBoxLayout *layout2 = new TQHBoxLayout;
-
- layout1->addWidget( scoreTable, 1 );
- layout1->addLayout( layout2 );
-
- layout2->addStretch( 2 );
- layout2->addWidget( okButton );
- layout2->addStretch( 2 );
-
- connect( okButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()) );
-
- init();
-
- resize( 580, 140 );
-}
-
-void
-ScoreDlg::init()
-{
- Player *curPlayer;
- PlayerListIterator itr( *plrList );
-
- for( ;(curPlayer = itr()); )
- new ScoreDlgListViewItem(scoreTable,
- curPlayer->getName(),
- TQString("%1").arg(curPlayer->getShipsBuilt()),
- TQString("%1").arg(curPlayer->getPlanetsConquered()),
- TQString("%1").arg(curPlayer->getFleetsLaunched()),
- TQString("%1").arg(curPlayer->getEnemyFleetsDestroyed()),
- TQString("%1").arg(curPlayer->getEnemyShipsDestroyed()));
-}
-