|
luna-sysmgr-common
|
#include <HostQtDesktop.h>
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 HostInfo & | getInfo () 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 InputControl * | getInputControlALS () |
| virtual InputControl * | getInputControlBluetoothInputDetect () |
| virtual InputControl * | getInputControlProximity () |
| virtual InputControl * | getInputControlTouchpanel () |
| virtual InputControl * | getInputControlKeys () |
| virtual LedControl * | getLedControlKeypadAndDisplay () |
| virtual void | OrientationSensorOn (bool enable) |
| virtual OrientationEvent * | postProcessDeviceOrientation (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 |
| SingletonTimer * | masterTimer () 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 HostBase * | instance () |
| 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 |
| HostQtDesktop::HostQtDesktop | ( | ) |
|
virtual |
|
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".
Implements HostBase.
|
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.
| modifiers | Keybaord modifiers, as reported by Qt |
Reimplemented from HostBase.
|
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.
| w | Hint as to what the screen width probably is. Ignored by most devices since they can query the screen for its capabilities. |
| h | Hint as to what the screen height probably is. Ignored by most devices since they can query the screen for its capabilities. |
Implements HostBase.
|
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().
| view | Qt widget to display within. |
Reimplemented from HostBase.
|
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.
|
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".
| key | Input hardware key code. |
| withShift | Whether Shift is currently pressed. |
| withAlt | Whether Alt (dot key) is currently pressed. |
Reimplemented from HostBase.