diff options
author | GiWoong Kim <giwoong.kim@samsung.com> | 2015-06-22 17:39:29 +0900 |
---|---|---|
committer | GiWoong Kim <giwoong.kim@samsung.com> | 2015-06-22 17:45:50 +0900 |
commit | a4c3638958f7956b5eb0323a452845e3a6a85c8e (patch) | |
tree | 5496e5bd4b93ae2fe88eff4a46105251a58c913b /tizen/src/ui/displaybase.cpp | |
parent | 23a93847fe6e6c67449b144590b147bbbac8f523 (diff) | |
download | qemu-a4c3638958f7956b5eb0323a452845e3a6a85c8e.tar.gz qemu-a4c3638958f7956b5eb0323a452845e3a6a85c8e.tar.bz2 qemu-a4c3638958f7956b5eb0323a452845e3a6a85c8e.zip |
display: notify angle to sensor device on Qt GUI
Change-Id: Ieeeb2f894937f8a25a7f6d37b4d5df98e55d595b
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
Diffstat (limited to 'tizen/src/ui/displaybase.cpp')
-rw-r--r-- | tizen/src/ui/displaybase.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tizen/src/ui/displaybase.cpp b/tizen/src/ui/displaybase.cpp index 3772ae7675..3bd885a772 100644 --- a/tizen/src/ui/displaybase.cpp +++ b/tizen/src/ui/displaybase.cpp @@ -31,6 +31,11 @@ #include "displaybase.h" #include "mainwindow.h" +extern "C" { +#include "emul_state.h" +#include "skin/maruskin_operation.h" +} + #define BLANK_GUIDE_IMAGE_PATH "../images/" #define BLANK_GUIDE_IMAGE_NAME "blank-guide.png" @@ -117,9 +122,30 @@ void DisplayBase::switchForm(DisplayType *displayForm) { qDebug() << "display switch angle :" << displayForm->getAngle(); + qt5_window_angle = rotateAngle = displayForm->getAngle(); + rect = displayForm->getRect(); maskImage = displayForm->getMask(); - qt5_window_angle = rotateAngle = displayForm->getAngle(); + + /* update sensor */ + // TODO: use degree + switch(rotateAngle) { + case 0: + do_rotation_event(ROTATION_PORTRAIT); + break; + case 90: + do_rotation_event(ROTATION_REVERSE_LANDSCAPE); + break; + case 180: + do_rotation_event(ROTATION_REVERSE_PORTRAIT); + break; + case 270: + do_rotation_event(ROTATION_LANDSCAPE); + break; + default: + qWarning() << "invalid angle :" << rotateAngle; + break; + } updateGeometry(); update(); |