void CXmlPropertyList::showCurrentWhatsThis() { if ( !currentItem() ) return; QPoint p( 0, currentItem()->itemPos() ); p = viewport()->mapToGlobal( contentsToViewport( p ) ); QWhatsThis::display( whatsThisText( currentItem() ), p, viewport() ); }
/*! Creates a DOM node that describes this task link. \param doc the DOM document to which the node belongs \param parentElement the element into which to insert this node */ void KDGanttViewTaskLink::createNode( QDomDocument& doc, QDomElement& parentElement ) { QDomElement taskLinkElement = doc.createElement( "TaskLink" ); parentElement.appendChild( taskLinkElement ); QDomElement fromItemsElement = doc.createElement( "FromItems" ); taskLinkElement.appendChild( fromItemsElement ); QPtrList<KDGanttViewItem> fromList = from(); KDGanttViewItem* item; for( item = fromList.first(); item; item = fromList.next() ) KDGanttXML::createStringNode( doc, fromItemsElement, "Item", item->name() ); QDomElement toItemsElement = doc.createElement( "ToItems" ); taskLinkElement.appendChild( toItemsElement ); QPtrList<KDGanttViewItem> toList = to(); for( item = toList.first(); item; item = toList.next() ) KDGanttXML::createStringNode( doc, toItemsElement, "Item", item->name() ); KDGanttXML::createBoolNode( doc, taskLinkElement, "Highlight", highlight() ); KDGanttXML::createColorNode( doc, taskLinkElement, "Color", color() ); KDGanttXML::createColorNode( doc, taskLinkElement, "HighlightColor", highlightColor() ); KDGanttXML::createStringNode( doc, taskLinkElement, "TooltipText", tooltipText() ); KDGanttXML::createStringNode( doc, taskLinkElement, "WhatsThisText", whatsThisText() ); if( group() ) KDGanttXML::createStringNode( doc, taskLinkElement, "Group", group()->name() ); KDGanttXML::createBoolNode( doc, taskLinkElement, "Visible", isVisible() ); KDGanttXML::createStringNode( doc, taskLinkElement, "Linktype", linkTypeToString( myLinkType ) ); }
QString CXmlPropertyList::whatsThisAt( const QPoint &p ) { return whatsThisText( itemAt( p ) ); }