Ignore:
Timestamp:
Nov 16, 2005, 8:36:46 PM (20 years ago)
Author:
dmik
Message:

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel/qwidget.cpp

    r7 r8  
    6161#include "qinputcontext_p.h"
    6262#endif
     63#if defined(Q_WS_PM)
     64#include "qt_os2.h"
     65#endif
    6366#if defined(Q_WS_QWS)
    6467#include "qwsmanager_qws.h"
     
    513516  QWidget utility functions
    514517 *****************************************************************************/
    515 
    516518static QFont qt_naturalWidgetFont( QWidget* w ) {
    517519    QFont naturalfont = QApplication::font( w );
     
    32593261#if defined(Q_WS_WIN)
    32603262        && GetFocus() == winId()
     3263#elif defined(Q_WS_PM)
     3264//@@TODO (dmik): currently we don't use WinSetFocus(). what for? Qt seems
     3265//  to completely handle focus traversal itself.
     3266//      && WinQueryFocus( HWND_DESKTOP ) == winId()
    32613267#endif
    32623268        )
     
    32943300            SetFocus( winId() );
    32953301        else {
     3302#elif defined(Q_WS_PM)
     3303//@@TODO (dmik): currently we don't use WinSetFocus(). what for? Qt seems
     3304//  to completely handle focus traversal itself.
     3305//      if ( !topLevelWidget()->isPopup() )
     3306//          WinSetFocus( HWND_DESKTOP, winId() );
     3307//      else {
    32963308#endif
    32973309#if defined(QT_ACCESSIBILITY_SUPPORT)
    32983310            QAccessible::updateAccessibility( this, 0, QAccessible::Focus );
    32993311#endif
    3300 #if defined(Q_WS_WIN)
     3312#if defined(Q_WS_WIN) // || defined(Q_WS_PM)
    33013313        }
    33023314#endif
     
    33453357            SetFocus( 0 );
    33463358        else {
     3359#elif defined(Q_WS_PM)
     3360//@@TODO (dmik): currently we don't use WinSetFocus(). what for? Qt seems
     3361//  to completely handle focus traversal itself.
     3362//      if ( !isPopup() && WinQueryFocus( HWND_DESKTOP ) == winId() )
     3363//          WinSetFocus( HWND_DESKTOP, topLevelWidget()->winId() );
     3364//      else {
    33473365#endif
    33483366#if defined(QT_ACCESSIBILITY_SUPPORT)
    33493367            QAccessible::updateAccessibility( this, 0, QAccessible::Focus );
    33503368#endif
    3351 #if defined(Q_WS_WIN)
     3369#if defined(Q_WS_WIN) // || defined(Q_WS_PM)
    33523370        }
    33533371#endif
     
    35673585    }
    35683586#endif
     3587//@@TODO (dmik): I think we don't need the same as above in OS/2,
     3588//  because if the window is active (in Qt terminology)
     3589//  qApp->activeWindow() will be equal to toplevelWidget() which is
     3590//  checked at the beginnig.
    35693591
    35703592    return FALSE;
     
    39854007    // On Windows, show the popup now so that our own focus handling
    39864008    // stores the correct old focus widget even if it's stolen in the showevent
     4009//@@TODO (dmik): need the same in OS/2? guess not.       
    39874010#if defined(Q_WS_WIN)
    39884011    if ( testWFlags(WType_Popup) )
     
    40064029        showWindow();
    40074030
    4008 #if !defined(Q_WS_WIN)
     4031//@@TODO (dmik): need the same in OS/2? guess not.       
     4032#if !defined(Q_WS_WIN)
    40094033    if ( testWFlags(WType_Popup) )
    40104034        qApp->openPopup( this );
     
    40484072        qt_leave_modal( this );
    40494073
    4050 #if defined(Q_WS_WIN)
     4074//@@TODO (dmik): is it correct for OS/2?   
     4075#if defined(Q_WS_WIN) || defined(Q_WS_PM)
    40514076    if ( isTopLevel() && !isPopup() && parentWidget() && isActiveWindow() )
    40524077        parentWidget()->setActiveWindow();      // Activate parent
     
    49274952        }
    49284953
     4954#ifndef Q_WS_PM
     4955    // We disable this on OS/2 since we send these events from qt_sendBlocked()
     4956    // which does it more accurately compared to the code below -- only those
     4957    // widgets that have actually been blocked/unblocked (not less and not
     4958    // more) will receive these events.         
    49294959    case QEvent::WindowBlocked:
    49304960    case QEvent::WindowUnblocked:
     
    49384968        }
    49394969        break;
     4970#endif       
    49404971
    49414972    default:
     
    55275558*/
    55285559bool QWidget::winEvent( MSG * )
     5560{
     5561    return FALSE;
     5562}
     5563
     5564#endif
     5565#if defined(Q_WS_PM)
     5566
     5567/*!
     5568    This special event handler can be reimplemented in a subclass to
     5569    receive native OS/2 PM events.
     5570
     5571    In your reimplementation of this function, if you want to stop the
     5572    event being handled by Qt, return TRUE. If you return FALSE, this
     5573    native event is passed back to Qt, which translates the event into
     5574    a Qt event and sends it to the widget.
     5575
     5576    \warning This function is not portable.
     5577
     5578    \sa QApplication::pmEventFilter()
     5579*/
     5580bool QWidget::pmEvent( QMSG * )
    55295581{
    55305582    return FALSE;
Note: See TracChangeset for help on using the changeset viewer.