2
* This file is part of unity-2d
4
* Copyright 2012 Canonical Ltd.
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#include "cursorshapearea.h"
21
CursorShapeArea::CursorShapeArea(QDeclarativeItem *parent)
22
: QDeclarativeItem(parent)
23
, m_currentShape(Qt::ArrowCursor)
27
Qt::CursorShape CursorShapeArea::cursorShape() const
29
return cursor().shape();
32
void CursorShapeArea::setCursorShape(Qt::CursorShape cursorShape)
34
if (m_currentShape == cursorShape)
37
setCursor(cursorShape);
38
Q_EMIT cursorShapeChanged();
40
m_currentShape = cursorShape;
43
#include "cursorshapearea.moc"