hwkey: establish priorities for tooltip definition of Key Window
authorGiWoong Kim <giwoong.kim@samsung.com>
Thu, 7 Jan 2016 11:01:20 +0000 (20:01 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 13 Jan 2016 01:19:34 +0000 (10:19 +0900)
priority)
1. In XML file, declared tooltip text for HW key
2. preset shortcut key for HW key

Change-Id: I31a305603e5cbf08a3d466734da21deb3d436be7
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/ui/controller/generalpurposecon.cpp
tizen/src/ui/resource/skins/mobile/mobile-general-3btn/controller/key-window/layout.xml
tizen/src/ui/resource/skins/wearable/wearable-general-1btn/controller/key-window/layout.xml

index 5e8cbf4..08082ff 100644 (file)
@@ -64,13 +64,16 @@ void GeneralPurposeCon::createItems(QList<HardwareKey *> keyList, QSize size)
             keyButton = new HWKeyButton(buttonGroup, hwKey,
                 QSize(GPC_KEYBUTTON_WIDTH, GPC_KEYBUTTON_HEIGHT));
 
-            if (hwKey->getKeySequence().isEmpty() == false) {
-                QString keySequence = hwKey->getKeySequence().toString();
+            QString tooltip = hwKey->getTooltip();
+            if (tooltip.isEmpty() == true) {
+                if (hwKey->getKeySequence().isEmpty() == false) {
+                    tooltip = hwKey->getKeySequence().toString();
 #ifdef CONFIG_DARWIN
-                keySequence.replace(XML_QT_METAKEY_STRING, XML_QT_CTRLKEY_STRING);
+                    tooltip.replace(XML_QT_METAKEY_STRING, XML_QT_CTRLKEY_STRING);
 #endif
-                keyButton->setToolTip(keySequence);
+                }
             }
+            keyButton->setToolTip(tooltip);
 
             layout->addWidget(keyButton);
         }
index ed9f88d..d47eb20 100644 (file)
@@ -5,34 +5,28 @@
         <keyList>
             <key name="Menu">
                 <keycode>169</keycode>
-                <tooltip>Menu</tooltip>
                 <!-- shortcut: on MacOSX, "Ctrl" means not Command key but Control key -->
                 <shortcut>Ctrl+Shift+F6</shortcut>
             </key>
             <key name="Home">
                 <keycode>139</keycode>
-                <tooltip>Home</tooltip>
                 <shortcut>Ctrl+Shift+F5</shortcut>
             </key>
             <key name="Back">
                 <keycode>158</keycode>
-                <tooltip>Back</tooltip>
                 <shortcut>Esc</shortcut>
             </key>
 
             <key name="Power">
                 <keycode>116</keycode>
-                <tooltip>Power</tooltip>
                 <shortcut>Ctrl+Shift+F7</shortcut>
             </key>
             <key name="Volume +">
                 <keycode>115</keycode>
-                <tooltip>Volume +</tooltip>
                 <shortcut>Ctrl+Shift+]</shortcut>
             </key>
             <key name="Volume -">
                 <keycode>114</keycode>
-                <tooltip>Volume -</tooltip>
                 <shortcut>Ctrl+Shift+[</shortcut>
             </key>
         </keyList>
index 03372da..b542f0f 100644 (file)
@@ -5,7 +5,6 @@
         <keyList>
             <key name="Power">
                 <keycode>116</keycode>
-                <tooltip>Power</tooltip>
                 <!-- shortcut: on MacOSX, "Ctrl" means not Command key but Control key -->
                 <shortcut>Ctrl+Shift+F7</shortcut>
             </key>