Changeset 95 for trunk/src/gui

Timestamp:
Jul 31, 2009, 1:13:57 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Added OS/2 stubs for platform-specific parts of all key GUI classes. Non-key classes are temporarily disabled with QT_NO_ defines.

Location:
trunk/src/gui
Files:
13 added
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/gui.pro

    r92 r95  
    55win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000
    66
    7 !win32:!embedded:!mac:CONFIG      += x11
     7!win32:!embedded:!mac:CONFIG      += x11
    88
    99unix:QMAKE_PKGCONFIG_REQUIRES = QtCore
     
    2020
    2121#modules
    22 # @todo on OS/2, temporarily disable some modules until implemented
    23 os2 {
    24     include(kernel/kernel.pri)
    25 } else {
    26     include(kernel/kernel.pri)
    27     include(image/image.pri)
    28     include(painting/painting.pri)
    29     include(text/text.pri)
    30     include(styles/styles.pri)
    31     include(widgets/widgets.pri)
    32     include(dialogs/dialogs.pri)
    33     include(accessible/accessible.pri)
    34     include(itemviews/itemviews.pri)
    35     include(inputmethod/inputmethod.pri)
    36     include(graphicsview/graphicsview.pri)
    37     include(util/util.pri)
    38 }
     22include(kernel/kernel.pri)
     23include(image/image.pri)
     24include(painting/painting.pri)
     25include(text/text.pri)
     26include(styles/styles.pri)
     27include(widgets/widgets.pri)
     28include(dialogs/dialogs.pri)
     29include(accessible/accessible.pri)
     30include(itemviews/itemviews.pri)
     31include(inputmethod/inputmethod.pri)
     32include(graphicsview/graphicsview.pri)
     33include(util/util.pri)
    3934
    4035embedded: QT += network
  • trunk/src/gui/image/image.pri

    r2 r95  
    5050win32 {
    5151    SOURCES += image/qpixmap_win.cpp
     52
     53
     54
    5255}
    5356embedded {
  • trunk/src/gui/image/qpixmap.cpp

    r2 r95  
    18441844#elif defined(Q_WS_WIN)
    18451845    return 32; // XXX
     1846
     1847
    18461848#elif defined(Q_WS_MAC)
    18471849    return 32;
  • trunk/src/gui/image/qpixmapdatafactory.cpp

    r2 r95  
    5151# include <private/qpixmap_raster_p.h>
    5252#endif
     53
     54
     55
    5356#ifdef Q_WS_MAC
    5457# include <private/qpixmap_mac_p.h>
     
    7881#elif defined(Q_WS_WIN)
    7982    return new QRasterPixmapData(type);
     83
     84
    8085#elif defined(Q_WS_MAC)
    8186    return new QMacPixmapData(type);
  • trunk/src/gui/kernel/kernel.pri

    r92 r95  
    9292
    9393os2 {
    94         # @todo override everything since most things are not ready...
    95         HEADERS = \
    96                 kernel/qapplication.h \
    97                 kernel/qapplication_p.h \
    98                 kernel/qwidget.h \
    99                 kernel/qwidget_p.h
    100         SOURCES = \
    101                 kernel/qapplication.cpp \
    102                 kernel/qwidget.cpp
    103 
    10494        SOURCES += \
    10595                kernel/qapplication_pm.cpp \
     96
     97
     98
     99
     100
     101
    106102                kernel/qwidget_pm.cpp
    107103}
  • trunk/src/gui/kernel/qapplication.cpp

    r92 r95  
    127127QApplicationPrivate *QApplicationPrivate::self = 0;
    128128
     129
    129130QInputContext *QApplicationPrivate::inputContext;
     131
    130132
    131133bool QApplicationPrivate::quitOnLastWindowClosed = true;
     
    20562058        focus_widget = focus;
    20572059
     2060
    20582061        if (prev && ((reason != Qt::PopupFocusReason && reason != Qt::MenuBarFocusReason
    20592062            && prev->testAttribute(Qt::WA_InputMethodEnabled))
     
    20682071            }
    20692072        }
     2073
    20702074
    20712075        if(focus_widget)
     
    20892093            }
    20902094            if(focus && QApplicationPrivate::focus_widget == focus) {
     2095
    20912096                if (focus->testAttribute(Qt::WA_InputMethodEnabled)) {
    20922097                    QInputContext *qic = focus->inputContext();
     
    20942099                        qic->setFocusWidget( focus_widget );
    20952100                }
     2101
    20962102                QFocusEvent in(QEvent::FocusIn, reason);
    20972103                QPointer<QWidget> that = focus;
     
    49034909void QApplication::setInputContext(QInputContext *inputContext)
    49044910{
     4911
    49054912    Q_D(QApplication);
    49064913    Q_UNUSED(d);// only static members being used.
     
    49124919        delete d->inputContext;
    49134920    d->inputContext = inputContext;
     4921
    49144922}
    49154923
     
    49214929QInputContext *QApplication::inputContext() const
    49224930{
     4931
    49234932    Q_D(const QApplication);
    49244933    Q_UNUSED(d);// only static members being used.
     
    49364945#endif
    49374946    return d->inputContext;
     4947
     4948
     4949
    49384950}
    49394951
  • trunk/src/gui/kernel/qapplication_p.h

    r92 r95  
    317317    }
    318318#endif
     319
    319320    static QInputContext *inputContext;
    320 
     321#endif
    321322    static Qt::MouseButtons mouse_buttons;
    322323    static Qt::KeyboardModifiers modifier_buttons;
  • trunk/src/gui/kernel/qapplication_pm.cpp

    r92 r95  
    8282static bool     qt_try_modal(QWidget *, QMSG *, int& ret);
    8383
    84 static QWidget *qt_button_down = 0; // widget got last button-down
     84QWidget *qt_button_down = 0; // widget got last button-down
     85QPointer<QWidget> qt_last_mouse_receiver = 0;
    8586
    8687static HWND autoCaptureWnd = NULLHANDLE;
     
    273274 *****************************************************************************/
    274275
     276
     277
     278
     279
     280
    275281/*****************************************************************************
    276282  Platform specific QApplication members
     
    286292}
    287293
     294
     295
     296
     297
     298
     299
     300
     301
     302
     303
     304
     305
     306
     307
     308
     309
     310
     311
     312
     313
     314
     315
     316
     317
     318
     319
     320
     321
     322
     323
     324
     325
     326
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
     352
     353
     354
     355
     356
     357
     358
     359
     360
     361
     362
    288363/*****************************************************************************
    289364  QApplication cursor stack
    290365 *****************************************************************************/
    291366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
     377
     378
     379
     380
    292381/*****************************************************************************
    293382  Routines to find a Qt widget from a screen position
    294383 *****************************************************************************/
    295384
     385
     386
     387
     388
     389
     390
    296391/*****************************************************************************
    297392  Main event loop
    298393 *****************************************************************************/
     394
     395
     396
     397
     398
     399
     400
     401
     402
    299403
    300404/*****************************************************************************
     
    315419 *****************************************************************************/
    316420
     421
     422
     423
     424
     425
     426
     427
     428
     429
     430
     431
     432
     433
     434
     435
     436
    317437/*****************************************************************************
    318438  Popup widget mechanism
     
    329449 *****************************************************************************/
    330450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
    331461/*****************************************************************************
    332462  Event translation; translates PM events to Qt events
  • trunk/src/gui/kernel/qclipboard.cpp

    r2 r95  
    160160#endif
    161161
    162 #ifndef Q_WS_WIN32
     162#if
    163163/*!
    164164    \internal
     
    230230
    231231    \value Selection  indicates that data should be stored and retrieved from
    232     the global mouse selection. Support for \c Selection is provided only on 
     232    the global mouse selection. Support for \c Selection is provided only on
    233233    systems with a global mouse selection (e.g. X11).
    234234
     
    346346    image is retrieved from the global clipboard.  If \a mode is
    347347    QClipboard::Selection, the image is retrieved from the global
    348     mouse selection. 
     348    mouse selection.
    349349
    350350    \sa setImage() pixmap() mimeData(), QImage::isNull()
     
    461461*/
    462462
    463 /*! 
     463/*!
    464464    \fn void QClipboard::clear(Mode mode)
    465465    Clear the clipboard contents.
     
    469469    function clears the the global clipboard contents.  If \a mode is
    470470    QClipboard::Selection, this function clears the global mouse
    471     selection contents. If \a mode is QClipboard::FindBuffer, this 
     471    selection contents. If \a mode is QClipboard::FindBuffer, this
    472472    function clears the search string buffer.
    473473
     
    562562}
    563563
    564 /*! 
     564/*!
    565565    \internal
    566566    \fn bool QClipboard::supportsMode(Mode mode) const;
     
    569569*/
    570570
    571 /*! 
     571/*!
    572572    \internal
    573573    \fn bool QClipboard::ownsMode(Mode mode) const;
     
    576576*/
    577577
    578 /*! 
     578/*!
    579579    \internal
    580580    Emits the appropriate changed signal for \a mode.
  • trunk/src/gui/kernel/qwidget.cpp

    r92 r95  
    298298void QWidget::setInputContext(QInputContext *context)
    299299{
     300
    300301    Q_D(QWidget);
    301302    if (!testAttribute(Qt::WA_InputMethodEnabled))
    302303        return;
    303 #ifndef QT_NO_IM
    304304    if (d->ic)
    305305        delete d->ic;
     
    323323void QWidget::resetInputContext()
    324324{
     325
    325326    if (!hasFocus())
    326327        return;
    327 #ifndef QT_NO_IM
    328328    QInputContext *qic = this->inputContext();
    329329    if(qic)
     
    98229822#endif
    98239823    case Qt::WA_NativeWindow: {
     9824
    98249825        QInputContext *ic = 0;
    98259826        if (on && !internalWinId() && testAttribute(Qt::WA_InputMethodEnabled) && hasFocus()) {
     
    98289829            ic->setFocusWidget(0);
    98299830        }
     9831
    98309832        if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget())
    98319833            parentWidget()->d_func()->enforceNativeChildren();
    98329834        if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created))
    98339835            d->createWinId();
     9836
    98349837        if (ic)
    98359838            ic->setFocusWidget(this);
     9839
    98369840        break;
    98379841    }
     
    98679871            QInputContextPrivate::updateImeStatus(this, true);
    98689872#endif
     9873
    98699874        QInputContext *ic = d->ic;
    98709875        if (!ic) {
     
    98819886            }
    98829887        }
     9888
    98839889        break;
    98849890    }
  • trunk/src/gui/kernel/qwidget_p.h

    r92 r95  
    594594#endif
    595595
    596 #if defined(Q_WS_X11) || defined (Q_WS_WIN)  || defined (Q_WS_PM) || defined(Q_WS_MAC)
     596#if defined(Q_WS_X11) || defined (Q_WS_WIN) || defined (Q_WS_PM) || defined(Q_WS_MAC)
    597597#ifdef Q_WS_MAC
    598598    void setWSGeometry(bool dontShow=false, const QRect &oldRect = QRect());
  • trunk/src/gui/kernel/qwidget_pm.cpp

    r92 r95  
    6464 *****************************************************************************/
    6565
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
     244
     245
     246
     247
     248
     249
     250
     251
     252
     253
     254
     255
     256
     257
     258
     259
     260
     261
     262
     263
     264
     265
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
     282
     283
     284
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
     296
    66297QT_END_NAMESPACE
  • trunk/src/gui/painting/painting.pri

    r2 r95  
    112112}
    113113
     114
     115
     116
     117
     118
     119
     120
    114121embedded {
    115122    HEADERS += \
     
    170177}
    171178
    172 win32|x11|mac|embedded {
     179win32|x11|mac|embedded {
    173180        SOURCES += painting/qbackingstore.cpp
    174181        HEADERS += painting/qbackingstore_p.h
  • trunk/src/gui/painting/qgraphicssystem.cpp

    r2 r95  
    4848# include <private/qpixmap_raster_p.h>
    4949#endif
     50
     51
     52
    5053#ifdef Q_WS_MAC
    5154# include <private/qpixmap_mac_p.h>
     
    6770#elif defined(Q_WS_WIN)
    6871    return new QRasterPixmapData(type);
     72
     73
    6974#elif defined(Q_WS_MAC)
    7075    return new QMacPixmapData(type);
  • trunk/src/gui/painting/qregion.cpp

    r2 r95  
    566566  \sa intersected()
    567567*/
    568 #if !defined(Q_WS_WIN) || defined(Q_OS_WINCE)
     568#if )
    569569QRegion& QRegion::operator&=(const QRegion &r)
    570570    { return *this = *this & r; }
     
    596596  \sa subtracted()
    597597*/
    598 #if !defined(Q_WS_WIN) || defined(Q_OS_WINCE)
     598#if )
    599599QRegion& QRegion::operator-=(const QRegion &r)
    600600    { return *this = *this - r; }
  • trunk/src/gui/text/qfontdatabase.cpp

    r2 r95  
    876876#elif defined(Q_WS_WIN)
    877877#  include "qfontdatabase_win.cpp"
     878
     879
    878880#elif defined(Q_WS_QWS)
    879881#  include "qfontdatabase_qws.cpp"
     
    24192421*/
    24202422
    2421 /*! 
     2423/*!
    24222424    \fn bool QFontDatabase::supportsThreadedFontRendering()
    24232425    \since 4.4
  • trunk/src/gui/text/qfontengine_p.h

    r2 r95  
    323323    virtual void recalcAdvances(QGlyphLayout *, QTextEngine::ShaperFlags) const;
    324324
    325 #if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
     325#if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
    326326    void draw(QPaintEngine *p, qreal x, qreal y, const QTextItemInt &si);
    327327#endif
  • trunk/src/gui/text/text.pri

    r2 r95  
    7474                text/qfontengine_win.cpp
    7575        HEADERS += text/qfontengine_win_p.h
     76
     77
     78
     79
     80
    7681}
    7782
Note: See TracChangeset for help on using the changeset viewer.