diff options
Diffstat (limited to 'demo3/vertical/homescreen/homescreen/src/toucharea.cpp')
-rw-r--r-- | demo3/vertical/homescreen/homescreen/src/toucharea.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/demo3/vertical/homescreen/homescreen/src/toucharea.cpp b/demo3/vertical/homescreen/homescreen/src/toucharea.cpp new file mode 100644 index 0000000..1cf4384 --- /dev/null +++ b/demo3/vertical/homescreen/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)); + } +} + + |