Changeset 332 for trunk/src/gui


Ignore:
Timestamp:
Nov 20, 2009, 2:53:36 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui/kernel: mime: Implemented mime->clipboard interface for "text/plain" (only putting to the system clipboard so far).

Location:
trunk/src/gui/kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qmime.h

    r326 r332  
    134134
    135135    static ULONG registerMimeType(const QString &mime);
     136
     137
     138
    136139
    137140private:
  • trunk/src/gui/kernel/qmime_pm.cpp

    r324 r332  
    136136/*!
    137137    Registers the MIME type \a mime, and returns an ID number
    138     identifying the format on OS/2.
    139 */
     138    identifying the format on OS/2. Intended to be used by QPMMime
     139    implementations for registering custom clipboard formats they use.
     140*/
     141// static
    140142ULONG QPMMime::registerMimeType(const QString &mime)
    141143{
    142     QString atom = QLatin1String("mime:") + mime;
    143 
    144     ULONG cf = WinAddAtom(WinQuerySystemAtomTable(), atom.toLocal8Bit());
     144    ULONG cf = WinAddAtom(WinQuerySystemAtomTable(), mime.toLocal8Bit());
    145145    if (!cf) {
    146146#ifndef QT_NO_DEBUG
     
    155155
    156156/*!
     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
    157207    \fn QList<ULONG> QPMMime::formatsForMimeData(const QMimeData *mimeData) const
    158208
     
    180230    \table
    181231    \row \o \c CFI_POINTER        \o \a data is a pointer to a block of memory
    182                                       allocated with QPMMime::allocMem()
     232                                      allocated with QPMMime::alloc()
    183233    \row \o \c CFI_HANDLE         \o \a data is a handle to the appropriate
    184234                                      PM resource
     
    285335////////////////////////////////////////////////////////////////////////////////
    286336
     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
     363
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
     377
     378
     379
     380
     381
     382
     383
     384
     385
     386
     387
     388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
     414
     415
     416
     417
     418
     419
     420
     421
     422
     423
     424
     425
     426
     427
     428
     429
     430
     431
     432
     433
     434
     435
     436
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
     473
     474
    287475////////////////////////////////////////////////////////////////////////////////
    288476
     
    303491    if (!initialized) {
    304492        initialized = true;
    305         // @todo new QPMMimeXXX;
     493        ;
    306494    }
    307495}
Note: See TracChangeset for help on using the changeset viewer.