diff options
Diffstat (limited to 'demo3/horizontal/homescreen/homescreen/src/toucharea.cpp')
-rw-r--r-- | demo3/horizontal/homescreen/homescreen/src/toucharea.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/demo3/horizontal/homescreen/homescreen/src/toucharea.cpp b/demo3/horizontal/homescreen/homescreen/src/toucharea.cpp new file mode 100644 index 0000000..aad4b1b --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/src/toucharea.cpp @@ -0,0 +1,33 @@ +#include "toucharea.h" + +TouchArea::TouchArea() +{ +} + +TouchArea::~TouchArea() +{ + +} + +void TouchArea::setWindow(QQuickWindow *window) +{ + myWindow = window; +} + +void TouchArea::init() +{ + bitmapNormal = QPixmap(":/images/menubar_normal_background.png").createHeuristicMask(); + bitmapFullscreen = QPixmap(":/images/menubar_full_background.png").createHeuristicMask(); + myWindow->setMask(QRegion(bitmapNormal)); +} + +void TouchArea::switchArea(int areaType) +{ + if(areaType == NORMAL) { + myWindow->setMask(QRegion(bitmapNormal)); + } else if (areaType == FULLSCREEN) { + myWindow->setMask(QRegion(bitmapFullscreen)); + } +} + + |