本文整理汇总了C++中PluginManager::rendererPlugins方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginManager::rendererPlugins方法的具体用法?C++ PluginManager::rendererPlugins怎么用?C++ PluginManager::rendererPlugins使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginManager
的用法示例。
在下文中一共展示了PluginManager::rendererPlugins方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
CommandLineParser parser;
Commands commands;
parser.registerDataSink( &commands );
if ( !parser.parse( true ) ) {
a.quit();
return -1;
}
Log::instance()->setMessageTypeEnabled( QtDebugMsg, commands.verbose );
PluginManager* pluginManager = PluginManager::instance();
pluginManager->loadPlugins();
if ( commands.listPlugins ) {
printf( "%s\n\n", printStringTable( pluginManager->importerPlugins(), 1, "Importer Plugins" ).toUtf8().constData() );
printf( "%s\n\n", printStringTable( pluginManager->routerPlugins(), 1, "Router Plugins" ).toUtf8().constData() );
printf( "%s\n\n", printStringTable( pluginManager->gpsLookupPlugins(), 1, "GPS Lookup Plugins" ).toUtf8().constData() );
printf( "%s\n\n", printStringTable( pluginManager->rendererPlugins(), 1, "Renderer Plugins" ).toUtf8().constData() );
printf( "%s\n\n", printStringTable( pluginManager->addressLookupPlugins(), 1, "Address Lookup Plugins" ).toUtf8().constData() );
a.quit();
return 0;
}
if ( !commands.settings.isEmpty() ) {
QSettings settings( commands.settings, QSettings::IniFormat );
pluginManager->loadSettings( &settings );
commands.importer = settings.value( "importer" ).toString();
commands.router = settings.value( "router" ).toString();
commands.gpsLookup = settings.value( "gpsLookup" ).toString();
commands.renderer = settings.value( "renderer" ).toString();
commands.addressLookup = settings.value( "addressLookup" ).toString();
}
// parse a second time including all plugins
// otherwise console settings would be overwritten by the settings file
QVector< QObject* > plugins = pluginManager->plugins();
foreach( QObject* plugin, plugins ) {
IConsoleSettings* settings = qobject_cast< IConsoleSettings* >( plugin );
if ( settings!= NULL ) {
parser.registerDataSink( settings );
}
}