summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriano Rezende <adriano.1.rezende@nokia.com>2012-07-05 15:40:19 +0200
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2012-07-05 16:46:04 +0200
commit3223758463acf2917b695f9a878936dbc1fd4151 (patch)
tree99923a6d502c5dcc18e70438c715a8492e7407e5
parentb5626681d8cd0e48e53b2699de69887ef3e8cfcf (diff)
downloadqtquickcontrols-3223758463acf2917b695f9a878936dbc1fd4151.tar.gz
Remove deprecated CursorArea
All components now use the new MouseArea API. Change-Id: Id6380a71c1c3d0489b8a31ba1e95ca6fafd2b7bf Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
-rw-r--r--components/TableView.qml5
-rw-r--r--src/qcursorarea.cpp88
-rw-r--r--src/qcursorarea.h76
-rw-r--r--src/qstyleplugin.cpp4
-rw-r--r--src/src.pro2
5 files changed, 2 insertions, 173 deletions
diff --git a/components/TableView.qml b/components/TableView.qml
index 22abc184..8df6fe9b 100644
--- a/components/TableView.qml
+++ b/components/TableView.qml
@@ -581,10 +581,7 @@ FocusScope{
header[index].width = minWidth
}
onPressedChanged: if(pressed)offset=mouseX
- CursorArea {
- anchors.fill: parent
- cursor: CursorArea.SplitHCursor
- }
+ cursorShape: Qt.SplitHCursor
}
}
}
diff --git a/src/qcursorarea.cpp b/src/qcursorarea.cpp
deleted file mode 100644
index 2d0281b0..00000000
--- a/src/qcursorarea.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qcursorarea.h"
-
-QCursorArea::QCursorArea(QQuickItem *parent)
- : QQuickItem(parent),
- m_cursor(ArrowCursor)
-{
-
-}
-
-void QCursorArea::setCursor(Cursor cursor)
-{
- if (m_cursor == cursor)
- return;
-
-#if 0
- switch (cursor) {
- case ArrowCursor:
- QQuickItem::setCursor(Qt::ArrowCursor);
- break;
- case SizeHorCursor:
- QQuickItem::setCursor(Qt::SizeHorCursor);
- break;
- case SizeVerCursor:
- QQuickItem::setCursor(Qt::SizeVerCursor);
- break;
- case SizeAllCursor:
- QQuickItem::setCursor(Qt::SizeAllCursor);
- break;
- case SplitHCursor:
- QQuickItem::setCursor(Qt::SplitHCursor);
- break;
- case SplitVCursor:
- QQuickItem::setCursor(Qt::SplitVCursor);
- break;
- case WaitCursor:
- QQuickItem::setCursor(Qt::WaitCursor);
- break;
- case PointingHandCursor:
- QQuickItem::setCursor(Qt::PointingHandCursor);
- break;
- default:
- return;
- }
-#endif
-
- m_cursor = cursor;
- emit cursorChanged();
-}
diff --git a/src/qcursorarea.h b/src/qcursorarea.h
deleted file mode 100644
index b6fdaa17..00000000
--- a/src/qcursorarea.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CURSORAREA_H
-#define CURSORAREA_H
-
-#include <QQuickItem>
-
-class QCursorArea : public QQuickItem
-{
- Q_OBJECT
- Q_ENUMS(Cursor)
- Q_PROPERTY(Cursor cursor READ cursor WRITE setCursor NOTIFY cursorChanged)
-
-public:
- enum Cursor {
- ArrowCursor,
- SizeHorCursor,
- SizeVerCursor,
- SizeAllCursor,
- SplitHCursor,
- SplitVCursor,
- WaitCursor,
- PointingHandCursor
- };
-
- explicit QCursorArea(QQuickItem *parent = 0);
-
- void setCursor(Cursor cursor);
- Cursor cursor() const { return m_cursor; }
-
-signals:
- void cursorChanged();
-
-private:
- Cursor m_cursor;
-};
-
-#endif // CURSORAREA_H
diff --git a/src/qstyleplugin.cpp b/src/qstyleplugin.cpp
index 4cf7a825..4f02832a 100644
--- a/src/qstyleplugin.cpp
+++ b/src/qstyleplugin.cpp
@@ -37,7 +37,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
+
#include <qqml.h>
#include "qstyleplugin.h"
#include "qstyleitem.h"
@@ -48,7 +48,6 @@
#include "qwindowitem.h"
#include "qdesktopitem.h"
#include "qwheelarea.h"
-#include "qcursorarea.h"
#include "qtsplitterbase.h"
#include "qquicklinearlayout.h"
#include "qquickcomponentsprivate.h"
@@ -92,7 +91,6 @@ void StylePlugin::registerTypes(const char *uri)
0, 2, registerPrivateModule);
qmlRegisterType<QStyleItem>(uri, 0, 2, "StyleItem");
- qmlRegisterType<QCursorArea>(uri, 0, 2, "CursorArea");
qmlRegisterType<QRangeModel>(uri, 0, 2, "RangeModel");
qmlRegisterType<QWheelArea>(uri, 0, 2, "WheelArea");
diff --git a/src/src.pro b/src/src.pro
index 54fe2cc3..14263840 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -21,7 +21,6 @@ HEADERS += qtmenu.h \
qwindowitem.h \
qdesktopitem.h \
qtoplevelwindow.h \
- qcursorarea.h \
qquicklayoutengine_p.h \
qquicklayout.h \
qquicklinearlayout.h \
@@ -38,7 +37,6 @@ SOURCES += qtmenu.cpp \
qwindowitem.cpp \
qdesktopitem.cpp \
qtoplevelwindow.cpp \
- qcursorarea.cpp \
qquicklayout.cpp \
qquicklayoutengine.cpp \
qquicklinearlayout.cpp \