From kde-commits Sat Apr 16 13:25:03 2005 From: Anne-Marie Mahfouf Date: Sat, 16 Apr 2005 13:25:03 +0000 To: kde-commits Subject: kdeedu/klettres Message-Id: <20050416132503.02B2A3CA () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111365792105760 CVS commit by annma: implement a Replay Sound action to allow the user to play the same sound again FEATURE:98125 BUGS:98125 M +2 -21 TODO 1.6 M +3 -0 klettres/klettres.cpp 1.104 M +3 -0 klettres/klettresui.rc 1.19 M +5 -0 klettres/klettresview.cpp 1.25 M +2 -0 klettres/klettresview.h 1.15 --- kdeedu/klettres/TODO #1.5:1.6 @@ -1,22 +1,3 @@ -28 April 2002 +APRIL 2005 -For 3.1 release - -- accel keys don't show in Settings menu (CTRL-M for toggle MenuBar) -- add a Help button in the toolbar (standard help button) -- add QWhat'sthis -- sounds from mp3 to ogg (Rob Kaper?) -- bigger icons in the toolbar for Kid look. -- check if KLettres fully uses KDE standard dirs and correct i18n -- have configurable font size??? -- clean the code (could be shortened a bit) -- icons for toolBar install in $(kde_icondir)/hicolor/48x48/apps/grownup.png. -Check wether this is OK. -- find new background pic for "grown-up" look and new "show menubar" icon -- finish the KLettres handbook - -For 3.2 release - -- install sounds in the relevant i18n packages. Wait for that to have -English sounds as this will be the default if desktop-language non supported. -- add languages when sounds for them are provided \ No newline at end of file +- fix backspace key problem \ No newline at end of file --- kdeedu/klettres/klettres/klettres.cpp #1.103:1.104 @@ -184,4 +184,7 @@ void KLettres::setupActions() { new KAction( i18n("Get Alphabet in New Language..."), "knewstuff", 0, this, SLOT( slotDownloadNewStuff() ), actionCollection(), "downloadnewstuff" ); + KAction *m_playAgainAction = new KAction(i18n("Replay Sound"),"player_play", CTRL+Key_P, m_view, SLOT(slotPlayAgain()), actionCollection(), "play_again"); + m_playAgainAction->setToolTip(i18n("Play the same sound again")); + m_playAgainAction->setWhatsThis(i18n("You can rplay the same sound again by clicking this button or using the File menu, Replay Sound.")); KStdAction::quit(kapp, SLOT(quit()), actionCollection()); --- kdeedu/klettres/klettres/klettresui.rc #1.18:1.19 @@ -3,4 +3,5 @@ &File + @@ -39,4 +40,6 @@ + + --- kdeedu/klettres/klettres/klettresview.cpp #1.24:1.25 @@ -197,4 +197,9 @@ void KLettresView::slotTimerDone() } +void KLettresView::slotPlayAgain() +{ + //TODO wait for the previous sound to be payed before playing again as it won't play if the previous one was not finished + m_klettres->soundFactory->playSound(m_random); +} void KLettresView::viewThemeArctic() --- kdeedu/klettres/klettres/klettresview.h #1.14:1.15 @@ -97,4 +97,6 @@ protected: protected slots: + ///Play the same sound again + void slotPlayAgain(); void slotProcess(const QString &inputLetter);