Ignore:
Timestamp:
Dec 25, 2009, 12:21:47 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: More DnD code typed in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qdnd_pm.cpp

    r438 r439  
    5757#include "qt_os2.h"
    5858
     59#define QDND_DEBUG // in pair with qmime_pm.cpp
     60
     61#ifdef QDND_DEBUG
     62#   define DEBUG(a) qDebug a
     63#else
     64#   define DEBUG(a) do {} while(0)
     65#endif
     66
    5967QT_BEGIN_NAMESPACE
    6068
     
    7987    DRAGINFO *info() const { return di; }
    8088
    81     bool provides( const char *format );
    82     const char *format( int fn );
    83     QByteArray encodedData( const char *format );
     89    bool hasFormat_sys(const QString &mimeType);
     90    QStringList formats_sys();
     91    QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type);
    8492
    8593private:
     
    152160    }
    153161
    154 #if defined(QT_DEBUG_DND)
    155     qDebug( "QPMDragData: %d drop workers for DRAGINFO %p",
    156             workers.count(), di );
    157 #endif
     162    DEBUG(() << "QPMDragData:" << workers.count() << "drop workers for DRAGINFO" << di);
    158163
    159164    // init all workers
     
    182187    di = NULL;
    183188    initialized = dropped = gotWorkers = FALSE;
     189}
     190
     191bool QPMDragData::hasFormat_sys(const QString &mimeType)
     192{
     193    return false;
     194}
     195
     196QStringList QPMDragData::formats_sys()
     197{
     198    return QStringList();
     199}
     200
     201QVariant QPMDragData::retrieveData_sys(const QString &mimeType,
     202                                       QVariant::Type type)
     203{
     204    QVariant result;
     205
     206    // we may only do data transfer after DM_DROP is sent. Return shortly.
     207    if (!isDropped())
     208        return result;
     209
     210    return result;
    184211}
    185212
     
    527554bool QDropData::hasFormat_sys(const QString &mimeType) const
    528555{
    529     // @todo implement
     556    Q_ASSERT(d);
     557    if (d)
     558        return d->hasFormat_sys(mimeType);
    530559    return false;
    531560}
     
    534563{
    535564    QStringList fmts;
    536     // @todo implement
     565    Q_ASSERT(d);
     566    if (d)
     567        fmts = d->formats_sys();
    537568    return fmts;
    538569}
     
    541572{
    542573    QVariant result;
    543     // @todo implement
     574    Q_ASSERT(d);
     575    if (d)
     576        result = d->retrieveData_sys(mimeType, type);
    544577    return result;
    545578}
     
    548581
    549582{
    550 #ifdef QDND_DEBUG
    551     qDebug("QDragManager::drag(QDrag *drag)");
    552 #endif
     583    DEBUG(() << "QDragManager::drag");
    553584
    554585    // @todo implement
Note: See TracChangeset for help on using the changeset viewer.