StringPairDrag: added static createMimeData() method

Added createMimeData() method to StringPairDrag which creates a proper
QMimeData object for StringPairDrag. External code can use it to create
a QMimeData object which can be received by users of StringPairDrag.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
Tobias Doerffel
2009-06-22 23:42:15 +02:00
parent ddf3d3dc66
commit 0c73c5bb17
2 changed files with 27 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
* string_pair_drag.h - class stringPairDrag which provides general support
* for drag'n'drop of string-pairs
*
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -42,6 +42,9 @@ public:
const QPixmap & _icon, QWidget * _w );
~stringPairDrag();
static QMimeData * createMimeData( const QString & _key,
const QString & _value );
static bool processDragEnterEvent( QDragEnterEvent * _dee,
const QString & _allowed_keys );
static QString decodeKey( QDropEvent * _de );
@@ -49,7 +52,7 @@ public:
static const char * mimeType( void )
{
return( "application/x-lmms-stringpair" );
return "application/x-lmms-stringpair";
}
} ;