diff options
Diffstat (limited to 'kasteroids')
-rw-r--r-- | kasteroids/toplevel.cpp | 32 | ||||
-rw-r--r-- | kasteroids/toplevel.h | 8 |
2 files changed, 20 insertions, 20 deletions
diff --git a/kasteroids/toplevel.cpp b/kasteroids/toplevel.cpp index 70636311..44d00995 100644 --- a/kasteroids/toplevel.cpp +++ b/kasteroids/toplevel.cpp @@ -246,11 +246,11 @@ KAstTopLevel::KAstTopLevel() powerMeter->setFixedSize( 200, 12 ); hbd->addWidget( powerMeter ); - initKAction(); + initTDEAction(); setCentralWidget( mainWin ); - setupGUI( KMainWindow::Save | Create ); + setupGUI( TDEMainWindow::Save | Create ); setFocusPolicy( TQ_StrongFocus ); setFocus(); @@ -277,7 +277,7 @@ KAstTopLevel::~KAstTopLevel() #endif } -void KAstTopLevel::initKAction() +void KAstTopLevel::initTDEAction() { // game KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT( slotNewGame() ), actionCollection() ); @@ -290,14 +290,14 @@ void KAstTopLevel::initKAction() KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotPref() ), actionCollection()); // keyboard-only actions - keycodes.insert(Thrust, new KAction(i18n("Thrust"), TQt::Key_Up, 0, 0, actionCollection(), "Thrust")); - keycodes.insert(RotateLeft, new KAction(i18n("Rotate Left"), TQt::Key_Left, 0, 0, actionCollection(), "RotateLeft")); - keycodes.insert(RotateRight, new KAction(i18n("Rotate Right"), TQt::Key_Right, 0, 0, actionCollection(), "RotateRight")); - keycodes.insert(Shoot, new KAction(i18n("Shoot"), TQt::Key_Space, 0, 0, actionCollection(), "Shoot")); -// keycodes.insert(Teleport, new KAction(i18n("Teleport"), TQt::Key_Z, 0, 0, actionCollection(), "Teleport")); - keycodes.insert(Brake, new KAction(i18n("Brake"), TQt::Key_X, 0, 0, actionCollection(), "Brake")); - keycodes.insert(Shield, new KAction(i18n("Shield"), TQt::Key_S, 0, 0, actionCollection(), "Shield")); - launchAction = new KAction(i18n("Launch"), TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotLaunch()), actionCollection(), "Launch"); + keycodes.insert(Thrust, new TDEAction(i18n("Thrust"), TQt::Key_Up, 0, 0, actionCollection(), "Thrust")); + keycodes.insert(RotateLeft, new TDEAction(i18n("Rotate Left"), TQt::Key_Left, 0, 0, actionCollection(), "RotateLeft")); + keycodes.insert(RotateRight, new TDEAction(i18n("Rotate Right"), TQt::Key_Right, 0, 0, actionCollection(), "RotateRight")); + keycodes.insert(Shoot, new TDEAction(i18n("Shoot"), TQt::Key_Space, 0, 0, actionCollection(), "Shoot")); +// keycodes.insert(Teleport, new TDEAction(i18n("Teleport"), TQt::Key_Z, 0, 0, actionCollection(), "Teleport")); + keycodes.insert(Brake, new TDEAction(i18n("Brake"), TQt::Key_X, 0, 0, actionCollection(), "Brake")); + keycodes.insert(Shield, new TDEAction(i18n("Shield"), TQt::Key_S, 0, 0, actionCollection(), "Shield")); + launchAction = new TDEAction(i18n("Launch"), TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotLaunch()), actionCollection(), "Launch"); } @@ -354,7 +354,7 @@ bool KAstTopLevel::processKeyPress( TQKeyEvent *event ) { KKey key(event); Action a = Invalid; - TQMap<Action, KAction*>::Iterator it = keycodes.begin(); + TQMap<Action, TDEAction*>::Iterator it = keycodes.begin(); for (; it != keycodes.end(); ++it) { if ( (*it)->shortcut().contains(key) ) @@ -407,7 +407,7 @@ bool KAstTopLevel::processKeyRelease( TQKeyEvent *event ) { KKey key(event); Action a = Invalid; - TQMap<Action, KAction*>::Iterator it = keycodes.begin(); + TQMap<Action, TDEAction*>::Iterator it = keycodes.begin(); for (; it != keycodes.end(); ++it) { if ( (*it)->shortcut().contains(key) ) @@ -460,7 +460,7 @@ void KAstTopLevel::focusInEvent( TQFocusEvent *e ) #if defined TQ_WS_X11 && ! defined K_WS_TQTONLY XAutoRepeatOff( tqt_xdisplay() ); #endif - KMainWindow::focusInEvent(e); + TDEMainWindow::focusInEvent(e); } void KAstTopLevel::focusOutEvent( TQFocusEvent *e ) @@ -469,7 +469,7 @@ void KAstTopLevel::focusOutEvent( TQFocusEvent *e ) #if defined TQ_WS_X11 && ! defined K_WS_TQTONLY XAutoRepeatOn( tqt_xdisplay() ); #endif - KMainWindow::focusOutEvent(e); + TDEMainWindow::focusOutEvent(e); } void KAstTopLevel::slotNewGame() @@ -663,7 +663,7 @@ void KAstTopLevel::slotPause() //and we "play" when we close this messagebox //so before this action was 'checked/uncheched' //so I force to unchecked it when we close messagebox. - KToggleAction * act = (KToggleAction *)(sender()); + TDEToggleAction * act = (TDEToggleAction *)(sender()); act->setChecked(false); } diff --git a/kasteroids/toplevel.h b/kasteroids/toplevel.h index af8838b1..72d0f19c 100644 --- a/kasteroids/toplevel.h +++ b/kasteroids/toplevel.h @@ -20,7 +20,7 @@ class KALedMeter; class TQLCDNumber; class KDialogBase; -class KAstTopLevel : public KMainWindow +class KAstTopLevel : public TDEMainWindow { Q_OBJECT @@ -29,7 +29,7 @@ public: virtual ~KAstTopLevel(); private: - void initKAction(); + void initTDEAction(); void playSound( const char *snd ); void readSoundMapping(); void doStats(); @@ -86,9 +86,9 @@ private: enum Action { Invalid, Launch, Thrust, RotateLeft, RotateRight, Shoot, Teleport, Brake, Shield }; - TQMap<Action, KAction*> keycodes; + TQMap<Action, TDEAction*> keycodes; - KAction *launchAction; + TDEAction *launchAction; }; #endif |