summaryrefslogtreecommitdiffstats
path: root/kasteroids/toplevel.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:12:46 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:12:46 -0600
commit58a97ed3af5e4df6c4a58d043b0c267bd97056a9 (patch)
tree5a2fde6842fd422cae2d8670d382be965098cc32 /kasteroids/toplevel.cpp
parent2ce15ee76fd2d9d18a63c035a0f5b00b94c60cdc (diff)
downloadtdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.tar.gz
tdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kasteroids/toplevel.cpp')
-rw-r--r--kasteroids/toplevel.cpp32
1 files changed, 16 insertions, 16 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);
}