Added universal codebase for dragging plugin-specific presets

Added new stringPairDrag type "pluginpresetfile", allowing to drag
and drop any kind of plugin-specific preset files everywhere in the
program. Adopted changes in ZynAddSubFX plugin.
This commit is contained in:
Tobias Doerffel
2009-05-03 16:07:35 +02:00
parent ebd3d26531
commit ccb65f4b40
4 changed files with 33 additions and 31 deletions

View File

@@ -291,7 +291,7 @@ void zynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee )
{
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == "presetfile" )
if( txt.section( ':', 0, 0 ) == "pluginpresetfile" )
{
_dee->acceptProposedAction();
}
@@ -313,7 +313,7 @@ void zynAddSubFxView::dropEvent( QDropEvent * _de )
{
const QString type = stringPairDrag::decodeKey( _de );
const QString value = stringPairDrag::decodeValue( _de );
if( type == "presetfile" )
if( type == "pluginpresetfile" )
{
castModel<zynAddSubFx>()->loadFile( value );
_de->accept();