From: GiWoong Kim Date: Thu, 31 Jul 2014 02:24:16 +0000 (+0900) Subject: ui: get UI info from emul_state X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=868637b28e7aee8cd06efbcf445dc300ba1ef26e;p=sdk%2Femulator%2Fqemu.git ui: get UI info from emul_state get Qt UI information from emul_state added key list to reverse-portrait/landscape mobile skin Change-Id: I0645daf0feae8b7b60bb64ab3134d98cfbcd6392 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/display/qt5_supplement.cpp b/tizen/src/display/qt5_supplement.cpp index 0003cd9589..63f0528cdf 100644 --- a/tizen/src/display/qt5_supplement.cpp +++ b/tizen/src/display/qt5_supplement.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include "mainwindow.h" #include "uiinformation.h" @@ -42,6 +41,10 @@ #include "ui/xml/keylisttype.h" #include "ui/xml/layouttype.h" +extern "C" { +#include "emul_state.h" +} + //using namespace std; void qMessageOutput(QtMsgType, const QMessageLogContext &, const QString &); void loadSkinLayoutFromXML(QFile *, UIInformation *); @@ -72,23 +75,18 @@ void qt5_skin_init(void) /* parameter parsing */ // TODO: - QString vmName = "test"; - int basePort = 26100; - uiInfo->vmName = vmName; - uiInfo->basePort = basePort; + uiInfo->vmName = get_emul_vm_name(); + uiInfo->resolution.setWidth(get_emul_resolution_width()); + uiInfo->resolution.setHeight(get_emul_resolution_height()); + uiInfo->basePort = get_emul_vm_base_port(); #if 0 /* wearable */ - uiInfo->resolution.setWidth(320); - uiInfo->resolution.setHeight(320); uiInfo->skinPath = "/skins/wearable-320x320-1btn/"; #elif 1 /* mobile */ - uiInfo->resolution.setWidth(720); - uiInfo->resolution.setHeight(1280); uiInfo->skinPath = "/skins/mobile-720x1280-3btn/"; - uiInfo->uiState.layoutScale = 50; #endif diff --git a/tizen/src/ui/resource/mobile-720x1280-3btn/layout.qml b/tizen/src/ui/resource/mobile-720x1280-3btn/layout.qml index 01141948cd..7acd6b7ebc 100644 --- a/tizen/src/ui/resource/mobile-720x1280-3btn/layout.qml +++ b/tizen/src/ui/resource/mobile-720x1280-3btn/layout.qml @@ -80,6 +80,33 @@ Item { mainImage: "default_180.png" pressedImage: "default_180_p.png" + + KeyList { + Key { objectName: "Menu"; keycode: 169 + Region { left: 570; top: 30; width: 84; height: 84 } + tooltip: "Menu" + } + Key { objectName: "Home"; keycode: 139 + Region { left: 390; top: 30; width: 84; height: 84 } + tooltip: "Home" + } + Key { objectName: "Back"; keycode: 158 + Region { left: 210; top: 30; width: 84; height: 84 } + tooltip: "Back" + } + Key { objectName: "Power"; keycode: 116 + Region { left: 2; top: 110; width: 24; height: 96 } + tooltip: "Power" + } + Key { objectName: "Volume +"; keycode: 115 + Region { left: 2; top: 1310; width: 24; height: 96 } + tooltip: "Volume +" + } + Key { objectName: "Volume -"; keycode: 114 + Region { left: 2; top: 1200; width: 24; height: 96 } + tooltip: "Volume -" + } + } } Layout { @@ -88,5 +115,32 @@ Item { mainImage: "default_R90.png" pressedImage: "default_R90_p.png" + + KeyList { + Key { objectName: "Menu"; keycode: 169 + Region { left: 28; top: 209; width: 84; height: 84 } + tooltip: "Menu" + } + Key { objectName: "Home"; keycode: 139 + Region { left: 28; top: 391; width: 84; height: 84 } + tooltip: "Home" + } + Key { objectName: "Back"; keycode: 158 + Region { left: 28; top: 568; width: 84; height: 84 } + tooltip: "Back" + } + Key { objectName: "Power"; keycode: 116 + Region { left: 109; top: 841; width: 96; height: 24 } + tooltip: "Power" + } + Key { objectName: "Volume +"; keycode: 115 + Region { left: 1309; top: 841; width: 96; height: 24 } + tooltip: "Volume +" + } + Key { objectName: "Volume -"; keycode: 114 + Region { left: 1199; top: 841; width: 96; height: 24 } + tooltip: "Volume -" + } + } } }