** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
#include "qquickitemview_p.h"
-#include <private/qdeclarativeguard_p.h>
+#include <private/qqmlguard_p.h>
QT_BEGIN_HEADER
Q_OBJECT
Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)
Q_PROPERTY(SectionCriteria criteria READ criteria WRITE setCriteria NOTIFY criteriaChanged)
- Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
+ Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_PROPERTY(int labelPositioning READ labelPositioning WRITE setLabelPositioning NOTIFY labelPositioningChanged)
Q_ENUMS(SectionCriteria)
Q_ENUMS(LabelPositioning)
SectionCriteria criteria() const { return m_criteria; }
void setCriteria(SectionCriteria);
- QDeclarativeComponent *delegate() const { return m_delegate; }
- void setDelegate(QDeclarativeComponent *delegate);
+ QQmlComponent *delegate() const { return m_delegate; }
+ void setDelegate(QQmlComponent *delegate);
QString sectionString(const QString &value);
void setLabelPositioning(int pos);
Q_SIGNALS:
+ void sectionsChanged();
void propertyChanged();
void criteriaChanged();
void delegateChanged();
private:
QString m_property;
SectionCriteria m_criteria;
- QDeclarativeComponent *m_delegate;
+ QQmlComponent *m_delegate;
int m_labelPositioning;
QQuickListViewPrivate *m_view;
};
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickListView)
- // XXX deprecate these two properties (only duration should be necessary)
- Q_PROPERTY(qreal highlightMoveSpeed READ highlightMoveSpeed WRITE setHighlightMoveSpeed NOTIFY highlightMoveSpeedChanged)
- Q_PROPERTY(qreal highlightResizeSpeed READ highlightResizeSpeed WRITE setHighlightResizeSpeed NOTIFY highlightResizeSpeedChanged)
-
+ Q_PROPERTY(qreal highlightMoveVelocity READ highlightMoveVelocity WRITE setHighlightMoveVelocity NOTIFY highlightMoveVelocityChanged)
+ Q_PROPERTY(qreal highlightResizeVelocity READ highlightResizeVelocity WRITE setHighlightResizeVelocity NOTIFY highlightResizeVelocityChanged)
Q_PROPERTY(int highlightResizeDuration READ highlightResizeDuration WRITE setHighlightResizeDuration NOTIFY highlightResizeDurationChanged)
Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged)
virtual void setHighlightFollowsCurrentItem(bool);
- qreal highlightMoveSpeed() const;
- void setHighlightMoveSpeed(qreal);
+ qreal highlightMoveVelocity() const;
+ void setHighlightMoveVelocity(qreal);
- qreal highlightResizeSpeed() const;
- void setHighlightResizeSpeed(qreal);
+ qreal highlightResizeVelocity() const;
+ void setHighlightResizeVelocity(qreal);
int highlightResizeDuration() const;
void setHighlightResizeDuration(int);
void spacingChanged();
void orientationChanged();
void currentSectionChanged();
- void highlightMoveSpeedChanged();
- void highlightResizeSpeedChanged();
+ void highlightMoveVelocityChanged();
+ void highlightResizeVelocityChanged();
void highlightResizeDurationChanged();
void snapModeChanged();
protected:
- virtual void viewportMoved();
+ virtual void viewportMoved(Qt::Orientations orient);
virtual void keyPressEvent(QKeyEvent *);
virtual void geometryChanged(const QRectF &newGeometry,const QRectF &oldGeometry);
-
-protected Q_SLOTS:
- void updateSections();
+ virtual void initItem(int index, QQuickItem *item);
};
class QQuickListViewAttached : public QQuickItemViewAttached
void viewChanged();
public:
- QDeclarativeGuard<QQuickListView> m_view;
+ QQmlGuard<QQuickListView> m_view;
QQuickItem *m_sectionItem;
};