[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kpresenter
From:       Kazuki Ohta <mover () hct ! zaq ! ne ! jp>
Date:       2004-12-30 15:43:17
Message-ID: 20041230154317.706F01BB76 () office ! kde ! org
[Download RAW message or body]

CVS commit by kzk: 

enhance InputMethod support of KPresenter.
Handle QIMEvent correctly.


  M +29 -0     kprcanvas.cc   1.451
  M +3 -0      kprcanvas.h   1.170
  M +15 -0     kptextobject.cc   1.461
  M +3 -1      kptextobject.h   1.160


--- koffice/kpresenter/kptextobject.h  #1.159:1.160
@@ -229,6 +229,8 @@ public:
     void keyPressEvent( QKeyEvent * );
     void keyReleaseEvent( QKeyEvent * );
+    void imStartEvent( QIMEvent * );
+    void imComposeEvent( QIMEvent * );
+    void imEndEvent( QIMEvent * );
     void mousePressEvent( QMouseEvent *, const QPoint &);
-
     void mouseMoveEvent( QMouseEvent *, const QPoint & );
     void mouseReleaseEvent( QMouseEvent *, const QPoint & );

--- koffice/kpresenter/kptextobject.cc  #1.460:1.461
@@ -2013,4 +2013,19 @@ void KPTextView::keyReleaseEvent( QKeyEv
 }
 
+void KPTextView::imStartEvent( QIMEvent *e )
+{
+    handleImStartEvent(e);
+}
+
+void KPTextView::imComposeEvent( QIMEvent *e )
+{
+    handleImComposeEvent(e);
+}
+
+void KPTextView::imEndEvent( QIMEvent *e )
+{
+    handleImEndEvent(e);
+}
+
 void KPTextView::clearSelection()
 {

--- koffice/kpresenter/kprcanvas.h  #1.169:1.170
@@ -539,4 +539,7 @@ protected:
     virtual void keyPressEvent( QKeyEvent *e );
     virtual void keyReleaseEvent( QKeyEvent *e );
+    virtual void imStartEvent( QIMEvent * e );
+    virtual void imComposeEvent( QIMEvent * e );
+    virtual void imEndEvent( QIMEvent * e );
 
     void eraseEmptySpace( QPainter * painter, const QRegion & emptySpaceRegion, \
const QBrush & brush ) const;

--- koffice/kpresenter/kprcanvas.cc  #1.450:1.451
@@ -2364,4 +2364,33 @@ void KPrCanvas::keyReleaseEvent( QKeyEve
 }
 
+void KPrCanvas::imStartEvent( QIMEvent * e )
+{
+    if ( editNum && m_currentTextObjectView )
+    {
+        if ( !m_currentTextObjectView->kpTextObject()->isProtectContent() )
+            m_currentTextObjectView->imStartEvent( e );
+        else
+            KMessageBox::information(this, i18n("Read-only content cannot be \
changed. No modifications will be accepted.")); +    }
+}
+
+void KPrCanvas::imComposeEvent( QIMEvent * e )
+{
+    if ( editNum && m_currentTextObjectView )
+    {
+        if ( !m_currentTextObjectView->kpTextObject()->isProtectContent() )
+            m_currentTextObjectView->imComposeEvent( e );
+    }
+}
+
+void KPrCanvas::imEndEvent( QIMEvent * e )
+{
+    if ( editNum && m_currentTextObjectView )
+    {
+        if ( !m_currentTextObjectView->kpTextObject()->isProtectContent() )
+            m_currentTextObjectView->imEndEvent( e );
+    }
+}
+
 void KPrCanvas::resizeEvent( QResizeEvent *e )
 {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic