[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kabc
From: John Tapsell <john () geola ! co ! uk>
Date: 2004-12-10 10:56:39
Message-ID: 20041210105639.462571BBDC () office ! kde ! org
[Download RAW message or body]
CVS commit by johnflux:
Add some very crappy documentation to sound.h in the hopes that someone else will make it better.
M +28 -0 sound.h 1.6
--- kdelibs/kabc/sound.h #1.5:1.6
@@ -29,4 +29,32 @@
namespace KABC {
+/** @short Class that holds a Sound clip for a contact.
+ *
+ * The sound can be played doing something like this:
+ *
+ * \code
+ * KTempFile tmp;
+ * if(sound.isIntern()) {
+ * tmp.file()->writeBlock( sound.data() );
+ * tmp.close();
+ * KAudioPlayer::play( tmp.name() );
+ * } else if(!sound.url().isEmpty()) {
+ * QString tmpFile;
+ * if(!KIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL))
+ * {
+ * KMessageBox::error(0L,
+ * KIO::NetAccess::lastErrorString(),
+ * i18n("Failed to download sound file"),
+ * KMessageBox::Notify
+ * );
+ * return;
+ * }
+ * KAudioPlayer::play( tmpFile );
+ * }
+ * \code
+ *
+ * Unfortunetly KAudioPlayer::play is ASync, so to delete the temporary file, the best you can really do is set a timer.
+ *
+ */
class KABC_EXPORT Sound
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic