summaryrefslogtreecommitdiff
path: root/noncore/games/kpacman/keys.cpp
authorcniehaus <cniehaus>2002-09-03 19:00:18 (UTC)
committer cniehaus <cniehaus>2002-09-03 19:00:18 (UTC)
commitcf317ab123c51fb957ec35d44431e77a8b76c279 (patch) (unidiff)
treecb81fa703851995a6beb2c8b562da4d2344da47b /noncore/games/kpacman/keys.cpp
parentd9186e958c93df6d6363e2dc0af704e93eb0c06e (diff)
downloadopie-cf317ab123c51fb957ec35d44431e77a8b76c279.zip
opie-cf317ab123c51fb957ec35d44431e77a8b76c279.tar.gz
opie-cf317ab123c51fb957ec35d44431e77a8b76c279.tar.bz2
As KPacman didn't use tr() but KDE's i18n() is did a simple
perl -pi~ -e 's/i18n/tr/g' *.cpp
Diffstat (limited to 'noncore/games/kpacman/keys.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/kpacman/keys.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/games/kpacman/keys.cpp b/noncore/games/kpacman/keys.cpp
index c609373..8b17785 100644
--- a/noncore/games/kpacman/keys.cpp
+++ b/noncore/games/kpacman/keys.cpp
@@ -21,37 +21,37 @@
21#include <qlabel.h> 21#include <qlabel.h>
22#include <qframe.h> 22#include <qframe.h>
23#include <qkeycode.h> 23#include <qkeycode.h>
24#include <qpixmap.h> 24#include <qpixmap.h>
25#include <qstring.h> 25#include <qstring.h>
26 26
27Keys::Keys( QWidget *parent, const char *name) 27Keys::Keys( QWidget *parent, const char *name)
28 : QDialog( parent, name, TRUE ) 28 : QDialog( parent, name, TRUE )
29{ 29{
30 //KStandardDirs *dirs = KGlobal::dirs(); 30 //KStandardDirs *dirs = KGlobal::dirs();
31 31
32 QPushButton *okButton = new QPushButton(this); 32 QPushButton *okButton = new QPushButton(this);
33 okButton->setText(i18n("Ok")); 33 okButton->setText(tr("Ok"));
34 okButton->setFixedSize(okButton->size()); 34 okButton->setFixedSize(okButton->size());
35 connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) ); 35 connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) );
36 okButton->move(20,210); 36 okButton->move(20,210);
37 37
38 QPushButton *defaultButton = new QPushButton(this); 38 QPushButton *defaultButton = new QPushButton(this);
39 defaultButton->setText(i18n("Defaults")); 39 defaultButton->setText(tr("Defaults"));
40 defaultButton->setFixedSize(defaultButton->size()); 40 defaultButton->setFixedSize(defaultButton->size());
41 connect( defaultButton, SIGNAL(clicked()),this, SLOT(defaults()) ); 41 connect( defaultButton, SIGNAL(clicked()),this, SLOT(defaults()) );
42 defaultButton->move(140,210); 42 defaultButton->move(140,210);
43 43
44 QPushButton *cancelButton = new QPushButton(this); 44 QPushButton *cancelButton = new QPushButton(this);
45 cancelButton->setText(i18n("Cancel")); 45 cancelButton->setText(tr("Cancel"));
46 cancelButton->setFixedSize(cancelButton->size()); 46 cancelButton->setFixedSize(cancelButton->size());
47 connect( cancelButton, SIGNAL(clicked()),this, SLOT(reject()) ); 47 connect( cancelButton, SIGNAL(clicked()),this, SLOT(reject()) );
48 cancelButton->move(260,210); 48 cancelButton->move(260,210);
49 49
50 QFrame *separator = new QFrame(this); 50 QFrame *separator = new QFrame(this);
51 separator->setFrameStyle( QFrame::HLine | QFrame::Sunken ); 51 separator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
52 separator->setGeometry( 20, 190, 340, 4 ); 52 separator->setGeometry( 20, 190, 340, 4 );
53 53
54 for ( int x = 0; x < 4; x++) { 54 for ( int x = 0; x < 4; x++) {
55 QLabel *l = new QLabel(this); 55 QLabel *l = new QLabel(this);
56 l->setAlignment(AlignCenter); 56 l->setAlignment(AlignCenter);
57 labels[x] = l; 57 labels[x] = l;
@@ -84,38 +84,38 @@ Keys::Keys( QWidget *parent, const char *name)
84 left->setFixedSize(left->pixmap()->size()); 84 left->setFixedSize(left->pixmap()->size());
85 connect( left, SIGNAL(clicked()),this, SLOT(butLeft()) ); 85 connect( left, SIGNAL(clicked()),this, SLOT(butLeft()) );
86 left->move(140, 90); 86 left->move(140, 90);
87 87
88 QPushButton *right = new QPushButton(this); 88 QPushButton *right = new QPushButton(this);
89 pixPath = FIND_APP_DATA( "pics/right.xpm"); 89 pixPath = FIND_APP_DATA( "pics/right.xpm");
90 right->setPixmap( QPixmap(pixPath)); 90 right->setPixmap( QPixmap(pixPath));
91 right->setFixedSize(right->pixmap()->size()); 91 right->setFixedSize(right->pixmap()->size());
92 connect( right, SIGNAL(clicked()),this, SLOT(butRight()) ); 92 connect( right, SIGNAL(clicked()),this, SLOT(butRight()) );
93 right->move(220, 90); 93 right->move(220, 90);
94 94
95 95
96 setCaption(i18n("Change Direction Keys")); 96 setCaption(tr("Change Direction Keys"));
97 setFixedSize(380, 260); 97 setFixedSize(380, 260);
98 lab = 0; 98 lab = 0;
99 init(); 99 init();
100} 100}
101 101
102void Keys::keyPressEvent( QKeyEvent *e ) 102void Keys::keyPressEvent( QKeyEvent *e )
103{ 103{
104 uint kCode = e->key() & ~(SHIFT | CTRL | ALT); 104 uint kCode = e->key() & ~(SHIFT | CTRL | ALT);
105 QString string = KAccel::keyToString(kCode); 105 QString string = KAccel::keyToString(kCode);
106 106
107 if (lab != 0) { 107 if (lab != 0) {
108 if ( string.isNull() ) 108 if ( string.isNull() )
109 lab->setText(i18n("Undefined key")); 109 lab->setText(tr("Undefined key"));
110 else 110 else
111 lab->setText(string); 111 lab->setText(string);
112 } 112 }
113 else if ( lab == 0 && e->key() == Key_Escape) 113 else if ( lab == 0 && e->key() == Key_Escape)
114 reject(); 114 reject();
115} 115}
116 116
117void Keys::butUp() 117void Keys::butUp()
118{ 118{
119 getKey(0); 119 getKey(0);
120} 120}
121 121