本文整理汇总了C++中Plugin::createGUI方法的典型用法代码示例。如果您正苦于以下问题:C++ Plugin::createGUI方法的具体用法?C++ Plugin::createGUI怎么用?C++ Plugin::createGUI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::createGUI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void PluginFactory::load( const PluginInfoPair& pair )
{
PTRACE( 6, "PluginFactory::load" );
PluginInfo *pluginInfo = pair.first;
if( !pluginInfo ) return;
int id = pluginInfo->id;
onStartupMap[id] = Load;
if( loaded(pair) ) return;
Plugin *plugin = createPlugin( pair );
// create GUI that plugin exports?
if( pluginInfo->flags & P_HAS_GUI ) {
PTRACE( 1, "Creating GUI of plugin " << plugin->name() );
QWidget *widget = plugin->createGUI();
if ( widget ) {
emit insertWidget( widget, plugin->type(), plugin->text(), plugin->icon(), plugin->significance(), plugin->guiType() );
insertedWidgets[id] = widget;
if( d->paletteSet ) setGUIPluginsPalette(d->currentPalette);
} else
PTRACE( 1, "Failed" );
}
}
示例2: createGUIs
void PluginFactory::createGUIs()
{
//sort GUI plugins according to significance
qHeapSort(d->guiPlugins);
for( PluginFactoryPrivate::GuiPluginList::iterator it = d->guiPlugins.begin(); it != d->guiPlugins.end(); ++it ) {
Plugin *plugin = (*it).plugin();
if( !plugin ) continue;
PTRACE( 1, "Creating GUI of plugin " << plugin->name() );
QWidget *widget = plugin->createGUI();
if ( widget ) {
emit insertWidget( widget, plugin->type(), plugin->text(), plugin->icon(), plugin->significance(), plugin->guiType() );
insertedWidgets[plugin->pluginInfo()->id] = widget;
} else
PTRACE( 1, "Failed" );
}
}