本文整理汇总了C++中IPlugin::instance方法的典型用法代码示例。如果您正苦于以下问题:C++ IPlugin::instance方法的具体用法?C++ IPlugin::instance怎么用?C++ IPlugin::instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPlugin
的用法示例。
在下文中一共展示了IPlugin::instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initConnections
bool MainWindowPlugin::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder);
FPluginManager = APluginManager;
IPlugin *plugin = FPluginManager->pluginInterface("IOptionsManager").value(0,NULL);
if (plugin)
{
FOptionsManager = qobject_cast<IOptionsManager *>(plugin->instance());
if (FOptionsManager)
{
connect(FOptionsManager->instance(), SIGNAL(profileRenamed(const QString &, const QString &)),
SLOT(onProfileRenamed(const QString &, const QString &)));
}
}
plugin = APluginManager->pluginInterface("ITrayManager").value(0,NULL);
if (plugin)
{
FTrayManager = qobject_cast<ITrayManager *>(plugin->instance());
if (FTrayManager)
{
connect(FTrayManager->instance(),SIGNAL(notifyActivated(int, QSystemTrayIcon::ActivationReason)),
SLOT(onTrayNotifyActivated(int,QSystemTrayIcon::ActivationReason)));
}
}
connect(Options::instance(),SIGNAL(optionsOpened()),SLOT(onOptionsOpened()));
connect(Options::instance(),SIGNAL(optionsClosed()),SLOT(onOptionsClosed()));
connect(Options::instance(),SIGNAL(optionsChanged(const OptionsNode &)),SLOT(onOptionsChanged(const OptionsNode &)));
connect(FPluginManager->instance(),SIGNAL(shutdownStarted()),SLOT(onShutdownStarted()));
return true;
}
示例2: initConnections
bool JabberSearch::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder);
FPluginManager = APluginManager;
IPlugin *plugin = APluginManager->pluginInterface("IStanzaProcessor").value(0,NULL);
if (plugin)
{
FStanzaProcessor = qobject_cast<IStanzaProcessor *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IServiceDiscovery").value(0,NULL);
if (plugin)
{
FDiscovery = qobject_cast<IServiceDiscovery *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IPresenceManager").value(0,NULL);
if (plugin)
{
FPresenceManager = qobject_cast<IPresenceManager *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IDataForms").value(0,NULL);
if (plugin)
{
FDataForms = qobject_cast<IDataForms *>(plugin->instance());
}
return FStanzaProcessor!=NULL;
}
示例3: initConnections
bool ShortcutManager::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder);
IPlugin *plugin = APluginManager->pluginInterface("IOptionsManager").value(0,NULL);
if (plugin)
{
FOptionsManager = qobject_cast<IOptionsManager *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("ITrayManager").value(0,NULL);
if (plugin)
{
FTrayManager = qobject_cast<ITrayManager *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("INotifications").value(0,NULL);
if (plugin)
{
FNotifications = qobject_cast<INotifications *>(plugin->instance());
}
connect(Options::instance(),SIGNAL(optionsOpened()),SLOT(onOptionsOpened()));
connect(Options::instance(),SIGNAL(optionsClosed()),SLOT(onOptionsClosed()));
connect(Shortcuts::instance(),SIGNAL(shortcutActivated(const QString, QWidget *)),SLOT(onShortcutActivated(const QString, QWidget *)));
return FOptionsManager!=NULL;
}
示例4: initialize
void ConsoleWidget::initialize(IPluginManager *APluginManager)
{
IPlugin *plugin = APluginManager->pluginInterface("IXmppStreams").value(0,NULL);
if (plugin)
{
FXmppStreams = qobject_cast<IXmppStreams *>(plugin->instance());
if (FXmppStreams)
{
foreach(IXmppStream *stream, FXmppStreams->xmppStreams())
onStreamCreated(stream);
connect(FXmppStreams->instance(), SIGNAL(created(IXmppStream *)), SLOT(onStreamCreated(IXmppStream *)));
connect(FXmppStreams->instance(), SIGNAL(jidChanged(IXmppStream *, const Jid &)), SLOT(onStreamJidChanged(IXmppStream *, const Jid &)));
connect(FXmppStreams->instance(), SIGNAL(streamDestroyed(IXmppStream *)), SLOT(onStreamDestroyed(IXmppStream *)));
}
}
plugin = APluginManager->pluginInterface("IStanzaProcessor").value(0,NULL);
if (plugin)
{
FStanzaProcessor = qobject_cast<IStanzaProcessor *>(plugin->instance());
if (FStanzaProcessor)
{
foreach(int shandleId, FStanzaProcessor->stanzaHandles())
onStanzaHandleInserted(shandleId,FStanzaProcessor->stanzaHandle(shandleId));
connect(FStanzaProcessor->instance(),SIGNAL(stanzaHandleInserted(int, const IStanzaHandle &)),SLOT(onStanzaHandleInserted(int, const IStanzaHandle &)));
ui.cmbCondition->clearEditText();
}
}
connect(Options::instance(),SIGNAL(optionsOpened()),SLOT(onOptionsOpened()));
connect(Options::instance(),SIGNAL(optionsClosed()),SLOT(onOptionsClosed()));
}
示例5: initConnections
bool WizardTransport::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
IPlugin *plugin = APluginManager->pluginInterface("IXmppStreamManager").value(0,NULL);
if (plugin)
FXmppStreamManager = qobject_cast<IXmppStreamManager *>(plugin->instance());
plugin = APluginManager->pluginInterface("IXmppStreamManager").value(0,NULL);
if (plugin)
{
FXmppStreamManager = qobject_cast<IXmppStreamManager *>(plugin->instance());
if (FXmppStreamManager)
{
connect(FXmppStreamManager->instance(),SIGNAL(streamOpened(IXmppStream *)),SLOT(onStreamOpened(IXmppStream *)));
connect(FXmppStreamManager->instance(),SIGNAL(streamClosed(IXmppStream *)),SLOT(onStreamClosed(IXmppStream *)));
}
}
plugin = APluginManager->pluginInterface("IRostersViewPlugin").value(0,NULL);
if (plugin)
{
FRostersViewPlugin = qobject_cast<IRostersViewPlugin *>(plugin->instance());
if (FRostersViewPlugin)
{
connect(FRostersViewPlugin->rostersView()->instance(),
SIGNAL(indexContextMenu(QList<IRosterIndex *>, quint32, Menu *)),
SLOT(onRosterIndexContextMenu(QList<IRosterIndex *>, quint32, Menu *)));
//connect(Shortcuts::instance(), SIGNAL(shortcutActivated(QString,QWidget*)), SLOT(onShortcutActivated(QString,QWidget*)));
}
}
plugin = APluginManager->pluginInterface("IDataForms").value(0,NULL);
AInitOrder = 200;
return true;
}
示例6: initConnections
bool Annotations::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder);
IPlugin *plugin = APluginManager->pluginInterface("IPrivateStorage").value(0,NULL);
if (plugin)
{
FPrivateStorage = qobject_cast<IPrivateStorage *>(plugin->instance());
if (FPrivateStorage)
{
connect(FPrivateStorage->instance(),SIGNAL(storageOpened(const Jid &)),SLOT(onPrivateStorageOpened(const Jid &)));
connect(FPrivateStorage->instance(),SIGNAL(dataSaved(const QString &, const Jid &, const QDomElement &)),
SLOT(onPrivateDataSaved(const QString &, const Jid &, const QDomElement &)));
connect(FPrivateStorage->instance(),SIGNAL(dataLoaded(const QString &, const Jid &, const QDomElement &)),
SLOT(onPrivateDataLoaded(const QString &, const Jid &, const QDomElement &)));
connect(FPrivateStorage->instance(),SIGNAL(dataChanged(const Jid &, const QString &, const QString &)),
SLOT(onPrivateDataChanged(const Jid &, const QString &, const QString &)));
connect(FPrivateStorage->instance(),SIGNAL(storageClosed(const Jid &)),SLOT(onPrivateStorageClosed(const Jid &)));
}
}
plugin = APluginManager->pluginInterface("IRosterManager").value(0,NULL);
if (plugin)
{
FRosterManager = qobject_cast<IRosterManager *>(plugin->instance());
if (FRosterManager)
{
connect(FRosterManager->instance(),SIGNAL(rosterItemReceived(IRoster *, const IRosterItem &, const IRosterItem &)),
SLOT(onRosterItemReceived(IRoster *, const IRosterItem &, const IRosterItem &)));
}
}
plugin = APluginManager->pluginInterface("IRostersModel").value(0,NULL);
if (plugin)
{
FRostersModel = qobject_cast<IRostersModel *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IRostersViewPlugin").value(0,NULL);
if (plugin)
{
FRostersViewPlugin = qobject_cast<IRostersViewPlugin *>(plugin->instance());
if (FRostersViewPlugin)
{
connect(FRostersViewPlugin->rostersView()->instance(),SIGNAL(indexContextMenu(const QList<IRosterIndex *> &, quint32, Menu *)),
SLOT(onRostersViewIndexContextMenu(const QList<IRosterIndex *> &, quint32, Menu *)));
connect(FRostersViewPlugin->rostersView()->instance(),SIGNAL(indexClipboardMenu(const QList<IRosterIndex *> &, quint32, Menu *)),
SLOT(onRostersViewIndexClipboardMenu(const QList<IRosterIndex *> &, quint32, Menu *)));
connect(FRostersViewPlugin->rostersView()->instance(),SIGNAL(indexToolTips(IRosterIndex *, quint32, QMap<int,QString> &)),
SLOT(onRostersViewIndexToolTips(IRosterIndex *, quint32, QMap<int,QString> &)));
}
}
plugin = APluginManager->pluginInterface("IRosterSearch").value(0,NULL);
if (plugin)
{
FRosterSearch = qobject_cast<IRosterSearch *>(plugin->instance());
}
return FPrivateStorage!=NULL;
}
示例7: initConnections
bool PrivateStorage::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder);
IPlugin *plugin = APluginManager->pluginInterface("IXmppStreamManager").value(0,NULL);
if (plugin)
{
FXmppStreamManager = qobject_cast<IXmppStreamManager *>(plugin->instance());
if (FXmppStreamManager)
{
connect(FXmppStreamManager->instance(), SIGNAL(streamOpened(IXmppStream *)), SLOT(onXmppStreamOpened(IXmppStream *)));
connect(FXmppStreamManager->instance(), SIGNAL(streamAboutToClose(IXmppStream *)), SLOT(onXmppStreamAboutToClose(IXmppStream *)));
connect(FXmppStreamManager->instance(), SIGNAL(streamClosed(IXmppStream *)), SLOT(onXmppStreamClosed(IXmppStream *)));
}
}
plugin = APluginManager->pluginInterface("IStanzaProcessor").value(0,NULL);
if (plugin)
{
FStanzaProcessor = qobject_cast<IStanzaProcessor *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IPresenceManager").value(0,NULL);
if (plugin)
{
FPresenceManager = qobject_cast<IPresenceManager *>(plugin->instance());
if (FPresenceManager)
{
connect(FPresenceManager->instance(),SIGNAL(presenceAboutToClose(IPresence *, int, const QString &)),
SLOT(onPresenceAboutToClose(IPresence *, int, const QString &)));
}
}
return FStanzaProcessor!=NULL;
}
示例8: initialize
void AddMetaItemPage::initialize(IPluginManager *APluginManager)
{
IPlugin *plugin = APluginManager->pluginInterface("IRosterChanger").value(0,NULL);
if (plugin)
FRosterChanger = qobject_cast<IRosterChanger *>(plugin->instance());
plugin = APluginManager->pluginInterface("IMessageProcessor").value(0,NULL);
if (plugin)
FMessageProcessor = qobject_cast<IMessageProcessor *>(plugin->instance());
}
示例9: initConnections
bool DbusPopupHandler::initConnections(IPluginManager *APluginManager, int &/*AInitOrder*/)
{
IPlugin *plugin = APluginManager->pluginInterface("IAvatars").value(0, NULL);
if(plugin)
FAvatars = qobject_cast<IAvatars *>(plugin->instance());
plugin = APluginManager->pluginInterface("INotifications").value(0, NULL);
if(plugin)
FNotifications = qobject_cast<INotifications *>(plugin->instance());
connect(APluginManager->instance(),SIGNAL(aboutToQuit()),this,SLOT(onApplicationQuit()));
return FNotifications!=NULL && FAvatars!=NULL;
}
示例10: initConnections
bool TelnetOverXmppClient::initConnections(IPluginManager *APluginManager, int &AInitOrder) {
IPlugin* plugin = APluginManager->pluginInterface("IServiceDiscovery").value(0, NULL);
if (plugin != NULL) {
FServiceDiscovery = qobject_cast<IServiceDiscovery*>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IRostersViewPlugin").value(0, NULL);
if (plugin != NULL) {
FRostersViewPlugin = qobject_cast<IRostersViewPlugin *>(plugin->instance());
connect(FRostersViewPlugin->rostersView()->instance(),
SIGNAL(indexContextMenu(QList<IRosterIndex *>, quint32, Menu *)),
SLOT(onRosterIndexContextMenu(QList<IRosterIndex *>, quint32, Menu *)));
}
示例11: initConnections
bool ConsolePlugin::initConnections(IPluginManager *APluginManager, int &/*AInitOrder*/)
{
FPluginManager = APluginManager;
IPlugin *plugin = APluginManager->pluginInterface("IMainWindowPlugin").value(0,NULL);
if (plugin)
{
FMainWindowPlugin = qobject_cast<IMainWindowPlugin *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("ISystemIntegration").value(0,NULL);
if (plugin)
FSystemIntegration = qobject_cast<ISystemIntegration *>(plugin->instance());
return FMainWindowPlugin && FSystemIntegration;
}
示例12: initConnections
bool ConsolePlugin::initConnections(IPluginManager *APluginManager, int &/*AInitOrder*/)
{
FPluginManager = APluginManager;
IPlugin *plugin = APluginManager->pluginInterface("IMainWindowPlugin").value(0,NULL);
if (plugin)
FMainWindowPlugin = qobject_cast<IMainWindowPlugin *>(plugin->instance());
#ifdef Q_WS_MAC
plugin = APluginManager->pluginInterface("IMacIntegration").value(0,NULL);
if (plugin)
FMacIntegration = qobject_cast<IMacIntegration *>(plugin->instance());
#endif
return FMainWindowPlugin!=NULL;
}
示例13: initConnections
bool MapSourceGoogle::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder)
IPlugin *plugin = APluginManager->pluginInterface("IOptionsManager").value(0,NULL);
if (plugin)
FOptionsManager = qobject_cast<IOptionsManager *>(plugin->instance());
plugin = APluginManager->pluginInterface("IMap").value(0,NULL);
if (plugin)
FMap = qobject_cast<IMap *>(plugin->instance());
connect(Options::instance(), SIGNAL(optionsOpened()), SLOT(onOptionsOpened()));
connect(Options::instance(), SIGNAL(optionsChanged(OptionsNode)), SLOT(onOptionsChanged(OptionsNode)));
return true;
}
示例14: initConnections
bool SimpleMessageStyleEngine::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder);
IPlugin *plugin = APluginManager->pluginInterface("IMessageStyleManager").value(0);
if (plugin)
{
FMessageStyleManager = qobject_cast<IMessageStyleManager *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IUrlProcessor").value(0);
if (plugin)
{
FUrlProcessor = qobject_cast<IUrlProcessor *>(plugin->instance());
}
return true;
}
示例15: initConnections
bool DataForms::initConnections(IPluginManager *APluginManager, int &AInitOrder)
{
Q_UNUSED(AInitOrder);
IPlugin *plugin = APluginManager->pluginInterface("IServiceDiscovery").value(0,NULL);
if (plugin)
{
FDiscovery = qobject_cast<IServiceDiscovery *>(plugin->instance());
}
plugin = APluginManager->pluginInterface("IBitsOfBinary").value(0,NULL);
if (plugin)
{
FBitsOfBinary = qobject_cast<IBitsOfBinary *>(plugin->instance());
}
return true;
}