diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-11-12 17:44:25 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-11-12 17:44:25 +0900 |
commit | 9fda22b87349c212f5694e769493ed15addd7cee (patch) | |
tree | 0c56d8a974bb06b4283b015c43f7d65af72b38a4 /demo#3/horizontal/homescreen/homescreen/src/toucharea.cpp | |
parent | feaf630569134f6fa5e297353dd45b2bcd7467b3 (diff) |
Add homescreen and launcher for horizontal mode
Add homescreen and launcher for horizontal mode
Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
Diffstat (limited to 'demo#3/horizontal/homescreen/homescreen/src/toucharea.cpp')
-rw-r--r-- | demo#3/horizontal/homescreen/homescreen/src/toucharea.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/demo#3/horizontal/homescreen/homescreen/src/toucharea.cpp b/demo#3/horizontal/homescreen/homescreen/src/toucharea.cpp new file mode 100644 index 0000000..aad4b1b --- /dev/null +++ b/demo#3/horizontal/homescreen/homescreen/src/toucharea.cpp @@ -0,0 +1,33 @@ +#include "toucharea.h" + +TouchArea::TouchArea() +{ +} + +TouchArea::~TouchArea() +{ + +} + +void TouchArea::setWindow(QQuickWindow *window) +{ + myWindow = window; +} + +void TouchArea::init() +{ + bitmapNormal = QPixmap(":/images/menubar_normal_background.png").createHeuristicMask(); + bitmapFullscreen = QPixmap(":/images/menubar_full_background.png").createHeuristicMask(); + myWindow->setMask(QRegion(bitmapNormal)); +} + +void TouchArea::switchArea(int areaType) +{ + if(areaType == NORMAL) { + myWindow->setMask(QRegion(bitmapNormal)); + } else if (areaType == FULLSCREEN) { + myWindow->setMask(QRegion(bitmapFullscreen)); + } +} + + |