summaryrefslogtreecommitdiffstats
path: root/demo3/horizontal/homescreen/homescreen/src/toucharea.cpp
blob: aad4b1bf2df8f274a8b610a5df39d3f458ab0b52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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));
    }
}