menu: disable Always on Top menu 70/26270/2
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 20 Aug 2014 05:23:58 +0000 (14:23 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Wed, 20 Aug 2014 07:12:51 +0000 (16:12 +0900)
Change-Id: I088273f7e9faa5eecf8e509efc806b6b5725d250
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/display/qt5_supplement.cpp
tizen/src/ui/mainwindow.cpp
tizen/src/ui/menu/contextmenu.cpp
tizen/src/ui/skinkeyitem.cpp

index 10b5f1918f7946cea3971dc6268846d600a7d431..12e9ad41880e46d104601d552fda01c29cb214c2 100644 (file)
@@ -75,7 +75,7 @@ void qt5_skin_init(void)
     uiInfo->resolution.setHeight(get_emul_resolution_height());
     uiInfo->basePort = get_emul_vm_base_port() + 1;
 
-    uiInfo->skinPath = get_emul_skin_path();
+    uiInfo->skinPath = QDir(get_emul_skin_path()).canonicalPath();
     if (uiInfo->skinPath.endsWith(QDir::separator()) == false) {
         uiInfo->skinPath += QDir::separator();
     }
@@ -122,9 +122,10 @@ void qt5_skin_init(void)
 void qt5_destroy()
 {
     qDebug("qt5 destroy");
+
+    /* TODO : destroy mainwindow and qt5App, close controller */
+
     delete uiInfo;
-    mainwindow->closeController();
-    /* TODO : destroy mainwindow and qt5App */
 }
 
 void qt5_early_prepare(void)
index 6614b83323b6e566aa02bfcfbd326c2500198d28..f13d6c98ceaad79948a7a0feda341a6bdfa477b1 100644 (file)
@@ -98,7 +98,7 @@ MainWindow::MainWindow(UIInformation *uiInfo, QWidget *parent) :
 
     /* scene */
     QGraphicsScene* skinScene = new QGraphicsScene(this);
-    //skinScene->setBackgroundBrush(Qt::black);
+    skinScene->setBackgroundBrush(Qt::black);
 
     /* view */
     skinView = new SkinView(skinScene, this);
@@ -292,7 +292,7 @@ MainWindow::~MainWindow()
 void MainWindow::closeEvent(QCloseEvent *event)
 {
     int r = QMessageBox::warning(this,
-                                 "Warning!",
+                                 "Emulator",
                                  "Do you really want to quit this program?",
                                  QMessageBox::Yes | QMessageBox::Default,
                                  QMessageBox::No);
index 61772b7c8eb3fb93125dd30d459b691948d90204..ecba0a3d9d10616fedf71c9e09672b1632d4d5b1 100644 (file)
@@ -47,10 +47,12 @@ ContextMenu::ContextMenu(QWidget *parent) :
 
     addSeparator();
 
+#if 0
     /* Always On Top menu */
     action = addAction("&Always on Top");
     action->setCheckable(true);
     connect(action, SIGNAL(triggered(bool)), this, SLOT(slotTopMost(bool)));
+#endif
 
     /* = Rotate menu = */
     if (win->uiInfo->formList.count() > 1) {
@@ -124,8 +126,6 @@ ContextMenu::ContextMenu(QWidget *parent) :
     action->setChecked(true);
     /* ============== */
 
-    addSeparator();
-
     /* = Controller menu = */
     QMenu *controllerMenu = NULL;
     if (win->uiInfo->controllerList.isEmpty() == false) {
@@ -143,6 +143,8 @@ ContextMenu::ContextMenu(QWidget *parent) :
         }
     }
 
+    addSeparator();
+
     /* = Advanced menu = */
     QMenu *advancedMenu = addMenu(QIcon(QPixmap(":/icons/advanced.png")), "Ad&vanced");
 
@@ -240,7 +242,7 @@ void ContextMenu::slotShell()
         QString msg = "SDB is not ready.\nPlease wait until the emulator is completely boot up.";
         QMessageBox *msgBox = new QMessageBox();
         msgBox->setAttribute(Qt::WA_DeleteOnClose);
-        msgBox->setWindowTitle("Info");
+        msgBox->setWindowTitle("Emulator");
         msgBox->setText(msg);
         msgBox->setModal(false);
         msgBox->show();
@@ -266,7 +268,7 @@ void ContextMenu::slotShell()
         QString msg = "SDB file does not exist : " + fileInfo.absoluteFilePath();
         QMessageBox *msgBox = new QMessageBox();
         msgBox->setAttribute(Qt::WA_DeleteOnClose);
-        msgBox->setWindowTitle("Error");
+        msgBox->setWindowTitle("Emulator");
         msgBox->setText(msg);
         msgBox->setModal(false);
         msgBox->show();
@@ -297,7 +299,7 @@ void ContextMenu::slotShell()
         QString msg = "Fail to open Shell : " + error;
         QMessageBox *msgBox = new QMessageBox();
         msgBox->setAttribute(Qt::WA_DeleteOnClose);
-        msgBox->setWindowTitle("Fail");
+        msgBox->setWindowTitle("Emulator");
         msgBox->setText(msg);
         msgBox->setModal(false);
         msgBox->show();
index cfc93cf75aec077c1fb96254a6c51ee697965cfa..5afe0fc98f999a7f7388737bcec523a0f5b4181b 100644 (file)
@@ -38,7 +38,8 @@ SkinKeyItem::SkinKeyItem(QImage pressedImg, HardwareKey *key, QGraphicsItem *par
     hoverColor = Qt::white; // TODO:
     pen.setColor(Qt::transparent);
 
-    setToolTip(key->tooltip);
+    setToolTip("<span style=background-color:white><font color=black>"
+        + key->tooltip + "</font></span>");
 
     setAcceptHoverEvents(true);
 }