summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-07-28 04:48:12 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-07-28 04:48:12 (GMT)
commit00daed26e5cc52729d00b235addfe08b766a9c73 (patch)
tree05eecada35aa3f0d4021b47d71badc495e5e040f /src/declarative
parent70921d484ec1bd75d8d86f127ebbb91b1138eb06 (diff)
parent4da7fd6e3b2b9af85401067612098f02182edc4d (diff)
downloadQt-00daed26e5cc52729d00b235addfe08b766a9c73.zip
Qt-00daed26e5cc52729d00b235addfe08b766a9c73.tar.gz
Qt-00daed26e5cc52729d00b235addfe08b766a9c73.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfxgridview.cpp17
-rw-r--r--src/declarative/fx/qfxgridview.h1
-rw-r--r--src/declarative/fx/qfxlistview.cpp12
-rw-r--r--src/declarative/fx/qfxlistview.h1
4 files changed, 2 insertions, 29 deletions
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index a91ddc6..6ffe603 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -154,7 +154,7 @@ public:
, cellWidth(100), cellHeight(100), columns(1), requestedIndex(-1)
, highlightComponent(0), highlight(0), trackedItem(0)
, moveReason(Other), buffer(0), highlightXAnimator(0), highlightYAnimator(0)
- , keyPressed(false), ownModel(false), wrap(false), autoHighlight(true)
+ , ownModel(false), wrap(false), autoHighlight(true)
, fixCurrentVisibility(false) {}
void init();
@@ -316,7 +316,6 @@ public:
QmlFollow *highlightXAnimator;
QmlFollow *highlightYAnimator;
- int keyPressed : 1;
int ownModel : 1;
int wrap : 1;
int autoHighlight : 1;
@@ -1093,7 +1092,6 @@ void QFxGridView::keyPressEvent(QKeyEvent *event)
if ((d->flow == QFxGridView::LeftToRight && event->key() == Qt::Key_Up)
|| (d->flow == QFxGridView::TopToBottom && event->key() == Qt::Key_Left)) {
if (currentIndex() >= d->columns || d->wrap) {
- d->keyPressed = true;
d->moveReason = QFxGridViewPrivate::Key;
int index = currentIndex() - d->columns;
setCurrentIndex(index >= 0 ? index : d->model->count()-1);
@@ -1103,7 +1101,6 @@ void QFxGridView::keyPressEvent(QKeyEvent *event)
} else if ((d->flow == QFxGridView::LeftToRight && event->key() == Qt::Key_Down)
|| (d->flow == QFxGridView::TopToBottom && event->key() == Qt::Key_Right)) {
if (currentIndex() < d->model->count() - d->columns || d->wrap) {
- d->keyPressed = true;
d->moveReason = QFxGridViewPrivate::Key;
int index = currentIndex()+d->columns;
setCurrentIndex(index < d->model->count() ? index : 0);
@@ -1113,7 +1110,6 @@ void QFxGridView::keyPressEvent(QKeyEvent *event)
} else if ((d->flow == QFxGridView::LeftToRight && event->key() == Qt::Key_Left)
|| (d->flow == QFxGridView::TopToBottom && event->key() == Qt::Key_Up)) {
if (currentIndex() > 0 || d->wrap) {
- d->keyPressed = true;
d->moveReason = QFxGridViewPrivate::Key;
int index = currentIndex() - 1;
setCurrentIndex(index >= 0 ? index : d->model->count()-1);
@@ -1123,7 +1119,6 @@ void QFxGridView::keyPressEvent(QKeyEvent *event)
} else if ((d->flow == QFxGridView::LeftToRight && event->key() == Qt::Key_Right)
|| (d->flow == QFxGridView::TopToBottom && event->key() == Qt::Key_Down)) {
if (currentIndex() < d->model->count() - 1 || d->wrap) {
- d->keyPressed = true;
d->moveReason = QFxGridViewPrivate::Key;
int index = currentIndex() + 1;
setCurrentIndex(index < d->model->count() ? index : 0);
@@ -1139,16 +1134,6 @@ void QFxGridView::keyPressEvent(QKeyEvent *event)
/*!
\reimp
*/
-void QFxGridView::keyReleaseEvent(QKeyEvent *event)
-{
- Q_D(QFxGridView);
- d->keyPressed = false;
- QFxFlickable::keyReleaseEvent(event);
-}
-
-/*!
- \reimp
-*/
void QFxGridView::componentComplete()
{
Q_D(QFxGridView);
diff --git a/src/declarative/fx/qfxgridview.h b/src/declarative/fx/qfxgridview.h
index 8f443e1..3708f19 100644
--- a/src/declarative/fx/qfxgridview.h
+++ b/src/declarative/fx/qfxgridview.h
@@ -123,7 +123,6 @@ protected:
virtual qreal minXExtent() const;
virtual qreal maxXExtent() const;
virtual void keyPressEvent(QKeyEvent *);
- virtual void keyReleaseEvent(QKeyEvent *);
virtual void componentComplete();
private Q_SLOTS:
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index f300d1e..e563ecb 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -175,7 +175,7 @@ public:
, averageSize(100), currentIndex(-1), requestedIndex(-1)
, currItemMode(QFxListView::Free), snapPos(0), highlightComponent(0), highlight(0), trackedItem(0)
, moveReason(Other), buffer(0), highlightPosAnimator(0), highlightSizeAnimator(0)
- , keyPressed(false), ownModel(false), wrap(false), autoHighlight(true)
+ , ownModel(false), wrap(false), autoHighlight(true)
, fixCurrentVisibility(false) {}
void init();
@@ -371,7 +371,6 @@ public:
QString sectionExpression;
QString currentSection;
- int keyPressed : 1;
int ownModel : 1;
int wrap : 1;
int autoHighlight : 1;
@@ -1320,7 +1319,6 @@ void QFxListView::keyPressEvent(QKeyEvent *event)
if ((d->orient == Qt::Horizontal && event->key() == Qt::Key_Left)
|| (d->orient == Qt::Vertical && event->key() == Qt::Key_Up)) {
if (currentIndex() > 0 || d->wrap) {
- d->keyPressed = true;
d->moveReason = QFxListViewPrivate::Key;
int index = currentIndex()-1;
d->updateCurrent(index >= 0 ? index : d->model->count()-1);
@@ -1330,7 +1328,6 @@ void QFxListView::keyPressEvent(QKeyEvent *event)
} else if ((d->orient == Qt::Horizontal && event->key() == Qt::Key_Right)
|| (d->orient == Qt::Vertical && event->key() == Qt::Key_Down)) {
if (currentIndex() < d->model->count() - 1 || d->wrap) {
- d->keyPressed = true;
d->moveReason = QFxListViewPrivate::Key;
int index = currentIndex()+1;
d->updateCurrent(index < d->model->count() ? index : 0);
@@ -1343,13 +1340,6 @@ void QFxListView::keyPressEvent(QKeyEvent *event)
QFxFlickable::keyPressEvent(event);
}
-void QFxListView::keyReleaseEvent(QKeyEvent *event)
-{
- Q_D(QFxListView);
- d->keyPressed = false;
- QFxFlickable::keyReleaseEvent(event);
-}
-
void QFxListView::componentComplete()
{
Q_D(QFxListView);
diff --git a/src/declarative/fx/qfxlistview.h b/src/declarative/fx/qfxlistview.h
index 2a70af0..cd27050 100644
--- a/src/declarative/fx/qfxlistview.h
+++ b/src/declarative/fx/qfxlistview.h
@@ -131,7 +131,6 @@ protected:
virtual qreal minXExtent() const;
virtual qreal maxXExtent() const;
virtual void keyPressEvent(QKeyEvent *);
- virtual void keyReleaseEvent(QKeyEvent *);
virtual void componentComplete();
private Q_SLOTS: