controller: view split into two types for docking and floating 86/29086/2
authorGiWoong Kim <giwoong.kim@samsung.com>
Mon, 29 Sep 2014 06:57:06 +0000 (15:57 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 22 Oct 2014 04:50:36 +0000 (21:50 -0700)
Change-Id: I080546ebe80f0d3eb365656ef0bbc232ed351957
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
16 files changed:
tizen/src/ui/Makefile.objs
tizen/src/ui/dockingcontroller.cpp
tizen/src/ui/dockingcontroller.h
tizen/src/ui/dockingconview.cpp [new file with mode: 0644]
tizen/src/ui/dockingconview.h [new file with mode: 0644]
tizen/src/ui/floatingcontroller.cpp
tizen/src/ui/floatingcontroller.h
tizen/src/ui/floatingconview.cpp [new file with mode: 0644]
tizen/src/ui/floatingconview.h [new file with mode: 0644]
tizen/src/ui/mainwindow.cpp
tizen/src/ui/mainwindow.h
tizen/src/ui/menu/contextmenu.cpp
tizen/src/ui/skincontrollerview.cpp [deleted file]
tizen/src/ui/skincontrollerview.h [deleted file]
tizen/src/ui/uistate.cpp
tizen/src/ui/uistate.h

index 2e0f143b011f297cfdad795129eaaf95c443b503..fbde158636f88d675ede2b6a5d51d3b0da67c346 100644 (file)
@@ -7,14 +7,15 @@ $(obj)/qrc_resource.cpp: $(TIZEN_UI)/resource/resource.qrc
 
 obj-$(CONFIG_QT) += controllerform.o
 obj-$(CONFIG_QT) += dockingcontroller.o moc_dockingcontroller.o
+obj-$(CONFIG_QT) += dockingconview.o
 obj-$(CONFIG_QT) += floatingcontroller.o moc_floatingcontroller.o
+obj-$(CONFIG_QT) += floatingconview.o
 obj-$(CONFIG_QT) += displaybase.o
 obj-$(CONFIG_QT) += displayglwidget.o moc_displayglwidget.o
 obj-$(CONFIG_QT) += displayswwidget.o moc_displayswwidget.o
 obj-$(CONFIG_QT) += hardwarekey.o
 obj-$(CONFIG_QT) += mainwindow.o moc_mainwindow.o
 obj-$(CONFIG_QT) += skinbezelitem.o
-obj-$(CONFIG_QT) += skincontrollerview.o
 obj-$(CONFIG_QT) += skinkeyitem.o moc_skinkeyitem.o
 obj-$(CONFIG_QT) += mainform.o
 obj-$(CONFIG_QT) += keyboardhelper.o
index f1123779f45e1ef466a81df65df39ae20605e29d..d5d7d6fd5c392591f1c6faba0f882e1492412770 100644 (file)
@@ -33,7 +33,7 @@
 #include "mainwindow.h"
 
 DockingController::DockingController(ControllerForm *conForm, QGraphicsScene *conScene,
-    QAction *menu, QWidget *parent) : SkinControllerView(conForm, conScene, parent)
+    QAction *menu, QWidget *parent) : DockingConView(conForm, conScene, parent)
 {
     this->conForm = conForm;
     this->menu = menu;
@@ -45,7 +45,6 @@ DockingController::DockingController(ControllerForm *conForm, QGraphicsScene *co
 void DockingController::showEvent(QShowEvent *event)
 {
     menu->setChecked(true);
-    //setRegion(conForm->conImg[ControllerForm::normal]);
 }
 
 void DockingController::closeEvent(QCloseEvent *event) {
index 765c8a14571ab97666ba3108e61290cf79f2d2a7..95ce795a6adf2313cc65da15f2b4d1a237c13502 100644 (file)
@@ -33,9 +33,9 @@
 #include <QDialog>
 
 #include "controllerform.h"
-#include "skincontrollerview.h"
+#include "dockingconview.h"
 
-class DockingController : public SkinControllerView
+class DockingController : public DockingConView
 {
     Q_OBJECT
 
diff --git a/tizen/src/ui/dockingconview.cpp b/tizen/src/ui/dockingconview.cpp
new file mode 100644 (file)
index 0000000..128622e
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include "dockingconview.h"
+#include "mainwindow.h"
+#include "skinkeyitem.h"
+
+DockingConView::DockingConView(ControllerForm *conForm, QGraphicsScene *scene, QWidget *parent) :
+    QGraphicsView(scene, parent)
+{
+    setStyleSheet("background: transparent");
+    //setAttribute(Qt::WA_TranslucentBackground);
+    setStyleSheet("border-style: none");
+
+    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    setAlignment(Qt::AlignLeft | Qt::AlignTop);
+
+    rubberPos = QPoint(-1, -1);
+    grabPos = QPoint(-1, -1);
+    rubberBand = new QRubberBand(QRubberBand::Rectangle, NULL);
+
+    createItems(conForm);
+}
+
+void DockingConView::createItems(ControllerForm *conForm)
+{
+    /* bezel */
+    SkinBezelItem *bezelItem = new SkinBezelItem(conForm->conImg[ControllerForm::normal]);
+    scene()->addItem(bezelItem);
+
+    /* HW keys */
+    QList<HardwareKey *> keyList = conForm->keyList;
+
+    HardwareKey *hwKey = NULL;
+    for (int i = 0; i < keyList.count(); i++) {
+        hwKey = keyList.at(i);
+        if (hwKey != NULL) {
+            new SkinKeyItem(conForm->conImg[ControllerForm::pressed].copy(hwKey->region),
+                    hwKey, bezelItem);
+        }
+    }
+}
+
+void DockingConView::resizeEvent(QResizeEvent *event)
+{
+    //qDebug("resize con view");
+
+    Q_UNUSED(event)
+}
+
+void DockingConView::mousePressEvent(QMouseEvent *event)
+{
+    if (event->button() == Qt::LeftButton) {
+        QWidget *win = ((QWidget *) this->parent());
+
+        grabPos = event->globalPos();
+        eventPos = event->pos();
+        rubberPos = win->pos() + this->pos();
+
+        if (rubberBand != NULL) {
+            rubberBand->setGeometry(QRect(rubberPos, size()));
+            rubberBand->show();
+        }
+    }
+
+    QGraphicsView::mousePressEvent(event);
+}
+
+void DockingConView::mouseReleaseEvent(QMouseEvent *event)
+{
+    if (event->button() == Qt::LeftButton) {
+        if (grabPos != QPoint(-1, -1)) {
+            if (rubberBand != NULL) {
+                rubberBand->hide();
+            }
+
+            MainWindow *win = ((MainWindow *)this->parent());
+            win->getUIState()->conState.recentlyFloatPos = event->globalPos() - eventPos;
+            win->openController(win->getUIState()->conState.conFormIndex, false);
+
+            grabPos = QPoint(-1, -1);
+        }
+    }
+
+    QGraphicsView::mouseReleaseEvent(event);
+}
+
+void DockingConView::mouseMoveEvent(QMouseEvent *event)
+{
+    if (grabPos != QPoint(-1, -1)) {
+        rubberBand->setGeometry(
+            QRect(rubberPos + (event->globalPos() - grabPos), size()));
+    }
+
+    QGraphicsView::mouseMoveEvent(event);
+}
+
+DockingConView::~DockingConView()
+{
+    qDebug("destroy docking controller view");
+
+    if (rubberBand != NULL) {
+        rubberBand->close();
+        delete rubberBand;
+        rubberBand = NULL;
+    }
+}
diff --git a/tizen/src/ui/dockingconview.h b/tizen/src/ui/dockingconview.h
new file mode 100644 (file)
index 0000000..7545066
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef DOCKINGCONVIEW_H
+#define DOCKINGCONVIEW_H
+
+#include <QRubberBand>
+
+#include "skinview.h"
+#include "controllerform.h"
+
+class DockingConView : public QGraphicsView
+{
+public:
+    DockingConView(ControllerForm *conForm, QGraphicsScene *scene, QWidget *parent = 0);
+    ~DockingConView();
+
+protected:
+    void resizeEvent(QResizeEvent *event);
+
+    void mousePressEvent(QMouseEvent *event);
+    void mouseReleaseEvent(QMouseEvent *event);
+    void mouseMoveEvent(QMouseEvent *event);
+
+    QPoint grabPos;
+    QPoint eventPos;
+    QPoint rubberPos;
+
+private:
+    void createItems(ControllerForm *conForm);
+
+    QRubberBand *rubberBand;
+};
+
+#endif // DOCKINGCONVIEW_H
index 9188d5327242cc94f143d8f3b9c535ee81e74139..422402b59808ab87cf9f282dc05d1d9edc726b37 100644 (file)
@@ -50,7 +50,7 @@ FloatingController::FloatingController(ControllerForm *conForm,
 
     QGraphicsScene *conScene = new QGraphicsScene(this);
 
-    conView = new SkinControllerView(conForm, conScene, this);
+    conView = new FloatingConView(conForm, conScene, this);
     conView->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
     layout->addWidget(conView);
 }
index 13bb958c54004e3e3bffb5268d380a0371418a73..d70f6ee174652103accd1e40ae2e4946cbdeea82 100644 (file)
@@ -33,7 +33,7 @@
 #include <QDialog>
 
 #include "controllerform.h"
-#include "skincontrollerview.h"
+#include "floatingconview.h"
 
 class FloatingController : public QDialog
 {
@@ -50,7 +50,7 @@ protected:
     void setRegion(QImage baseImage);
 
 private:
-    SkinControllerView *conView;
+    FloatingConView *conView;
     ControllerForm *conForm;
     QAction *menu;
 };
diff --git a/tizen/src/ui/floatingconview.cpp b/tizen/src/ui/floatingconview.cpp
new file mode 100644 (file)
index 0000000..604fa8f
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include "floatingconview.h"
+#include "mainwindow.h"
+#include "skinkeyitem.h"
+
+FloatingConView::FloatingConView(ControllerForm *conForm, QGraphicsScene *scene, QWidget *parent) :
+    QGraphicsView(scene, parent)
+{
+    setStyleSheet("background: transparent");
+    //setAttribute(Qt::WA_TranslucentBackground);
+    setStyleSheet("border-style: none");
+
+    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    setAlignment(Qt::AlignLeft | Qt::AlignTop);
+
+    winPos = QPoint(-1, -1);
+    grabPos = QPoint(-1, -1);
+
+    createItems(conForm);
+}
+
+void FloatingConView::createItems(ControllerForm *conForm)
+{
+    /* bezel */
+    SkinBezelItem *bezelItem = new SkinBezelItem(conForm->conImg[ControllerForm::normal]);
+    scene()->addItem(bezelItem);
+
+    /* HW keys */
+    QList<HardwareKey *> keyList = conForm->keyList;
+
+    HardwareKey *hwKey = NULL;
+    for (int i = 0; i < keyList.count(); i++) {
+        hwKey = keyList.at(i);
+        if (hwKey != NULL) {
+            new SkinKeyItem(conForm->conImg[ControllerForm::pressed].copy(hwKey->region),
+                    hwKey, bezelItem);
+        }
+    }
+}
+
+void FloatingConView::resizeEvent(QResizeEvent *event)
+{
+    //qDebug("resize con view");
+
+    Q_UNUSED(event)
+}
+
+void FloatingConView::mousePressEvent(QMouseEvent *event)
+{
+    if (event->button() == Qt::LeftButton) {
+        QWidget *win = ((QWidget *) this->parent());
+
+        grabPos = event->globalPos();
+        winPos = win->pos();
+    }
+
+    QGraphicsView::mousePressEvent(event);
+}
+
+void FloatingConView::mouseReleaseEvent(QMouseEvent *event)
+{
+    if (event->button() == Qt::LeftButton) {
+        grabPos = QPoint(-1, -1);
+    }
+
+    QGraphicsView::mouseReleaseEvent(event);
+}
+
+void FloatingConView::mouseMoveEvent(QMouseEvent *event)
+{
+    QWidget *win = ((QWidget *)this->parent());
+
+    if (grabPos != QPoint(-1, -1)) {
+        win->move(winPos + (event->globalPos() - grabPos));
+    }
+
+    QGraphicsView::mouseMoveEvent(event);
+}
+
+FloatingConView::~FloatingConView()
+{
+    qDebug("destroy floating controller view");
+}
diff --git a/tizen/src/ui/floatingconview.h b/tizen/src/ui/floatingconview.h
new file mode 100644 (file)
index 0000000..9ae330d
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef FLOATINGCONVIEW_H
+#define FLOATINGCONVIEW_H
+
+#include "skinview.h"
+#include "controllerform.h"
+
+class FloatingConView : public QGraphicsView
+{
+public:
+    FloatingConView(ControllerForm *conForm, QGraphicsScene *scene, QWidget *parent = 0);
+    ~FloatingConView();
+
+protected:
+    void resizeEvent(QResizeEvent *event);
+
+    void mousePressEvent(QMouseEvent *event);
+    void mouseReleaseEvent(QMouseEvent *event);
+    void mouseMoveEvent(QMouseEvent *event);
+
+    QPoint grabPos;
+    QPoint winPos;
+
+private:
+    void createItems(ControllerForm *conForm);
+};
+
+#endif // FLOATINGCONVIEW_H
index 74531f7839b9b0a78b82c5249c6c968ab14e030d..f7bc27a7608fb1896b3452a655994af10a13d9b9 100644 (file)
@@ -229,8 +229,14 @@ void MainWindow::openController(int index, bool docking)
     if (docking == true) {
         winLayout->addWidget(getDockingCon());
     } else {
-        QPoint globalPos = mapToGlobal(QPoint(0, 0));
-        getFloatingCon()->move(globalPos.x() + size().width(), globalPos.y());
+        if (getUIState()->conState.recentlyFloatPos == QPoint(-1, -1)) {
+            QPoint globalPos = mapToGlobal(QPoint(0, 0));
+            getFloatingCon()->move(globalPos.x() + size().width(), globalPos.y());
+        } else {
+            getFloatingCon()->move(getUIState()->conState.recentlyFloatPos);
+            getUIState()->conState.recentlyFloatPos = QPoint(-1, -1);
+        }
+
         getFloatingCon()->show();
     }
 }
index b02c5d3d5358fd4748b703d2a14bedaf07af460b..fcc828eca55b9f7b2a1d254cd42ffcb426f17e8a 100644 (file)
@@ -41,7 +41,6 @@
 #include "displaybase.h"
 #include "skinbezelitem.h"
 #include "uiinformation.h"
-#include "skincontrollerview.h"
 #include "dockingcontroller.h"
 #include "floatingcontroller.h"
 
index 637001c43c45a004868b4eac081a604655d6c539..e5090302f253465539e2379b68d02b2d28d21413 100644 (file)
@@ -273,7 +273,7 @@ void ContextMenu::slotController(int index)
     qDebug("controller : %d", index);
 
     MainWindow *win = ((MainWindow *)this->parent());
-    win->openController(index, false);
+    win->openController(index, true);
 }
 
 void ContextMenu::slotShell()
diff --git a/tizen/src/ui/skincontrollerview.cpp b/tizen/src/ui/skincontrollerview.cpp
deleted file mode 100644 (file)
index e4ea095..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Qt UI
- *
- * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * GiWoong Kim <giwoong.kim@samsung.com>
- * Sangho Park <sangho1206.park@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#include "skincontrollerview.h"
-#include "mainwindow.h"
-#include "skinkeyitem.h"
-
-SkinControllerView::SkinControllerView(ControllerForm *conForm, QGraphicsScene *scene, QWidget *parent) :
-    QGraphicsView(scene, parent)
-{
-    setStyleSheet("background: transparent");
-    //setAttribute(Qt::WA_TranslucentBackground);
-    setStyleSheet("border-style: none");
-
-    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-    setAlignment(Qt::AlignLeft | Qt::AlignTop);
-
-    grabWinPos = QPoint(-1, -1);
-    grabPos = QPoint(-1, -1);
-
-    createItems(conForm);
-}
-
-void SkinControllerView::createItems(ControllerForm *conForm)
-{
-    /* bezel */
-    SkinBezelItem *bezelItem = new SkinBezelItem(conForm->conImg[ControllerForm::normal]);
-    scene()->addItem(bezelItem);
-
-    /* HW keys */
-    QList<HardwareKey *> keyList = conForm->keyList;
-
-    HardwareKey *hwKey = NULL;
-    for (int i = 0; i < keyList.count(); i++) {
-        hwKey = keyList.at(i);
-        if (hwKey != NULL) {
-            new SkinKeyItem(conForm->conImg[ControllerForm::pressed].copy(hwKey->region),
-                    hwKey, bezelItem);
-        }
-    }
-}
-
-void SkinControllerView::resizeEvent(QResizeEvent *event)
-{
-    //qDebug("resize con view");
-
-    Q_UNUSED(event)
-}
-
-void SkinControllerView::mousePressEvent(QMouseEvent *event)
-{
-    if (event->button() == Qt::LeftButton) {
-        QWidget *win = ((QWidget *) this->parent());
-        grabWinPos = win->pos();
-        grabPos = event->globalPos();
-    }
-
-    QGraphicsView::mousePressEvent(event);
-}
-
-void SkinControllerView::mouseReleaseEvent(QMouseEvent *event)
-{
-    if (event->button() == Qt::LeftButton) {
-        grabPos = QPoint(-1, -1);
-    }
-
-    QGraphicsView::mouseReleaseEvent(event);
-}
-
-void SkinControllerView::mouseMoveEvent(QMouseEvent *event)
-{
-    QWidget *win = ((QWidget *)this->parent());
-
-    if (grabPos != QPoint(-1, -1)) {
-        win->move(grabWinPos + (event->globalPos() - grabPos));
-    }
-
-    QGraphicsView::mouseMoveEvent(event);
-}
-
-SkinControllerView::~SkinControllerView()
-{
-    qDebug("destroy controller view");
-}
diff --git a/tizen/src/ui/skincontrollerview.h b/tizen/src/ui/skincontrollerview.h
deleted file mode 100644 (file)
index 5ef6bb0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Qt UI
- *
- * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * GiWoong Kim <giwoong.kim@samsung.com>
- * Sangho Park <sangho1206.park@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#ifndef SKINCONTROLLERVIEW_H
-#define SKINCONTROLLERVIEW_H
-
-#include "skinview.h"
-#include "controllerform.h"
-
-class SkinControllerView : public QGraphicsView
-{
-public:
-    SkinControllerView(ControllerForm *conForm, QGraphicsScene *scene, QWidget *parent = 0);
-    ~SkinControllerView();
-
-protected:
-    void resizeEvent(QResizeEvent *event);
-
-    void mousePressEvent(QMouseEvent *event);
-    void mouseReleaseEvent(QMouseEvent *event);
-    void mouseMoveEvent(QMouseEvent *event);
-
-    QPoint grabWinPos;
-    QPoint grabPos;
-
-private:
-    void createItems(ControllerForm *conForm);
-};
-
-#endif // SKINCONTROLLERVIEW_H
index 5cde385af0e7fa15873b4161b0d16214072f14b0..af8c79d5dd76e66283040f79ed1e8dff92ddf993 100644 (file)
@@ -35,6 +35,7 @@ UIState::UIState() :
     conState.conFormIndex = 0;
     conState.dockingCon = NULL;
     conState.floatingCon = NULL;
+    conState.recentlyFloatPos = QPoint(-1, -1);
 }
 
 int UIState::getMainFormIndex(int angle)
index a35edb09d9d99e48a44cc39a90b84e65ace9b681..562af2f383e0c1b67d12141ff4769facc6429ace 100644 (file)
@@ -45,6 +45,7 @@ public:
     int conFormIndex;
     DockingController *dockingCon;
     FloatingController *floatingCon;
+    QPoint recentlyFloatPos;
 };
 
 class UIState