diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-11-07 10:43:39 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-11-07 10:43:39 +0900 |
commit | c76c903dffed920552459a808f29ff5ad32e10be (patch) | |
tree | 7c3436071ab16941f36a1098163fdd1a408d2c6c /homescreen/src/toucharea.cpp | |
parent | 33d31b5bac3c8c9105d43d6566174f39ef7a4ea4 (diff) |
add fullscreen button
Diffstat (limited to 'homescreen/src/toucharea.cpp')
-rw-r--r-- | homescreen/src/toucharea.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/homescreen/src/toucharea.cpp b/homescreen/src/toucharea.cpp new file mode 100644 index 0000000..1cf4384 --- /dev/null +++ b/homescreen/src/toucharea.cpp @@ -0,0 +1,36 @@ +#include "toucharea.h" +#include "hmi-debug.h" + +TouchArea::TouchArea() +{ +} + +TouchArea::~TouchArea() +{ + +} + +void TouchArea::setWindow(QQuickWindow *window) +{ + myWindow = window; +} + +void TouchArea::init() +{ + bitmapNormal = QPixmap(":/images/AGL_HMI_Normal_Background.png").createHeuristicMask(); + bitmapFullscreen = QPixmap(":/images/AGL_HMI_Full_Background.png").createHeuristicMask(); + myWindow->setMask(QRegion(bitmapNormal)); +} + +void TouchArea::switchArea(int areaType) +{ + if(areaType == NORMAL) { + myWindow->setMask(QRegion(bitmapNormal)); + HMI_DEBUG("HomeScreen","TouchArea switchArea: %d.", areaType); + } else if (areaType == FULLSCREEN) { + HMI_DEBUG("HomeScreen","TouchArea switchArea: %d.", areaType); + myWindow->setMask(QRegion(bitmapFullscreen)); + } +} + + |