X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=homescreen%2Fsrc%2Ftoucharea.cpp;fp=homescreen%2Fsrc%2Ftoucharea.cpp;h=1cf43848c2f36ff1f1b13f7f128cba279732dce7;hb=b3476f1c2debc23411a66b1498065ab575879e22;hp=0000000000000000000000000000000000000000;hpb=6a712584e9b66fe48494c5d20690a072320baf14;p=apps%2Fhomescreen.git 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)); + } +} + +