当前位置: 首页>>代码示例>>C++>>正文


C++ Ptr::desktopEntryPath方法代码示例

本文整理汇总了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 );
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例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
    }
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例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());
    }
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:18,代码来源:addbutton_mnu.cpp

示例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()));
    }
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:38,代码来源:quicklauncher.cpp

示例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
}
开发者ID:tmarques,项目名称:waheela,代码行数:23,代码来源:pluginmanager.cpp

示例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");
  }
}
开发者ID:iegor,项目名称:kdesktop,代码行数:16,代码来源:remoteplugin.cpp


注:本文中的kservice::Ptr::desktopEntryPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。