luna-sysmgr-common
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HostQtDesktop Class Reference

#include <HostQtDesktop.h>

Inheritance diagram for HostQtDesktop:
[legend]
Collaboration diagram for HostQtDesktop:
[legend]

Public Member Functions

 HostQtDesktop ()
 
virtual ~HostQtDesktop ()
 
virtual void init (int w, int h)
 
virtual void show ()
 
virtual unsigned short translateKeyWithMeta (unsigned short key, bool withShift, bool withAlt)
 
virtual const char * hardwareName () const
 
virtual void setCentralWidget (QWidget *view)
 
bool hasAltKey (Qt::KeyboardModifiers modifiers)
 
- Public Member Functions inherited from HostBase
virtual ~HostBase ()
 
const HostInfogetInfo () const
 
virtual void run ()
 
virtual void quit ()
 
void lockPainting ()
 
void unlockPainting ()
 
virtual void setMetaModifier (bool metaKeyDown)
 
virtual bool metaModifier ()
 
virtual int getNumberOfSwitches () const
 
void turboModeSubscription (bool add)
 
virtual void flip ()
 
virtual QImage takeScreenShot () const
 
virtual QImage takeAppDirectRenderingScreenShot () const
 
virtual void setAppDirectRenderingLayerEnabled (bool enable)
 
void setOrientation (OrientationEvent::Orientation o)
 
QPoint map (const QPoint &pt)
 
virtual void setRenderingLayerEnabled (bool enable)
 
virtual InputControlgetInputControlALS ()
 
virtual InputControlgetInputControlBluetoothInputDetect ()
 
virtual InputControlgetInputControlProximity ()
 
virtual InputControlgetInputControlTouchpanel ()
 
virtual InputControlgetInputControlKeys ()
 
virtual LedControlgetLedControlKeypadAndDisplay ()
 
virtual void OrientationSensorOn (bool enable)
 
virtual OrientationEventpostProcessDeviceOrientation (OrientationEvent *currOrientation)
 
virtual bool homeButtonWakesUpScreen ()
 
virtual void setBluetoothKeyboardActive (bool active)
 
virtual bool bluetoothKeyboardActive () const
 
- Public Member Functions inherited from TaskBase
 TaskBase ()
 
virtual ~TaskBase ()
 
void postEvent (sptr< Event > event, bool highPriority=false)
 
GMainLoop * mainLoop () const
 
SingletonTimermasterTimer () const
 
- Public Member Functions inherited from RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
void ref ()
 
void deref ()
 

Additional Inherited Members

- Signals inherited from HostBase
void signalBluetoothKeyboardActive (bool active)
 
- Static Public Member Functions inherited from HostBase
static HostBaseinstance ()
 
static bool hostIsQemu ()
 
- Protected Member Functions inherited from HostBase
 HostBase ()
 
virtual void handleEvent (sptr< Event >)
 
virtual void turboMode (bool enable)
 
- Protected Attributes inherited from HostBase
HostInfo m_info
 
Mutex m_paintMutex
 
bool m_metaKeyDown
 
OrientationEvent::Orientation m_orientation
 
QTransform m_trans
 
int m_numBuffers
 
unsigned m_turboModeSubscriptions
 

Constructor & Destructor Documentation

HostQtDesktop::HostQtDesktop ( )
HostQtDesktop::~HostQtDesktop ( )
virtual

Member Function Documentation

const char * HostQtDesktop::hardwareName ( ) const
virtual

Return the specific name (including model revision) of the current host device

As an example, for a generic ARM device for which more information is not available, it returns "ARM Device". For a Palm Pixie device, it might return something like "Pixie DVT1".

Returns
Name of the hardware of the current host device.

Implements HostBase.

bool HostQtDesktop::hasAltKey ( Qt::KeyboardModifiers  modifiers)
virtual

Maps Qt's version of the state of the modifier keys to whether or not the Alt (dot) key is pressed

On HostQtDesktop, both the Ctrl and Alt keys are mapped to the LunaSysMgr version of the Alt (dot) key.

Parameters
modifiersKeybaord modifiers, as reported by Qt
Returns
Whether or not the current state of the hardware modifier keys indicates that the Alt (dot) key is pressed.

Reimplemented from HostBase.

void HostQtDesktop::init ( int  w,
int  h 
)
virtual

Initialize device-specific hardware

Initializes hardware, fetches display info, and generally prepares the host device for LunaSysMgr to run on it.

Must be overridden for each type of device Host class needed.

Parameters
wHint as to what the screen width probably is. Ignored by most devices since they can query the screen for its capabilities.
hHint as to what the screen height probably is. Ignored by most devices since they can query the screen for its capabilities.

Implements HostBase.

void HostQtDesktop::setCentralWidget ( QWidget view)
virtual

Sets the Qt widget that the display should reside in

Mostly unused except under the QtDesktop and Qemu hosts, where it is used to attach a keyboard remapping filter.

Called by WindowServer::WindowServer().

Parameters
viewQt widget to display within.

Reimplemented from HostBase.

void HostQtDesktop::show ( )
virtual

Grab access to the hardware (including the display and input devices) for use by LunaSysMgr

Run this when you're ready to start using the host to display things. It grabs exclusive access to the screen and input devices (on most devices) so it can actually start displaying graphics on the screen.

Must be overridden per-device since it's fairly device-specific what needs to be enabled to be able to run LunaSysMgr.

Reimplemented from HostBase.

unsigned short HostQtDesktop::translateKeyWithMeta ( unsigned short  key,
bool  withShift,
bool  withAlt 
)
virtual

Translate a hardware keycode to a system keycode depending on modifier keys

Takes a hardware keycode and which modifiers are currently pressed and returns a system modifier. For example, if the key is the key code for "a" and shift is down, it translates it to the key code for "A".

Parameters
keyInput hardware key code.
withShiftWhether Shift is currently pressed.
withAltWhether Alt (dot key) is currently pressed.
Returns
Translated key code.

Reimplemented from HostBase.


The documentation for this class was generated from the following files: