MCPcopy Create free account
hub / github.com/SpartanJ/eepp / data

Method data

src/tools/ecode/plugins/pluginmanager.cpp:375–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375Variant PluginsModel::data( const ModelIndex& index, ModelRole role ) const {
376 if ( role == ModelRole::Display ) {
377 const PluginDefinition* def = mManager->getDefinitionIndex( index.row() );
378 if ( def == nullptr )
379 return {};
380 switch ( index.column() ) {
381 case Columns::Version:
382 return Variant( def->version.getVersionString().c_str() );
383 case Columns::Description:
384 return Variant( def->description.c_str() );
385 case Columns::Title:
386 return Variant( def->name.c_str() );
387 case Columns::Enabled:
388 return Variant( mManager->isEnabled( def->id ) );
389 case Columns::Id:
390 return Variant( def->id.c_str() );
391 }
392 }
393 return {};
394}
395
396PluginManager* PluginsModel::getManager() const {
397 return mManager;

Callers 7

loadImageFromMediumMethod · 0.45
initProjectTreeViewUIMethod · 0.45
processMessageMethod · 0.45
getDataPtrMethod · 0.45
initGlobalSearchTreeMethod · 0.45
UIPluginManagerTableMethod · 0.45
getCheckBoxFnMethod · 0.45

Calls 6

VariantFunction · 0.85
getDefinitionIndexMethod · 0.80
rowMethod · 0.80
columnMethod · 0.80
c_strMethod · 0.80
isEnabledMethod · 0.45

Tested by

no test coverage detected