QmKeys Provides access to hardware key states. More...
List of all members.
Public Types
|
enum |
KeyboardSliderPosition { KeyboardSliderIn = 0, KeyboardSliderOut } |
|
Position of keyboard slider.
More...
|
enum |
LensCoverPosition { LensCovered = 0, LensUnCovered, Unknown } |
|
Position of lens cover.
More...
|
enum |
CameraKeyPosition { Up = 0, Down, Through, Invalid } |
|
Position of the camera launch key.
More...
|
enum |
Key {
UnknownKey = -1, KeyboardSlider = 0, Camera, VolumeUp,
VolumeDown, Phone, PlayPause, Stop,
Forward, Rewind, Mute, LeftKey,
RightKey, UpKey, DownKey, End,
NextSong, PreviousSong, Pause, Play,
RightCtrl, PowerKey
} |
|
Supported keys.
More...
|
enum |
State { KeyUp = 0, KeyHalfDown, KeyDown, KeyInvalid } |
|
Supported positions for keys.
More...
|
Signals
|
void |
keyboardSliderMoved (QmKeys::KeyboardSliderPosition where) |
|
Deprecated, use keyEvent() instead.
|
void |
lensCoverMoved (QmKeys::LensCoverPosition where) |
|
Deprecated, use keyEvent() instead.
|
void |
cameraLauncherMoved (QmKeys::CameraKeyPosition where) |
|
Deprecated, use keyEvent() instead.
|
void |
volumeUpMoved (bool Is) |
|
Deprecated, use keyEvent() instead.
|
void |
volumeDownMoved (bool Is) |
|
Deprecated, use keyEvent() instead.
|
void |
keyEvent (MeeGo::QmKeys::Key key, MeeGo::QmKeys::State state) |
|
Sent when a key has changed state.
|
Public Member Functions
|
|
QmKeys (QObject *parent=0) |
|
Constructor.
|
virtual |
~QmKeys () |
|
Destructor.
|
QmKeys::KeyboardSliderPosition |
getSliderPosition () |
|
Deprecated, use getKeyState() instead.
|
QmKeys::LensCoverPosition |
getLensCoverPosition () |
|
Deprecated, use getKeyState() instead.
|
QmKeys::CameraKeyPosition |
getCameraLauncherPosition () |
|
Deprecated, use getKeyState() instead.
|
bool |
isVolumeUpDown () |
|
Deprecated, use getKeyState() instead.
|
bool |
isVolumeDownDown () |
|
Deprecated, use getKeyState() instead.
|
State |
getKeyState (Key key) |
|
Gets the current state of the given key.
|
Detailed Description
QmKeys Provides access to hardware key states.
- Scope:
- Nokia Meego
Note that QmKeys works regardless of the tklock state. It is the applications responsibility to, for example, use QmLocks to see if the keys are locked. QmKeys supports one bluetooth headset. Still very preliminary, missing most of its functionality.
- Todo:
- Move keyboard slider to MCE signal..?
- Add query functions to figure out whether handles are valid or not.
Member Enumeration Documentation
Position of the camera launch key.
- Enumerator:
-
Up |
Camera key is up.
|
Down |
Camera key is half down.
|
Through |
Camera key is fully down.
|
Invalid |
|
Supported keys.
- Enumerator:
-
UnknownKey |
|
KeyboardSlider |
|
Camera |
|
VolumeUp |
|
VolumeDown |
|
Phone |
|
PlayPause |
|
Stop |
|
Forward |
|
Rewind |
|
Mute |
|
LeftKey |
|
RightKey |
|
UpKey |
|
DownKey |
|
End |
|
NextSong |
|
PreviousSong |
|
Pause |
|
Play |
|
RightCtrl |
|
PowerKey |
|
Position of keyboard slider.
- Enumerator:
-
KeyboardSliderIn |
Slider is in.
|
KeyboardSliderOut |
Slider is out.
|
Position of lens cover.
- Enumerator:
-
LensCovered |
Lens is covered.
|
LensUnCovered |
Lens is not covered.
|
Unknown |
|
Supported positions for keys.
- Enumerator:
-
KeyUp |
The key is up.
|
KeyHalfDown |
The key is half down.
|
KeyDown |
The key is fully down.
|
KeyInvalid |
The key state is invalid or unknown.
|
Constructor & Destructor Documentation
MeeGo::QmKeys::QmKeys |
( |
QObject * |
parent = 0 |
) |
|
Constructor.
- Parameters:
-
|
parent |
The possible parent object |
virtual MeeGo::QmKeys::~QmKeys |
( |
|
) |
[virtual] |
Destructor.
Destruct QmKeys when you do not expect key pressures (for example when screen is blanked) to save battery.
Member Function Documentation
State MeeGo::QmKeys::getKeyState |
( |
Key |
key |
) |
|
Gets the current state of the given key.
- Parameters:
-
|
key |
which state is being queried |
- Returns:
- The state of the given key
bool MeeGo::QmKeys::isVolumeDownDown |
( |
|
) |
|
bool MeeGo::QmKeys::isVolumeUpDown |
( |
|
) |
|
Sent when a key has changed state.
- Parameters:
-
|
key |
the key in question |
|
state |
The new state |
void MeeGo::QmKeys::volumeDownMoved |
( |
bool |
Is |
) |
[signal] |
void MeeGo::QmKeys::volumeUpMoved |
( |
bool |
Is |
) |
[signal] |
(C) 2009-2011 Nokia Corporation
LGPL Lesser General Public License |
MeeGo 1.2 Harmattan API
|