author | cniehaus <cniehaus> | 2003-06-01 13:48:07 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-06-01 13:48:07 (UTC) |
commit | 145faa6417fd952768d0abe15cc8b9920548d45f (patch) (side-by-side diff) | |
tree | d78efad22827115e07bf584425bf666f0f8d7e47 /noncore/games/backgammon/aidialog.cpp | |
parent | 316ced6af8e9492215ad0a39d43127665239503d (diff) | |
download | opie-145faa6417fd952768d0abe15cc8b9920548d45f.zip opie-145faa6417fd952768d0abe15cc8b9920548d45f.tar.gz opie-145faa6417fd952768d0abe15cc8b9920548d45f.tar.bz2 |
first patches for tr()-changes\!
Diffstat (limited to 'noncore/games/backgammon/aidialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/backgammon/aidialog.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/noncore/games/backgammon/aidialog.cpp b/noncore/games/backgammon/aidialog.cpp index 9642ca5..7dfe403 100644 --- a/noncore/games/backgammon/aidialog.cpp +++ b/noncore/games/backgammon/aidialog.cpp @@ -1,96 +1,96 @@ #include "aidialog.h" #include <qgroupbox.h> AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) : QDialog(parent,name,modal,f) { setCaption("AI Configuration"); - QGroupBox* settings=new QGroupBox("Settings",this); + QGroupBox* settings=new QGroupBox(tr( "Settings" ),this); settings->setGeometry(10,5,220,170); - QLabel* rescue_label=new QLabel("<b>Rescue</b>",settings); + QLabel* rescue_label=new QLabel(tr( "<b>Rescue</b>" ),settings); rescue_label->setGeometry(50,20,50,20); rescue=new QSpinBox(0,6,1,settings); rescue->setGeometry(100,20,40,20); - QPushButton* rescuehelp=new QPushButton("?",settings); + QPushButton* rescuehelp=new QPushButton(tr( "?" ),settings); rescuehelp->setGeometry(140,20,20,20); connect(rescuehelp,SIGNAL(pressed()),this,SLOT(rescuehelp_pressed())); connect(rescuehelp,SIGNAL(released()),this,SLOT(rescuehelp_released())); - QLabel* eliminate_label=new QLabel("<b>Eliminate</b>",settings); + QLabel* eliminate_label=new QLabel(tr( "<b>Eliminate</b>" ),settings); eliminate_label->setGeometry(50,40,50,20); eliminate=new QSpinBox(0,6,1,settings); eliminate->setGeometry(100,40,40,20); - QPushButton* eliminatehelp=new QPushButton("?",settings); + QPushButton* eliminatehelp=new QPushButton(tr( "?" ),settings); eliminatehelp->setGeometry(140,40,20,20); connect(eliminatehelp,SIGNAL(pressed()),this,SLOT(eliminatehelp_pressed())); connect(eliminatehelp,SIGNAL(released()),this,SLOT(eliminatehelp_released())); - QLabel* expose_label=new QLabel("<b>Expose</b>",settings); + QLabel* expose_label=new QLabel(tr( "<b>Expose</b>" ),settings); expose_label->setGeometry(50,60,50,20); expose=new QSpinBox(0,6,1,settings); expose->setGeometry(100,60,40,20); - QPushButton* exposeehelp=new QPushButton("?",settings); + QPushButton* exposeehelp=new QPushButton(tr( "?" ),settings); exposeehelp->setGeometry(140,60,20,20); connect(exposeehelp,SIGNAL(pressed()),this,SLOT(exposehelp_pressed())); connect(exposeehelp,SIGNAL(released()),this,SLOT(exposehelp_released())); - QLabel* protect_label=new QLabel("<b>Protect</b>",settings); + QLabel* protect_label=new QLabel(tr( "<b>Protect</b>" ),settings); protect_label->setGeometry(50,80,50,20); protect=new QSpinBox(0,6,1,settings); protect->setGeometry(100,80,40,20); - QPushButton* protecthelp=new QPushButton("?",settings); + QPushButton* protecthelp=new QPushButton(tr( "?" ),settings); protecthelp->setGeometry(140,80,20,20); connect(protecthelp,SIGNAL(pressed()),this,SLOT(protecthelp_pressed())); connect(protecthelp,SIGNAL(released()),this,SLOT(protecthelp_released())); - QLabel* safe_label=new QLabel("<b>Safe</b>",settings); + QLabel* safe_label=new QLabel(tr( "<b>Safe</b>" ),settings); safe_label->setGeometry(50,100,50,20); safe=new QSpinBox(0,6,1,settings); safe->setGeometry(100,100,40,20); - QPushButton* safeehelp=new QPushButton("?",settings); + QPushButton* safeehelp=new QPushButton(tr( "?" ),settings); safeehelp->setGeometry(140,100,20,20); connect(safeehelp,SIGNAL(pressed()),this,SLOT(safehelp_pressed())); connect(safeehelp,SIGNAL(released()),this,SLOT(safehelp_released())); - QLabel* empty_label=new QLabel("<b>Empty</b>",settings); + QLabel* empty_label=new QLabel(tr( "<b>Empty</b>" ),settings); empty_label->setGeometry(50,120,50,20); empty=new QSpinBox(0,6,1,settings); empty->setGeometry(100,120,40,20); - QPushButton* emptyhelp=new QPushButton("?",settings); + QPushButton* emptyhelp=new QPushButton(tr( "?" ),settings); emptyhelp->setGeometry(140,120,20,20); connect(emptyhelp,SIGNAL(pressed()),this,SLOT(emptyhelp_pressed())); connect(emptyhelp,SIGNAL(released()),this,SLOT(emptyhelp_released())); - defaultvalues=new QPushButton("Default Values",settings); + defaultvalues=new QPushButton(tr( "Default Values" ),settings); defaultvalues->setGeometry(60,140,90,20); connect(defaultvalues,SIGNAL(clicked()),this,SLOT(setDefaultValues())); - QGroupBox* helpbox=new QGroupBox("Help",this); + QGroupBox* helpbox=new QGroupBox(tr( "Help" ),this); helpbox->setGeometry(10,185,220,90); help=new QLabel(helpbox); help->setGeometry(10,15,200,65); setHelpText(); showMaximized(); } AI_Dialog::~AI_Dialog() { } void AI_Dialog::rescuehelp_pressed() { setHelpText("rescue"); } void AI_Dialog::rescuehelp_released() { setHelpText(); } @@ -161,51 +161,51 @@ void AI_Dialog::setAISettings(const AISettings& values) rescue->setValue(values.rescue); eliminate->setValue(values.eliminate); expose->setValue(values.expose); protect->setValue(values.protect); safe->setValue(values.safe); empty->setValue(values.empty); } AISettings AI_Dialog::getAISettings() { AISettings ai; ai.rescue=rescue->value(); ai.eliminate=eliminate->value(); ai.expose=expose->value(); ai.protect=protect->value(); ai.safe= safe->value(); ai.empty=empty->value(); return ai; } void AI_Dialog::setHelpText(const QString& type) { if(type=="rescue") { - help->setText("Bring the pieces out of the endzone"); + help->setText(tr( "Bring the pieces out of the endzone" )); } else if(type=="eliminate") { - help->setText("Eliminate an opponents piece"); + help->setText(tr( "Eliminate an opponents piece" )); } else if(type=="expose") { - help->setText("Expose you own pieces.\nAfter such a move only one piece will remain in the slot"); + help->setText(tr( "Expose you own pieces.\nAfter such a move only one piece will remain in the slot") ); } else if(type=="protect") { - help->setText("Protect a single piece by\nputting another one in this slot"); + help->setText(tr( "Protect a single piece by\nputting another one in this slot" )); } else if(type=="safe") { - help->setText("Move piece to a slot already\noccupied by the player"); + help->setText(tr( "Move piece to a slot already\noccupied by the player" )); } else if(type=="empty") { - help->setText("Move piece to an empty slot"); + help->setText(tr( "Move piece to an empty slot") ); } else { - help->setText("Press and hold the ? buttton\nnext to a field for help"); + help->setText(tr( "Press and hold the ? buttton\nnext to a field for help") ); } } |