×
Namespaces

Variants
Actions
(Difference between revisions)

用Qt控制音量键

From Nokia Developer Wiki
Jump to: navigation, search
flycarl (Talk | contribs)
flycarl (Talk | contribs)
Line 31: Line 31:
  
 
==History==
 
==History==
{| border="1"
+
{{| border="1"
 
|20 October 2010
 
|20 October 2010
 
|第一版,直接参照 [[TSS000432 - Utilising media keys]]
 
|第一版,直接参照 [[TSS000432 - Utilising media keys]]
|}
+
| border="2"
 +
|08 November 2010
 +
|第二版,[[在Qt程序中使用Symbian Audio Playback API播放声音]]
 +
|}}
  
 
  [[Category:Code Examples]][[Category:Lang-CN]][[Category:Audio]]
 
  [[Category:Code Examples]][[Category:Lang-CN]][[Category:Audio]]

Revision as of 06:58, 8 November 2010

Article Metadata
Tested with
Devices(s): Nokia N97, N8
Compatibility
Platform(s): S60 5th Edition symbian
Symbian
Article
Keywords: volume control
Created: (20 Oct 2010)
Last edited: flycarl (08 Nov 2010)

Overview

由于QT中还没有提供对音量键的响应,需要使用symbian Remote control API 控制 音量键。

参照Qt和Symbian C++的混合编程TSS000432 - Utilising media keys

文件夹volumeKey中的 VolumeKey 类提供了一个VolumeKeyPressed( int )信号,

当按音量键 下时 有信号EVolumeDown,

当按音量键 上时 有信号EVolumeUp, 由此可以在程序中控制音量。

使用了QtMobility的multimedia 来播放声音,在代码中设置一个手机中的歌曲名。播放后按音量键可以观察到音量变化。


Download

File:PlayerVolumeKey.zip



History

{{| border="1" |20 October 2010 |第一版,直接参照 TSS000432 - Utilising media keys | border="2" |08 November 2010 |第二版,在Qt程序中使用Symbian Audio Playback API播放声音 |}}

297 page views in the last 30 days.
×