本文整理汇总了C++中kservice::Ptr::desktopEntryPath方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::desktopEntryPath方法的具体用法?C++ Ptr::desktopEntryPath怎么用?C++ Ptr::desktopEntryPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kservice::Ptr
的用法示例。
在下文中一共展示了Ptr::desktopEntryPath方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: startServiceFor
int KDCOPServiceStarter::startServiceFor( const QString& serviceType,
const QString& constraint,
const QString& preferences,
QString *error, QCString* dcopService, int /*flags*/ )
{
KTrader::OfferList offers = KTrader::self()->query(serviceType, "Application", constraint, preferences);
if ( offers.isEmpty() )
return -1;
KService::Ptr ptr = offers.first();
kdDebug() << "KDCOPServiceStarter: starting " << ptr->desktopEntryPath() << endl;
return kapp->startServiceByDesktopPath( ptr->desktopEntryPath(), QStringList(), error, dcopService );
}
示例2: startWizard
void RemoteMenu::startWizard()
{
KURL url;
KService::Ptr service = KService::serviceByDesktopName(WIZARD_SERVICE);
if (service && service->isValid())
{
url.setPath(locate("apps", service->desktopEntryPath()));
new KRun(url, 0, true); // will delete itself
}
}
示例3: slotExec
void PanelAddButtonMenu::slotExec(int id)
{
if(!entryMap_.contains(id))
return;
KSycocaEntry *e = entryMap_[id];
if(e->isType(KST_KServiceGroup))
{
KServiceGroup::Ptr g = static_cast< KServiceGroup * >(e);
containerArea->addServiceMenuButton(g->relPath());
}
else if(e->isType(KST_KService))
{
KService::Ptr service = static_cast< KService * >(e);
containerArea->addServiceButton(service->desktopEntryPath());
}
}
示例4: serviceStartedByStorageId
void QuickLauncher::serviceStartedByStorageId(TQString /*starter*/, TQString storageId)
{
KService::Ptr service = KService::serviceByStorageId(storageId);
if (service->icon() == TQString::null)
{
kdDebug() << storageId << " has no icon. Makes no sense to add it.";
return;
}
QuickURL url = QuickURL(locate("apps", service->desktopEntryPath()));
TQString desktopMenuId(url.menuId());
kdDebug() << "storageId=" << storageId << " desktopURL=" << desktopMenuId << endl;
// A service was started somwhere else. If the quicklauncher contains
// this service too, we flash the icon
QuickButton *startedButton = 0;
std::set<TQString> buttonIdSet;
for (uint n = 0; n < m_buttons->size(); ++n)
{
QuickButton *button = (*m_buttons)[n];
TQString buttonMenuId = button->menuId();
buttonIdSet.insert(buttonMenuId);
if (desktopMenuId == buttonMenuId)
{
kdDebug() << "QuickLauncher: I know that one: " << storageId << endl;
button->flash();
startedButton = button;
}
}
// Update popularity info.
// We do this even if autoadjust is disabled
// so there are sane values to start with if it's turned on.
m_popularity->useService(desktopMenuId);
if (m_settings->autoAdjustEnabled())
{
TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity()));
}
}
示例5: kdDebug
void
PluginManager::dump( const KService::Ptr service )
{
#define ENDLI endl << Debug::indent()
kdDebug()
<< ENDLI
<< "PluginManager Service Info:" << ENDLI
<< "---------------------------" << ENDLI
<< "name : " << service->name() << ENDLI
<< "library : " << service->library() << ENDLI
<< "desktopEntryPath : " << service->desktopEntryPath() << ENDLI
<< "X-KDE-amaroK-plugintype : " << service->property( "X-KDE-amaroK-plugintype" ).toString() << ENDLI
<< "X-KDE-amaroK-name : " << service->property( "X-KDE-amaroK-name" ).toString() << ENDLI
<< "X-KDE-amaroK-authors : " << service->property( "X-KDE-amaroK-authors" ).toStringList() << ENDLI
<< "X-KDE-amaroK-rank : " << service->property( "X-KDE-amaroK-rank" ).toString() << ENDLI
<< "X-KDE-amaroK-version : " << service->property( "X-KDE-amaroK-version" ).toString() << ENDLI
<< "X-KDE-amaroK-framework-version: " << service->property( "X-KDE-amaroK-framework-version" ).toString()
<< endl
<< endl;
#undef ENDLI
}
示例6: loadActions
void RemotePlugin::loadActions(DOM::HTMLElement node)
{
KService::Ptr service = KService::serviceByDesktopName("knetattach");
if(service && service->isValid()){
DOM::DOMString innerHTML;
MetabarWidget::addEntry(innerHTML, i18n("Add a Network Folder"), "desktop://" + locate("apps", service->desktopEntryPath()), "wizard");
node.setInnerHTML(innerHTML);
m_functions->show("actions");
}
else{
m_functions->hide("actions");
}
}