31 for (
int i = 0; i < thePipe.
size(); i++ )
37 QgsDebugMsg( QString(
"cloned inerface with role %1" ).arg( role ) );
61 for (
int i = 1; i < theInterfaces.size(); i++ )
63 if ( ! theInterfaces[i]->setInput( theInterfaces[i-1] ) )
65 QgsDebugMsg( QString(
"cannot connect %1 to %2" ).arg(
typeid( *( theInterfaces[i] ) ).name() ).arg(
typeid( *( theInterfaces[i-1] ) ).name() ) );
74 QgsDebugMsg( QString(
"insert %1 at %2" ).arg(
typeid( *theInterface ).name() ).arg( idx ) );
81 QVector<QgsRasterInterface*> interfaces =
mInterfaces;
83 interfaces.insert( idx, theInterface );
100 QgsDebugMsg( QString(
"replace by %1 at %2" ).arg(
typeid( *theInterface ).name() ).arg( idx ) );
102 if ( !theInterface )
return false;
106 QVector<QgsRasterInterface*> interfaces =
mInterfaces;
108 interfaces[idx] = theInterface;
109 bool success =
false;
127 if ( dynamic_cast<QgsRasterDataProvider *>( interface ) ) role =
ProviderRole;
128 else if ( dynamic_cast<QgsRasterRenderer *>( interface ) ) role =
RendererRole;
129 else if ( dynamic_cast<QgsRasterResampleFilter *>( interface ) ) role =
ResamplerRole;
130 else if ( dynamic_cast<QgsBrightnessContrastFilter *>( interface ) ) role =
BrightnessRole;
131 else if ( dynamic_cast<QgsHueSaturationFilter *>( interface ) ) role =
HueSaturationRole;
132 else if ( dynamic_cast<QgsRasterProjector *>( interface ) ) role =
ProjectorRole;
133 else if ( dynamic_cast<QgsRasterNuller *>( interface ) ) role =
NullerRole;
135 QgsDebugMsg( QString(
"%1 role = %2" ).arg(
typeid( *interface ).name() ).arg( role ) );
155 QgsDebugMsg( QString(
"%1" ).arg(
typeid( *theInterface ).name() ) );
157 if ( !theInterface )
return false;
192 idx = providerIdx + 1;
196 idx = qMax( providerIdx, rendererIdx ) + 1;
200 idx = qMax( qMax( providerIdx, rendererIdx ), brightnessIdx ) + 1;
204 idx = qMax( qMax( qMax( providerIdx, rendererIdx ), brightnessIdx ), hueSaturationIdx ) + 1;
208 idx = qMax( qMax( qMax( qMax( providerIdx, rendererIdx ), brightnessIdx ), hueSaturationIdx ), resamplerIdx ) + 1;
211 return insert( idx, theInterface );
261 QgsDebugMsg( QString(
"remove at %1" ).arg( idx ) );
267 QVector<QgsRasterInterface*> interfaces =
mInterfaces;
269 interfaces.remove( idx );
270 bool success =
false;
287 if ( !theInterface )
return false;
289 return remove(
mInterfaces.indexOf( theInterface ) );
294 QgsDebugMsg( QString(
"idx = %1 on = %2" ).arg( idx ).arg( on ) );
301 if ( onOrig == on )
return true;
314 QgsDebugMsg( QString(
"idx = %1 on = %2" ).arg( idx ).arg( on ) );
319 if ( onOrig == on )
return true;
333 if ( idx < 0 || idx >=
mInterfaces.size() )
return false;