Revision: 6351
Author: nogu.dev
Date: Wed Apr 28 18:24:41 2010
Log: * qt4/immodule/candidatewindow.cpp
- (CandidateWindow::layoutWindow): Change parameters.
- (CandidateWindow::eventFilter):
Follow change of CandidateWindow::layoutWindow().
* qt4/immodule/candidatewindow.h
- Change parameters of CandidateWindow::layoutWindow().
* qt4/immodule/quiminputcontext.cpp
- (QUimInputContext::setMicroFocus): Remove.
QInputContext::setMicroFocus() no longer exists in Qt4.
- (QUimInputContext::update):
Call CandidateWindow::layoutWindow() directly.
* qt4/immodule/quiminputcontext.h
- (QUimInputContext::setMicroFocus): Remove.
http://code.google.com/p/uim/source/detail?r=6351
Modified:
/trunk/qt4/immodule/candidatewindow.cpp
/trunk/qt4/immodule/candidatewindow.h
/trunk/qt4/immodule/quiminputcontext.cpp
/trunk/qt4/immodule/quiminputcontext.h
=======================================
--- /trunk/qt4/immodule/candidatewindow.cpp Wed Apr 28 18:24:31 2010
+++ /trunk/qt4/immodule/candidatewindow.cpp Wed Apr 28 18:24:41 2010
@@ -419,9 +419,11 @@
uim_set_candidate_index( ic->uimContext(), candidateIndex );
}
-void CandidateWindow::layoutWindow( int x, int y, int w, int h )
-{
- Q_UNUSED( w )
+void CandidateWindow::layoutWindow( const QPoint &point, const QRect &rect
)
+{
+ const int x = point.x();
+ const int y = point.y();
+ const int h = rect.height();
int destX = x;
int destY = y + h;
@@ -607,7 +609,7 @@
QRect rect
= widget->inputMethodQuery( Qt::ImMicroFocus
).toRect();
QPoint p = widget->mapToGlobal( rect.topLeft() );
- layoutWindow( p.x(), p.y(), rect.width(), rect.height() );
+ layoutWindow( p, rect );
} else {
move( pos() + moveEvent->pos() - moveEvent->oldPos() );
}
=======================================
--- /trunk/qt4/immodule/candidatewindow.h Wed Apr 28 15:51:18 2010
+++ /trunk/qt4/immodule/candidatewindow.h Wed Apr 28 18:24:41 2010
@@ -61,7 +61,7 @@
void setAlwaysLeftPosition( bool left ) { isAlwaysLeft = left; }
bool isAlwaysLeftPosition() const { return isAlwaysLeft; }
- void layoutWindow( int x, int y, int w, int h );
+ void layoutWindow( const QPoint &point, const QRect &rect );
void setQUimInputContext( QUimInputContext* m_ic ) { ic = m_ic; }
=======================================
--- /trunk/qt4/immodule/quiminputcontext.cpp Fri Apr 9 19:44:57 2010
+++ /trunk/qt4/immodule/quiminputcontext.cpp Wed Apr 28 18:24:41 2010
@@ -433,15 +433,6 @@
= ( *it )->createUimContext( ( *it
)->m_imname.toAscii().data() );
}
}
-
-void QUimInputContext::setMicroFocus( int x, int y, int w, int h )
-{
-#ifdef ENABLE_DEBUG
- qDebug("IC setMicroFocus (%d, %d), (%d, %d)", x, y, w, h);
-#endif
-
- cwin->layoutWindow( x, y, w, h );
-}
void QUimInputContext::mouseHandler( int x, QMouseEvent *e )
{
@@ -490,7 +481,7 @@
if ( w ) {
QRect mf = w->inputMethodQuery( Qt::ImMicroFocus ).toRect();
QPoint p = w->mapToGlobal( mf.topLeft() );
- setMicroFocus( p.x(), p.y(), mf.width(), mf.height() );
+ cwin->layoutWindow( p, mf );
m_indicator->move( w->mapToGlobal( mf.bottomLeft() )
+ QPoint( 0, CaretStateIndicator::SPACING ) );
}
=======================================
--- /trunk/qt4/immodule/quiminputcontext.h Fri Apr 9 19:44:57 2010
+++ /trunk/qt4/immodule/quiminputcontext.h Wed Apr 28 18:24:41 2010
@@ -114,7 +114,6 @@
virtual void unsetFocus(); // not a QInputContext func
private:
- void setMicroFocus( int x, int y, int w, int h );
int getPreeditSelectionLength();
QList<QInputMethodEvent::Attribute> getPreeditAttrs();