本文整理汇总了C++中PluginManager::LoadAvailablePlugins方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginManager::LoadAvailablePlugins方法的具体用法?C++ PluginManager::LoadAvailablePlugins怎么用?C++ PluginManager::LoadAvailablePlugins使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginManager
的用法示例。
在下文中一共展示了PluginManager::LoadAvailablePlugins方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main( int argc, char ** argv )
{
QApplication::setColorSpec( QApplication::CustomColor );
QApplication a( argc, argv );
a.setApplicationVersion( APP_VERSION );
QSplashScreen* splash = new QSplashScreen;
splash->setPixmap( QPixmap(":/icons/tonatiuhsplash.png") );
splash->show();
Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
splash->showMessage(QObject::tr("Loading libraries..."), topRight, Qt::black);
QApplication::addLibraryPath( QApplication::applicationDirPath()
+ QDir::separator() + "marble" );
SoQt::init( (QWidget *) NULL );
//MFVec2::initClass();
UserMField::initClass();
UserSField::initClass();
TSceneKit::initClass();
TMaterial::initClass();
TDefaultMaterial::initClass();
TSeparatorKit::initClass();
TShape::initClass();
TCube::initClass();
TLightShape::initClass();
TShapeKit::initClass();
TAnalyzerKit::initClass();
TAnalyzerResultKit::initClass();
TAnalyzerParameter::initClass();
TAnalyzerResult::initClass();
TAnalyzerLevel::initClass();
TSquare::initClass();
TLightKit::initClass();
TSunShape::initClass();
TDefaultSunShape::initClass();
TTracker::initClass();
TTrackerForAiming::initClass();
TDefaultTracker::initClass();
TSceneTracker::initClass();
GraphicRootTracker::initClass();
TTransmissivity::initClass();
TDefaultTransmissivity::initClass();
splash->showMessage( QObject::tr("Setting up the main window..."), topRight, Qt::black );
QDir pluginsDirectory( qApp->applicationDirPath() );
pluginsDirectory.cd( "plugins" );
PluginManager pluginManager;
pluginManager.LoadAvailablePlugins( pluginsDirectory );
int exit;
if( argc > 1 )
{
QString tonatiuhFile = argv[1];
QFileInfo fileInfo( tonatiuhFile );
if( fileInfo.completeSuffix() == QLatin1String( "tnhs") )
{
QString fileName( argv[1] );
QFileInfo fileInfo( fileName );
QDir testDirectory( fileInfo.absolutePath() );
testDirectory.cd( "." );
QScriptEngine* interpreter = new QScriptEngine;
qScriptRegisterSequenceMetaType<QVector<QVariant> >(interpreter);
MainWindow* mw = new MainWindow( QLatin1String("") );
mw->SetPluginManager( &pluginManager );
QScriptValue tonatiuh = interpreter->newQObject( mw );
interpreter->globalObject().setProperty( "tonatiuh", tonatiuh );
QFile scriptFile( fileName );
if( !scriptFile.open( QIODevice::ReadOnly) )
{
QString errorMessage = QString( "Cannot open file %1." ).arg( fileName );
std::cerr<<errorMessage.toStdString()<<std::endl;
}
QTextStream in( &scriptFile );
QString program = in.readAll();
scriptFile.close();
QScriptSyntaxCheckResult checkResult = interpreter->checkSyntax( program );
if( checkResult.state() != QScriptSyntaxCheckResult::Valid )
{
QString errorMessage = QString( "Script Syntaxis Error.\n"
//.........这里部分代码省略.........