aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/toucharea.cpp
diff options
context:
space:
mode:
authortiansen <tian_sen@dl.cn.nexty-ele.com>2018-11-02 20:40:38 +0800
committertiansen <tian_sen@dl.cn.nexty-ele.com>2018-11-02 20:40:38 +0800
commit26e3a508eb0bec7a59dbcef0251233df42781963 (patch)
tree2649f1ec185c5173cbbb5e07275649d1dbbe0100 /homescreen/src/toucharea.cpp
parent33d31b5bac3c8c9105d43d6566174f39ef7a4ea4 (diff)
Diffstat (limited to 'homescreen/src/toucharea.cpp')
-rw-r--r--homescreen/src/toucharea.cpp36
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));
+ }
+}
+
+