用Qt控制音量键
hamishwillee
(Talk | contribs) m (Text replace - "Category:MeeGo" to "Category:MeeGo Harmattan") |
|||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | [[Category:Multimedia]][[Category:Qt | + | [[Category:Multimedia]][[Category:Qt Mobility]] |
| − | {{ | + | {{ArticleMetaData |
|id=... | |id=... | ||
|platform=S60 5th Edition symbian | |platform=S60 5th Edition symbian | ||
|devices=Nokia N97, N8 | |devices=Nokia N97, N8 | ||
| − | |category=Qt | + | |category=Qt |
|subcategory= Qt Mobility API | |subcategory= Qt Mobility API | ||
|creationdate=Oct 20, 2010 | |creationdate=Oct 20, 2010 | ||
|keywords= volume control | |keywords= volume control | ||
| + | |||
| + | |sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| + | |devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) --> | ||
| + | |signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) --> | ||
| + | |author=[[User:Flycarl]] | ||
}} | }} | ||
| Line 33: | Line 41: | ||
{| border="1" | {| border="1" | ||
|20 October 2010 | |20 October 2010 | ||
| − | | | + | |1st,直接参照 [[TSS000432 - Utilising media keys]] |
| + | |- | ||
| + | |8 November 2010 | ||
| + | |2nd,使用symbianApi播放声音,构造时设置默认音量。兼容symbian^3,S60 5th SDK | ||
|} | |} | ||
| − | [[Category:Code Examples]][[Category:Lang- | + | |
| + | |||
| + | [[Category:Code Examples]][[Category:Lang-Chinese]][[Category:Audio]][[Category:MeeGo Harmattan]] [[Category:Symbian]] | ||
Latest revision as of 13:58, 13 June 2012
Article Metadata
Tested with
Devices(s): Nokia N97, N8
Compatibility
Platform(s): S60 5th Edition symbian
Article
Keywords: volume control
Created: flycarl
(20 Oct 2010)
Last edited: hamishwillee
(13 Jun 2012)
Overview
由于QT中还没有提供对音量键的响应,需要使用symbian Remote control API 控制 音量键。
参照Qt和Symbian C++的混合编程, TSS000432 - Utilising media keys。
文件夹volumeKey中的 VolumeKey 类提供了一个VolumeKeyPressed( int )信号,
当按音量键 下时 有信号EVolumeDown,
当按音量键 上时 有信号EVolumeUp, 由此可以在程序中控制音量。
使用了QtMobility的multimedia 来播放声音,在代码中设置一个手机中的歌曲名。播放后按音量键可以观察到音量变化。
Download
History
| 20 October 2010 | 1st,直接参照 TSS000432 - Utilising media keys |
| 8 November 2010 | 2nd,使用symbianApi播放声音,构造时设置默认音量。兼容symbian^3,S60 5th SDK |

