20 #include "tdemultipledrag.h"
23 #ifndef TQT_NO_DRAGANDDROP
26 : TQDragObject( dragSource, name )
28 m_dragObjects.setAutoDelete(
true );
34 m_dragObjects.append( dragObject );
37 while ( dragObject->format( i ) )
39 m_numberFormats.append( i );
46 TQPtrListIterator<TQDragObject> it( m_dragObjects );
47 for ( ; it.current(); ++it )
49 for (
int i = 0; it.current()->
format( i ); ++i )
51 if ( ::qstrcmp( it.current()->format( i ), mime ) == 0 )
52 return it.current()->encodedData( mime );
67 TQValueList<int>::ConstIterator nit = m_numberFormats.begin();
68 TQValueList<int>::ConstIterator nend = m_numberFormats.end();
69 TQPtrListIterator<TQDragObject> it( m_dragObjects );
70 for ( ; nit != nend && i >= *nit ; ++nit, ++it )
73 return it.current()->format( i );
77 void KMultipleDrag::virtual_hook(
int,
void* )
80 #include "tdemultipledrag.moc"
virtual TQByteArray encodedData(const char *mime) const
Returns the data of a drag object with that supports the given mime type.
virtual const char * format(int i) const
Returns the i'th supported format, or 0.
KMultipleDrag(TQWidget *dragSource=0, const char *name=0)
Create a new KMultipleDrag object.
void addDragObject(TQDragObject *dragObject)
Call this to add each underlying drag object to the multiple drag object.