menu: some code cleanup 81/34981/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 4 Feb 2015 03:03:14 +0000 (12:03 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Thu, 5 Feb 2015 08:36:34 +0000 (17:36 +0900)
add formList XML parsing
declare addGeneralAction func
add layout.xml file for wearable skin
delete unused qml files

Change-Id: Ib7f2e09e073ca1a8c352345332e7c347eb8bcbd2
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
12 files changed:
tizen/src/display/qt5_supplement.cpp
tizen/src/display/xmllayoutparser.cpp
tizen/src/display/xmllayoutparser.h
tizen/src/ui/controllerform.cpp
tizen/src/ui/controllerform.h
tizen/src/ui/mainform.cpp
tizen/src/ui/mainform.h
tizen/src/ui/menu/contextmenu.cpp
tizen/src/ui/menu/contextmenu.h
tizen/src/ui/resource/mobile-720x1280-3btn/layout.qml [deleted file]
tizen/src/ui/resource/wearable-320x320-1btn/layout.qml [deleted file]
tizen/src/ui/resource/wearable-320x320-1btn/layout.xml [new file with mode: 0644]

index 9ed9938..ad0c64c 100644 (file)
@@ -380,9 +380,8 @@ void loadMainFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
     QFileInfo fileInfo(*file);
     QXmlStreamReader xml(file);
 
-    XmlLayoutParser parser;
+    XmlLayoutParser parser(fileInfo.absolutePath());
 
-    MainForm *form = NULL;
     QXmlStreamReader::TokenType token;
     while (xml.atEnd() == false && xml.hasError() == false) {
         token = xml.readNext();
@@ -399,11 +398,9 @@ void loadMainFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
             if (xml.name() == "version") {
                 qDebug() << "xml version :" << xml.readElementText();
                 continue;
-            } else if (xml.name() == "form") { // TODO: formList
-                form = parser.parseMainForm(xml, fileInfo.absolutePath());
-                if (form != NULL) {
-                    uiInfo->mainFormList.append(form);
-                }
+            } else if (xml.name() == "formList") {
+                int cnt = parser.parseMainFormList(xml, uiInfo->mainFormList);
+                qDebug("- formList : %d", cnt);
             }
         }
     }
@@ -436,7 +433,7 @@ void loadConFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
     QFileInfo fileInfo(*file);
     QXmlStreamReader xml(file);
 
-    XmlLayoutParser parser;
+    XmlLayoutParser parser(fileInfo.absolutePath());
 
     ControllerForm *form = NULL;
     QXmlStreamReader::TokenType token;
@@ -456,7 +453,7 @@ void loadConFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
                 qDebug() << "xml version :" << xml.readElementText();
                 continue;
             } else if (xml.name() == "form") {
-                form = parser.parseControllerForm(xml, fileInfo.absolutePath());
+                form = parser.parseControllerForm(xml);
                 if (form != NULL) {
                     uiInfo->conFormList.append(form);
                 }
index f824aad..9719e5a 100644 (file)
@@ -29,9 +29,9 @@
 
 #include "xmllayoutparser.h"
 
-XmlLayoutParser::XmlLayoutParser()
+XmlLayoutParser::XmlLayoutParser(QString path)
 {
-    /* do nothing */
+    xmlPath = path;
 }
 
 QRect XmlLayoutParser::parseRegion(QXmlStreamReader &xml)
@@ -149,8 +149,7 @@ int XmlLayoutParser::parseKeyList(
     return list.count();
 }
 
-MainForm *XmlLayoutParser::parseMainForm(
-    QXmlStreamReader &xml, QString skinPath)
+MainForm *XmlLayoutParser::parseMainForm(QXmlStreamReader &xml)
 {
     QString formName = "";
 
@@ -177,14 +176,14 @@ MainForm *XmlLayoutParser::parseMainForm(
                 qDebug() << "- normalImage :" << normalImageFileName;
 
                 form->skinImg[MainForm::normal].load(
-                    skinPath + QDir::separator() + normalImageFileName);
+                    xmlPath + QDir::separator() + normalImageFileName);
             } else if (xml.name() == "pressedImage") {
                 /* key pressed image */
                 QString pressedImageFileName = xml.readElementText();
                 qDebug() << "- pressedImage :" << pressedImageFileName;
 
                 form->skinImg[MainForm::pressed].load(
-                    skinPath + QDir::separator() + pressedImageFileName);
+                    xmlPath + QDir::separator() + pressedImageFileName);
             } else if (xml.name() == "keyList") {
                 /* HW keys */
                 int cnt = parseKeyList(xml, form->keyList);
@@ -200,8 +199,31 @@ MainForm *XmlLayoutParser::parseMainForm(
     return form;
 }
 
-ControllerForm *XmlLayoutParser::parseControllerForm(
-    QXmlStreamReader &xml, QString skinPath)
+int XmlLayoutParser::parseMainFormList(
+    QXmlStreamReader &xml, QList<MainForm *> &list)
+{
+    MainForm *form = NULL;
+    QXmlStreamReader::TokenType token = xml.readNext();
+
+    while (xml.atEnd() == false && (xml.name() == "formList" &&
+        token == QXmlStreamReader::EndElement) == false) /* ~ </formList> */
+    {
+        if (token == QXmlStreamReader::StartElement) {
+            if (xml.name() == "form") {
+                form = parseMainForm(xml);
+                if (form != NULL) {
+                    list.append(form);
+                }
+            }
+        }
+
+        token = xml.readNext();
+    }
+
+    return list.count();
+}
+
+ControllerForm *XmlLayoutParser::parseControllerForm(QXmlStreamReader &xml)
 {
     QString formName = "";
 
@@ -212,7 +234,7 @@ ControllerForm *XmlLayoutParser::parseControllerForm(
     }
 
     ControllerForm *form = new ControllerForm(
-        formName.isEmpty() ? skinPath.section(QDir::separator(), -1) : formName);
+        formName.isEmpty() ? xmlPath.section(QDir::separator(), -1) : formName);
 
     QXmlStreamReader::TokenType token = xml.readNext();
 
@@ -226,14 +248,14 @@ ControllerForm *XmlLayoutParser::parseControllerForm(
                 qDebug() << "- normalImage :" << normalImageFileName;
 
                 form->conImg[ControllerForm::normal].load(
-                    skinPath + QDir::separator() + normalImageFileName);
+                    xmlPath + QDir::separator() + normalImageFileName);
             } else if (xml.name() == "pressedImage") {
                 /* key pressed image */
                 QString pressedImageFileName = xml.readElementText();
                 qDebug() << "- pressedImage :" << pressedImageFileName;
 
                 form->conImg[ControllerForm::pressed].load(
-                    skinPath + QDir::separator() + pressedImageFileName);
+                    xmlPath + QDir::separator() + pressedImageFileName);
             } else if (xml.name() == "keyList") {
                 /* HW keys */
                 int cnt = parseKeyList(xml, form->keyList);
index c187eb5..749e613 100644 (file)
 class XmlLayoutParser
 {
 public:
-    XmlLayoutParser();
+    XmlLayoutParser(QString path);
 
     QRect parseRegion(QXmlStreamReader &xml);
     DisplayType *parseDisplay(QXmlStreamReader &xml);
     HardwareKey *parseKey(QXmlStreamReader &xml);
     int parseKeyList(QXmlStreamReader &xml, QList<HardwareKey *> &list);
-    MainForm *parseMainForm(QXmlStreamReader &xml, QString skinPath);
-    ControllerForm *parseControllerForm(QXmlStreamReader &xml, QString skinPath);
+    MainForm *parseMainForm(QXmlStreamReader &xml);
+    int parseMainFormList(QXmlStreamReader &xml, QList<MainForm *> &list);
+    ControllerForm *parseControllerForm(QXmlStreamReader &xml);
 
 private:
-
+    QString xmlPath;
 };
 
 #endif // XMLLAYOUTPARSER_H
index 7e6f47f..d9a3e49 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "controllerform.h"
 
-ControllerForm::ControllerForm(QString name)
+ControllerForm::ControllerForm(const QString &name)
 {
     this->name = name;
 }
index e6e2183..a78e58f 100644 (file)
@@ -39,7 +39,7 @@ class ControllerForm
     Q_ENUMS(ConImgType)
 
 public:
-    ControllerForm(QString name);
+    ControllerForm(const QString &name);
     ~ControllerForm();
 
     QString getName();
index 6bb5523..94e30e7 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "mainform.h"
 
-MainForm::MainForm(QString name)
+MainForm::MainForm(const QString &name)
 {
     this->name = name;
     this->displayType = NULL;
index 4462277..c06eb5c 100644 (file)
@@ -40,7 +40,7 @@ class MainForm
     Q_ENUMS(SkinImgType)
 
 public:
-    MainForm(QString name);
+    MainForm(const QString &name);
     ~MainForm();
 
     QString getName();
index e5d255e..c3d11dc 100644 (file)
@@ -69,9 +69,8 @@ void ContextMenu::createItems() {
     QAction *action = NULL;
 
     /* Detailed Info menu */
-    actionDetailedInfo = addAction(vmName);
-    actionDetailedInfo->setIcon(QIcon(QPixmap(":/icons/detailed_info.png")));
-    connect(actionDetailedInfo, SIGNAL(triggered()), this, SLOT(slotDetailedInfo()));
+    actionDetailedInfo = addGeneralAction(this, vmName,
+        QIcon(QPixmap(":/icons/detailed_info.png")), SLOT(slotDetailedInfo()));
 
     addSeparator();
 
@@ -138,7 +137,7 @@ void ContextMenu::createItems() {
 
     /* = Controller menu = */
     if (win->uiInfo->conFormList.isEmpty() == false) {
-        QMenu *controllerMenu = addMenu("Controller");
+        QMenu *controllerMenu = addMenu("Con&troller");
         QActionGroup *controllerGroup = new QActionGroup(this);
         controllerMapper = new QSignalMapper(this);
         connect(controllerMapper, SIGNAL(mapped(int)), this, SLOT(slotController(int)));
@@ -164,9 +163,8 @@ void ContextMenu::createItems() {
     QMenu *advancedMenu = addMenu(QIcon(QPixmap(":/icons/advanced.png")), "Ad&vanced");
 
     /* Advanced > Screen Shot menu */
-    action = advancedMenu->addAction("Screen Shot");
-    action->setIcon(QIcon(QPixmap(":/icons/screen_shot.png")));
-    connect(action, SIGNAL(triggered()), this, SLOT(slotRequestScreenshot()));
+    action = addGeneralAction(advancedMenu, "&Screen Shot",
+        QIcon(QPixmap(":/icons/screen_shot.png")), SLOT(slotRequestScreenshot()));
 
     /* = Host Keyboard menu = */
     QMenu *keyboardMenu = advancedMenu->addMenu(
@@ -186,32 +184,37 @@ void ContextMenu::createItems() {
     advancedMenu->addSeparator();
 
     /* Advanced > About menu */
-    actionAbout = advancedMenu->addAction("&About");
-    actionAbout->setIcon(QIcon(QPixmap(":/icons/about.png")));
-    connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotAbout()));
+    actionAbout = addGeneralAction(advancedMenu, "&About",
+        QIcon(QPixmap(":/icons/about.png")), SLOT(slotAbout()));
 
     /* Advanced > Force Close menu */
-    actionForceClose = advancedMenu->addAction("&Force Close");
-    actionForceClose->setIcon(QIcon(QPixmap(":/icons/force_close.png")));
-    connect(actionForceClose, SIGNAL(triggered()), this, SLOT(slotForceClose()));
+    actionForceClose = addGeneralAction(advancedMenu, "&Force Close",
+        QIcon(QPixmap(":/icons/force_close.png")), SLOT(slotForceClose()));
     /* ================= */
 
     /* Shell menu */
-    actionShell = addAction("S&hell");
-    actionShell->setIcon(QIcon(QPixmap(":/icons/shell.png")));
-    connect(actionShell, SIGNAL(triggered()), this, SLOT(slotShell()));
+    actionShell = addGeneralAction(this, "S&hell",
+        QIcon(QPixmap(":/icons/shell.png")), SLOT(slotShell()));
 
     /* Control Panel menu */
-    actionControlPanel = addAction("Control &Panel");
-    actionControlPanel->setIcon(QIcon(QPixmap(":/icons/control_panel.png")));
-    connect(actionControlPanel, SIGNAL(triggered()), this, SLOT(slotControlPanel()));
+    actionControlPanel = addGeneralAction(this, "Control &Panel",
+        QIcon(QPixmap(":/icons/control_panel.png")), SLOT(slotControlPanel()));
 
     addSeparator();
 
     /* Close menu */
-    actionClose = addAction("&Close");
-    actionClose->setIcon(QIcon(QPixmap(":/icons/close.png")));
-    connect(actionClose, SIGNAL(triggered()), this, SLOT(slotClose()));
+    actionClose = addGeneralAction(this, "&Close",
+        QIcon(QPixmap(":/icons/close.png")), SLOT(slotClose()));
+}
+
+QAction *ContextMenu::addGeneralAction(QMenu *menu,
+    const QString &text, const QIcon &icon, const char *slot)
+{
+    QAction *action = menu->addAction(text);
+    action->setIcon(icon);
+    connect(action, SIGNAL(triggered()), this, slot);
+
+    return action;
 }
 
 bool ContextMenu::eventFilter(QObject *obj, QEvent *event)
@@ -380,7 +383,7 @@ void ContextMenu::slotShell()
 
     try {
         QProcess::startDetached(command, arguments);
-    } catch (QString error) {
+    } catch (QString &error) {
         QString msg = "Failed to open Shell : " + error;
         qDebug() << msg;
 
@@ -535,7 +538,7 @@ void ContextMenu::slotControlPanel()
 
     try {
         QProcess::startDetached(command, arguments);
-    } catch (QString error) {
+    } catch (QString &error) {
         showPopup("Failed to open Control Panel : " + error);
         return;
     }
index 3ee8399..20f5f83 100644 (file)
@@ -58,6 +58,7 @@ public:
     QSignalMapper *getSwitchMapper();
     QSignalMapper *getScaleMapper();
     QSignalMapper *getControllerMapper();
+
     Screenshot *screenshotDialog;
 
 signals:
@@ -85,8 +86,11 @@ protected:
     bool eventFilter(QObject *obj, QEvent *event);
 
 private:
-    MainWindow *parent;
+    QAction *addGeneralAction(QMenu *menu,
+        const QString &text, const QIcon &icon, const char *slot);
+    void showPopup(QString msg);
 
+    MainWindow *parent;
     QString vmName;
     DetailedInfoDialog *infoDialog;
     AboutDialog *aboutDialog;
@@ -103,7 +107,5 @@ private:
     QAction *actionAbout;
     QAction *actionForceClose;
     QAction *actionClose;
-
-    void showPopup(QString msg);
 };
 #endif // CONTEXTMENU_H
diff --git a/tizen/src/ui/resource/mobile-720x1280-3btn/layout.qml b/tizen/src/ui/resource/mobile-720x1280-3btn/layout.qml
deleted file mode 100644 (file)
index 012075d..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-import EmulatorComponent 1.0
-
-EmulatorUI {
-    property string version: "1.0"
-
-    FormList {
-        Form {
-            objectName: "portrait"
-            display: Region { left: 67; top: 116; width: 720; height: 1280 }
-
-            mainImage: "default_0.png"
-            pressedImage: "default_0_p.png"
-
-            KeyList {
-                Key { objectName: "Menu"; keycode: 169
-                    Region { left: 210; top: 1401; width: 84; height: 84 }
-                    tooltip: "Menu"
-                }
-                Key { objectName: "Home"; keycode: 139
-                    Region { left: 390; top: 1401; width: 84; height: 84 }
-                    tooltip: "Home"
-                }
-                Key { objectName: "Back"; keycode: 158
-                    Region { left: 570; top: 1401; width: 84; height: 84 }
-                    tooltip: "Back"
-                }
-                Key { objectName: "Power"; keycode: 116
-                    Region { left: 841; top: 1309; width: 24; height: 96 }
-                    tooltip: "Power"
-                }
-                Key { objectName: "Volume +"; keycode: 115
-                    Region { left: 841; top: 108; width: 24; height: 96 }
-                    tooltip: "Volume +"
-                }
-                Key { objectName: "Volume -"; keycode: 114
-                    Region { left: 841; top: 219; width: 24; height: 96 }
-                    tooltip: "Volume -"
-                }
-            }
-        }
-
-        Form {
-            objectName: "landscape"
-            display: Region { left: 116; top: 78; width: 1280; height: 720 }
-
-            mainImage: "default_L90.png"
-            pressedImage: "default_L90_p.png"
-
-            KeyList {
-                Key { objectName: "Menu"; keycode: 169
-                    Region { left: 1400; top: 570; width: 84; height: 84 }
-                    tooltip: "Menu"
-                }
-                Key { objectName: "Home"; keycode: 139
-                    Region { left: 1400; top: 392; width: 84; height: 84 }
-                    tooltip: "Home"
-                }
-                Key { objectName: "Back"; keycode: 158
-                    Region { left: 1400; top: 210; width: 84; height: 84 }
-                    tooltip: "Back"
-                }
-                Key { objectName: "Power"; keycode: 116
-                    Region { left: 1308; top: 2; width: 96; height: 24 }
-                    tooltip: "Power"
-                }
-                Key { objectName: "Volume +"; keycode: 115
-                    Region { left: 108; top: 2; width: 96; height: 24 }
-                    tooltip: "Volume +"
-                }
-                Key { objectName: "Volume -"; keycode: 114
-                    Region { left: 217; top: 2; width: 96; height: 24 }
-                    tooltip: "Volume -"
-                }
-            }
-        }
-
-        Form {
-            objectName: "reverse portrait"
-            display: Region { left: 78; top: 117; width: 720; height: 1280 }
-
-            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 -"
-                }
-            }
-        }
-
-        Form {
-            objectName: "reverse landscape"
-            display: Region { left: 117; top: 67; width: 1280; height: 720 }
-
-            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 -"
-                }
-            }
-        }
-    }
-}
diff --git a/tizen/src/ui/resource/wearable-320x320-1btn/layout.qml b/tizen/src/ui/resource/wearable-320x320-1btn/layout.qml
deleted file mode 100644 (file)
index 9fee044..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-import EmulatorComponent 1.0
-
-EmulatorUI {
-    property string version: "1.0"
-
-    FormList {
-        Form {
-            objectName: "portrait"
-            display: Region { left: 26; top: 60; width: 320; height: 320 }
-
-            mainImage: "default_0.png"
-            pressedImage: "default_0_p.png"
-
-            KeyList {
-                Key { objectName: "Power"; keycode: 116
-                    Region { left: 372; top: 116; width: 12; height: 80 }
-                    tooltip: "Power"
-                }
-            }
-        }
-
-        Form {
-            objectName: "landscape"
-            display: Region { left: 60; top: 38; width: 320; height: 320 }
-
-            mainImage: "default_L90.png"
-            pressedImage: "default_L90_p.png"
-
-            KeyList {
-                Key { objectName: "Power"; keycode: 116
-                    Region { left: 116; top: 0; width: 80; height: 12 }
-                    tooltip: "Power"
-                }
-            }
-        }
-
-        Form {
-            objectName: "reverse portrait"
-            display: Region { left: 38; top: 60; width: 320; height: 320 }
-
-            mainImage: "default_180.png"
-            pressedImage: "default_180_p.png"
-
-            KeyList {
-                Key { objectName: "Power"; keycode: 116
-                    Region { left: 0; top: 244; width: 12; height: 80 }
-                    tooltip: "Power"
-                }
-            }
-        }
-
-        Form {
-            objectName: "reverse landscape"
-            display: Region { left: 60; top: 26; width: 320; height: 320 }
-
-            mainImage: "default_R90.png"
-            pressedImage: "default_R90_p.png"
-
-            KeyList {
-                Key { objectName: "Power"; keycode: 116
-                    Region { left: 244; top: 372; width: 80; height: 12 }
-                    tooltip: "Power"
-                }
-            }
-        }
-    }
-}
diff --git a/tizen/src/ui/resource/wearable-320x320-1btn/layout.xml b/tizen/src/ui/resource/wearable-320x320-1btn/layout.xml
new file mode 100644 (file)
index 0000000..d43acca
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<EmulatorUI xmlns="http://www.tizen.org/emulator/ui/layout">
+    <dbi_version>2.4</dbi_version>
+    <formList>
+        <form name="Portrait">
+            <display>
+                <region left="26" top="60" width="320" height="320"/>
+                <angle>0</angle>
+            </display>
+            <normalImage>default_0.png</normalImage>
+            <pressedImage>default_0_p.png</pressedImage>
+            <keyList>
+                <key name="Power">
+                    <region left="372" top="116" width="12" height="80"/>
+                    <keycode>116</keycode>
+                    <tooltip>Power</tooltip>
+                </key>
+            </keyList>
+        </form>
+        <form name="Landscape">
+            <display>
+                <region left="60" top="38" width="320" height="320"/>
+                <angle>270</angle>
+            </display>
+            <normalImage>default_L90.png</normalImage>
+            <pressedImage>default_L90_p.png</pressedImage>
+            <keyList>
+                <key name="Power">
+                    <region left="116" top="0" width="80" height="12"/>
+                    <keycode>116</keycode>
+                    <tooltip>Power</tooltip>
+                </key>
+            </keyList>
+        </form>
+        <form name="Reverse Portrait">
+            <display>
+                <region left="38" top="60" width="320" height="320"/>
+                <angle>180</angle>
+            </display>
+            <normalImage>default_180.png</normalImage>
+            <pressedImage>default_180_p.png</pressedImage>
+            <keyList>
+                <key name="Power">
+                    <region left="0" top="244" width="12" height="80"/>
+                    <keycode>116</keycode>
+                    <tooltip>Power</tooltip>
+                </key>
+            </keyList>
+        </form>
+        <form name="Reverse Landscape">
+            <display>
+                <region left="60" top="26" width="320" height="320"/>
+                <angle>90</angle>
+            </display>
+            <normalImage>default_R90.png</normalImage>
+            <pressedImage>default_R90_p.png</pressedImage>
+            <keyList>
+                <key name="Power">
+                    <region left="244" top="372" width="80" height="12"/>
+                    <keycode>116</keycode>
+                    <tooltip>Power</tooltip>
+                </key>
+            </keyList>
+        </form>
+    </formList>
+</EmulatorUI>