aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/toucharea.cpp
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-05-28 14:00:55 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-05-28 14:00:55 +0800
commit7d29d877baafe52cc0e0bbdf7d86deff61073651 (patch)
treeb3d106a241e5c3b5be6b7f1fbe596ac3024ae0ad /homescreen/src/toucharea.cpp
parent33c89065c315edd838873116bec8723326f43488 (diff)
registerShortcut
Change-Id: I66dbf6f12a890e67908594ed238556f5456b7ed7
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));
+ }
+}
+
+