aboutsummaryrefslogtreecommitdiffstats
path: root/src/extras
diff options
context:
space:
mode:
Diffstat (limited to 'src/extras')
-rw-r--r--src/extras/extras.pri4
-rw-r--r--src/extras/qquickdrawer.cpp (renamed from src/extras/qquickabstractdrawer.cpp)100
-rw-r--r--src/extras/qquickdrawer_p.h (renamed from src/extras/qquickabstractdrawer_p.h)16
3 files changed, 60 insertions, 60 deletions
diff --git a/src/extras/extras.pri b/src/extras/extras.pri
index 6d82cdd0..c8cfeba4 100644
--- a/src/extras/extras.pri
+++ b/src/extras/extras.pri
@@ -1,7 +1,7 @@
INCLUDEPATH += $$PWD
HEADERS += \
- $$PWD/qquickabstractdrawer_p.h
+ $$PWD/qquickdrawer_p.h
SOURCES += \
- $$PWD/qquickabstractdrawer.cpp
+ $$PWD/qquickdrawer.cpp
diff --git a/src/extras/qquickabstractdrawer.cpp b/src/extras/qquickdrawer.cpp
index d25a7f0d..7c61688a 100644
--- a/src/extras/qquickabstractdrawer.cpp
+++ b/src/extras/qquickdrawer.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "qquickabstractdrawer_p.h"
+#include "qquickdrawer_p.h"
#include <QtGui/qstylehints.h>
#include <QtGui/private/qguiapplication_p.h>
@@ -44,12 +44,12 @@
QT_BEGIN_NAMESPACE
-class QQuickAbstractDrawerPrivate : public QQuickControlPrivate
+class QQuickDrawerPrivate : public QQuickControlPrivate
{
- Q_DECLARE_PUBLIC(QQuickAbstractDrawer)
+ Q_DECLARE_PUBLIC(QQuickDrawer)
public:
- QQuickAbstractDrawerPrivate() : edge(Qt::LeftEdge), offset(0), position(0),
+ QQuickDrawerPrivate() : edge(Qt::LeftEdge), offset(0), position(0),
content(Q_NULLPTR), animation(Q_NULLPTR) { }
void updateContent();
@@ -65,9 +65,9 @@ public:
QQuickPropertyAnimation *animation;
};
-void QQuickAbstractDrawerPrivate::updateContent()
+void QQuickDrawerPrivate::updateContent()
{
- Q_Q(QQuickAbstractDrawer);
+ Q_Q(QQuickDrawer);
if (!content)
return;
@@ -87,9 +87,9 @@ void QQuickAbstractDrawerPrivate::updateContent()
}
}
-bool QQuickAbstractDrawerPrivate::handleMousePressEvent(QQuickItem *item, QMouseEvent *event)
+bool QQuickDrawerPrivate::handleMousePressEvent(QQuickItem *item, QMouseEvent *event)
{
- Q_Q(QQuickAbstractDrawer);
+ Q_Q(QQuickDrawer);
pressPoint = q->mapFromItem(item, event->pos());
if (qFuzzyIsNull(position)) {
@@ -117,9 +117,9 @@ bool QQuickAbstractDrawerPrivate::handleMousePressEvent(QQuickItem *item, QMouse
return item == q;
}
-bool QQuickAbstractDrawerPrivate::handleMouseMoveEvent(QQuickItem *item, QMouseEvent *event)
+bool QQuickDrawerPrivate::handleMouseMoveEvent(QQuickItem *item, QMouseEvent *event)
{
- Q_Q(QQuickAbstractDrawer);
+ Q_Q(QQuickDrawer);
QPointF movePoint = q->mapFromItem(item, event->pos());
if (!q->keepMouseGrab()) {
@@ -145,9 +145,9 @@ bool QQuickAbstractDrawerPrivate::handleMouseMoveEvent(QQuickItem *item, QMouseE
return q->keepMouseGrab();
}
-bool QQuickAbstractDrawerPrivate::handleMouseReleaseEvent(QQuickItem *item, QMouseEvent *event)
+bool QQuickDrawerPrivate::handleMouseReleaseEvent(QQuickItem *item, QMouseEvent *event)
{
- Q_Q(QQuickAbstractDrawer);
+ Q_Q(QQuickDrawer);
bool wasGrabbed = q->keepMouseGrab();
if (wasGrabbed) {
// int startDragVelocity = QGuiApplication::styleHints()->startDragVelocity();
@@ -198,23 +198,23 @@ bool QQuickAbstractDrawerPrivate::handleMouseReleaseEvent(QQuickItem *item, QMou
return wasGrabbed;
}
-QQuickAbstractDrawer::QQuickAbstractDrawer(QQuickItem *parent) :
- QQuickControl(*(new QQuickAbstractDrawerPrivate), parent)
+QQuickDrawer::QQuickDrawer(QQuickItem *parent) :
+ QQuickControl(*(new QQuickDrawerPrivate), parent)
{
setZ(1);
setFiltersChildMouseEvents(true);
setAcceptedMouseButtons(Qt::LeftButton);
}
-Qt::Edge QQuickAbstractDrawer::edge() const
+Qt::Edge QQuickDrawer::edge() const
{
- Q_D(const QQuickAbstractDrawer);
+ Q_D(const QQuickDrawer);
return d->edge;
}
-void QQuickAbstractDrawer::setEdge(Qt::Edge edge)
+void QQuickDrawer::setEdge(Qt::Edge edge)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
if (d->edge != edge) {
d->edge = edge;
if (isComponentComplete())
@@ -223,15 +223,15 @@ void QQuickAbstractDrawer::setEdge(Qt::Edge edge)
}
}
-qreal QQuickAbstractDrawer::position() const
+qreal QQuickDrawer::position() const
{
- Q_D(const QQuickAbstractDrawer);
+ Q_D(const QQuickDrawer);
return d->position;
}
-void QQuickAbstractDrawer::setPosition(qreal position)
+void QQuickDrawer::setPosition(qreal position)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
position = qBound(0.0, position, 1.0);
if (!qFuzzyCompare(d->position, position)) {
d->position = position;
@@ -241,15 +241,15 @@ void QQuickAbstractDrawer::setPosition(qreal position)
}
}
-QQuickItem *QQuickAbstractDrawer::contentItem() const
+QQuickItem *QQuickDrawer::contentItem() const
{
- Q_D(const QQuickAbstractDrawer);
+ Q_D(const QQuickDrawer);
return d->content;
}
-void QQuickAbstractDrawer::setContentItem(QQuickItem *item)
+void QQuickDrawer::setContentItem(QQuickItem *item)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
if (d->content != item) {
delete d->content;
d->content = item;
@@ -261,15 +261,15 @@ void QQuickAbstractDrawer::setContentItem(QQuickItem *item)
}
}
-QQuickPropertyAnimation *QQuickAbstractDrawer::animation() const
+QQuickPropertyAnimation *QQuickDrawer::animation() const
{
- Q_D(const QQuickAbstractDrawer);
+ Q_D(const QQuickDrawer);
return d->animation;
}
-void QQuickAbstractDrawer::setAnimation(QQuickPropertyAnimation *animation)
+void QQuickDrawer::setAnimation(QQuickPropertyAnimation *animation)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
if (d->animation != animation) {
delete d->animation;
d->animation = animation;
@@ -281,9 +281,9 @@ void QQuickAbstractDrawer::setAnimation(QQuickPropertyAnimation *animation)
}
}
-void QQuickAbstractDrawer::open()
+void QQuickDrawer::open()
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
if (d->animation) {
d->animation->stop();
d->animation->setFrom(d->position);
@@ -294,9 +294,9 @@ void QQuickAbstractDrawer::open()
}
}
-void QQuickAbstractDrawer::close()
+void QQuickDrawer::close()
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
if (d->animation) {
d->animation->stop();
d->animation->setFrom(d->position);
@@ -307,9 +307,9 @@ void QQuickAbstractDrawer::close()
}
}
-bool QQuickAbstractDrawer::childMouseEventFilter(QQuickItem *child, QEvent *event)
+bool QQuickDrawer::childMouseEventFilter(QQuickItem *child, QEvent *event)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
switch (event->type()) {
case QEvent::MouseButtonPress:
return d->handleMousePressEvent(child, static_cast<QMouseEvent *>(event));
@@ -322,52 +322,52 @@ bool QQuickAbstractDrawer::childMouseEventFilter(QQuickItem *child, QEvent *even
}
}
-void QQuickAbstractDrawer::mousePressEvent(QMouseEvent *event)
+void QQuickDrawer::mousePressEvent(QMouseEvent *event)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
QQuickControl::mousePressEvent(event);
d->handleMousePressEvent(this, event);
}
-void QQuickAbstractDrawer::mouseMoveEvent(QMouseEvent *event)
+void QQuickDrawer::mouseMoveEvent(QMouseEvent *event)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
QQuickControl::mouseMoveEvent(event);
d->handleMouseMoveEvent(this, event);
}
-void QQuickAbstractDrawer::mouseReleaseEvent(QMouseEvent *event)
+void QQuickDrawer::mouseReleaseEvent(QMouseEvent *event)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
QQuickControl::mouseReleaseEvent(event);
d->handleMouseReleaseEvent(this, event);
}
-void QQuickAbstractDrawer::mouseUngrabEvent()
+void QQuickDrawer::mouseUngrabEvent()
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
QQuickControl::mouseUngrabEvent();
d->pressPoint = QPoint();
}
-void QQuickAbstractDrawer::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+void QQuickDrawer::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
QQuickControl::geometryChanged(newGeometry, oldGeometry);
if (isComponentComplete())
d->updateContent();
}
-void QQuickAbstractDrawer::componentComplete()
+void QQuickDrawer::componentComplete()
{
- Q_D(QQuickAbstractDrawer);
+ Q_D(QQuickDrawer);
QQuickControl::componentComplete();
d->updateContent();
}
-qreal QQuickAbstractDrawer::positionAt(const QPointF &point) const
+qreal QQuickDrawer::positionAt(const QPointF &point) const
{
- Q_D(const QQuickAbstractDrawer);
+ Q_D(const QQuickDrawer);
if (!d->content)
return 0.0;
diff --git a/src/extras/qquickabstractdrawer_p.h b/src/extras/qquickdrawer_p.h
index a2f91518..1c42b290 100644
--- a/src/extras/qquickabstractdrawer_p.h
+++ b/src/extras/qquickdrawer_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKABSTRACTDRAWER_P_H
-#define QQUICKABSTRACTDRAWER_P_H
+#ifndef QQUICKDRAWER_P_H
+#define QQUICKDRAWER_P_H
//
// W A R N I N G
@@ -54,9 +54,9 @@
QT_BEGIN_NAMESPACE
class QQuickPropertyAnimation;
-class QQuickAbstractDrawerPrivate;
+class QQuickDrawerPrivate;
-class Q_QUICKEXTRAS_EXPORT QQuickAbstractDrawer : public QQuickControl
+class Q_QUICKEXTRAS_EXPORT QQuickDrawer : public QQuickControl
{
Q_OBJECT
Q_PROPERTY(Qt::Edge edge READ edge WRITE setEdge NOTIFY edgeChanged FINAL)
@@ -67,7 +67,7 @@ class Q_QUICKEXTRAS_EXPORT QQuickAbstractDrawer : public QQuickControl
Q_CLASSINFO("DefaultProperty", "contentItem")
public:
- explicit QQuickAbstractDrawer(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickDrawer(QQuickItem *parent = Q_NULLPTR);
Qt::Edge edge() const;
void setEdge(Qt::Edge edge);
@@ -104,10 +104,10 @@ protected:
virtual qreal positionAt(const QPointF &point) const;
private:
- Q_DISABLE_COPY(QQuickAbstractDrawer)
- Q_DECLARE_PRIVATE(QQuickAbstractDrawer)
+ Q_DISABLE_COPY(QQuickDrawer)
+ Q_DECLARE_PRIVATE(QQuickDrawer)
};
QT_END_NAMESPACE
-#endif // QQUICKABSTRACTDRAWER_P_H
+#endif // QQUICKDRAWER_P_H