|
@@ -55,7 +55,6 @@ FreeVirtualKeyboardInputContext::FreeVirtualKeyboardInputContext() :
|
|
qmlRegisterSingletonType<DeclarativeInputEngine>("FreeVirtualKeyboard", 1, 0,
|
|
qmlRegisterSingletonType<DeclarativeInputEngine>("FreeVirtualKeyboard", 1, 0,
|
|
"InputEngine", inputEngineProvider);
|
|
"InputEngine", inputEngineProvider);
|
|
connect(d->InputEngine, SIGNAL(animatingChanged()), this, SLOT(ensureFocusedObjectVisible()));
|
|
connect(d->InputEngine, SIGNAL(animatingChanged()), this, SLOT(ensureFocusedObjectVisible()));
|
|
- connect(d->InputEngine, SIGNAL(reset()), this, SLOT(resetInputEngine()));
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -190,14 +189,6 @@ void FreeVirtualKeyboardInputContext::setFocusObject(QObject *object)
|
|
ensureFocusedObjectVisible();
|
|
ensureFocusedObjectVisible();
|
|
}
|
|
}
|
|
|
|
|
|
-//==============================================================================
|
|
|
|
-void resetInputEngine(){
|
|
|
|
-
|
|
|
|
- qDebug() << "RESET INPUT ENGINE !!!!!";
|
|
|
|
- return;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
//==============================================================================
|
|
//==============================================================================
|
|
void FreeVirtualKeyboardInputContext::ensureFocusedObjectVisible()
|
|
void FreeVirtualKeyboardInputContext::ensureFocusedObjectVisible()
|
|
{
|
|
{
|
|
@@ -226,7 +217,6 @@ void FreeVirtualKeyboardInputContext::ensureFocusedObjectVisible()
|
|
|
|
|
|
qDebug() << "FreeVirtualKeyboardInputContext::ensureFocusedObjectVisible";
|
|
qDebug() << "FreeVirtualKeyboardInputContext::ensureFocusedObjectVisible";
|
|
|
|
|
|
-
|
|
|
|
QRectF FocusItemRect(0, 0, d->FocusItem->width(), d->FocusItem->height());
|
|
QRectF FocusItemRect(0, 0, d->FocusItem->width(), d->FocusItem->height());
|
|
FocusItemRect = d->Flickable->mapRectFromItem(d->FocusItem, FocusItemRect);
|
|
FocusItemRect = d->Flickable->mapRectFromItem(d->FocusItem, FocusItemRect);
|
|
qDebug() << "FocusItemRect: " << FocusItemRect;
|
|
qDebug() << "FocusItemRect: " << FocusItemRect;
|
|
@@ -238,17 +228,20 @@ void FreeVirtualKeyboardInputContext::ensureFocusedObjectVisible()
|
|
if (FocusItemRect.bottom() >= d->Flickable->height())
|
|
if (FocusItemRect.bottom() >= d->Flickable->height())
|
|
{
|
|
{
|
|
qDebug() << "Item outside!!! FocusItemRect.bottom() >= d->Flickable->height()";
|
|
qDebug() << "Item outside!!! FocusItemRect.bottom() >= d->Flickable->height()";
|
|
- ContentY = d->Flickable->contentY() + (FocusItemRect.bottom() - d->Flickable->height()) + 20;
|
|
|
|
|
|
+ qDebug() << "ContentY " << d->Flickable->contentY() << "FocusItem Bottom : " << FocusItemRect.bottom()
|
|
|
|
+ << "Flickable Height " << d->Flickable->height();
|
|
|
|
+ ContentY = d->Flickable->contentY() + (FocusItemRect.bottom() - d->Flickable->height());
|
|
d->FlickableContentScrollAnimation->setEndValue(ContentY);
|
|
d->FlickableContentScrollAnimation->setEndValue(ContentY);
|
|
d->FlickableContentScrollAnimation->start();
|
|
d->FlickableContentScrollAnimation->start();
|
|
}
|
|
}
|
|
else if (FocusItemRect.top() < 0)
|
|
else if (FocusItemRect.top() < 0)
|
|
{
|
|
{
|
|
qDebug() << "Item outside!!! d->FocusItem->position().x < 0";
|
|
qDebug() << "Item outside!!! d->FocusItem->position().x < 0";
|
|
- ContentY = d->Flickable->contentY() + FocusItemRect.top() - 20;
|
|
|
|
|
|
+ ContentY = d->Flickable->contentY() + FocusItemRect.top();
|
|
d->FlickableContentScrollAnimation->setEndValue(ContentY);
|
|
d->FlickableContentScrollAnimation->setEndValue(ContentY);
|
|
d->FlickableContentScrollAnimation->start();
|
|
d->FlickableContentScrollAnimation->start();
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|