[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kdelibs-phonon/phonon
From:       Matthias Kretz <kretz () kde ! org>
Date:       2006-02-14 10:58:17
Message-ID: 1139914697.640489.31053.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 509323 by mkretz:

add another enum to the Phonon namespace -> need to rename this file
The enum is used for audiooutputs to group them into predefined categories


 M  +21 -0     state.cpp  
 M  +19 -0     state.h  


--- branches/work/kdelibs-phonon/phonon/state.cpp #509322:509323
@@ -19,7 +19,28 @@
 
 #include "state.h"
 #include <kdebug.h>
+#include <klocale.h>
 
+namespace Phonon
+{
+	QString categoryToString( Category c )
+	{
+		switch( c )
+		{
+			case Phonon::Unspecified:
+				return i18n( "Unspecified" );
+			case Phonon::Notification:
+				return i18n( "Notification" );
+			case Phonon::Music:
+				return i18n( "Music" );
+			case Phonon::Video:
+				return i18n( "Video" );
+			case Phonon::Communication:
+				return i18n( "Communication" );
+		}
+		return QString();
+	}
+}
 /*
 kdbgstream& operator<<( kdbgstream & stream, const Phonon::State state )
 {
--- branches/work/kdelibs-phonon/phonon/state.h #509322:509323
@@ -20,6 +20,7 @@
 #define PHONON_STATE_H
 
 #include <kdelibs_export.h>
+
 namespace Phonon
 {
 	/**
@@ -61,6 +62,24 @@
 		ErrorState
 	};
 
+	/**
+	 * Set's the category your program should be listed in in the mixer.
+	 *
+	 * A Jukebox will set this to Music, a VoIP program to Communication, a
+	 * DVD player to video, and so on.
+	 *
+	 * \see AudioOutput::setCategory
+	 */
+	enum Category
+	{
+		Unspecified,
+		Notification,
+		Music,
+		Video,
+		Communication
+	};
+
+	QString categoryToString( Category c );
 } //namespace Phonon
 
 class kdbgstream;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic