void updateTooltip() { QStringList names; foreach(const QString &vtname, viewtypes) names << viewText(viewType(vtname.toUtf8())); Plasma::ToolTipContent data(i18n("Application Launcher Menu"), names.join(", "), icon->icon()); Plasma::ToolTipManager::self()->setContent(q, data); }
void ViewListItem::save( QDomElement &element ) const { element.setAttribute( "itemtype", type() ); element.setAttribute( "tag", tag() ); if ( type() == ItemType_SubView ) { element.setAttribute( "viewtype", viewType() ); element.setAttribute( "name", m_viewinfo.name == text( 0 ) ? "" : text( 0 ) ); element.setAttribute( "tooltip", m_viewinfo.tip == toolTip( 0 ) ? TIP_USE_DEFAULT_TEXT : toolTip( 0 ) ); } else if ( type() == ItemType_Category ) { kDebug(planDbg())<<text(0)<<m_viewinfo.name; element.setAttribute( "name", text( 0 ) == m_viewinfo.name ? "" : text( 0 ) ); element.setAttribute( "tooltip", toolTip( 0 ).isEmpty() ? TIP_USE_DEFAULT_TEXT : toolTip( 0 ) ); } }