Logo Search packages:      
Sourcecode: kdepim version File versions

KDGanttViewItem * KDGanttViewItem::createFromDomElement ( KDGanttView view,
KDGanttViewItem previous,
QDomElement &  element 
) [static, inherited]

Creates a KDGanttViewItem according to the specification in a DOM element.

view the view in which the item will be inserted
previous to item behind this one should appear
element the DOM element from which to read the specification
the newly created element

Definition at line 1629 of file KDGanttViewItem.cpp.

    QString typeString = element.attribute( "Type" );
    Q_ASSERT( !typeString.isEmpty() );
    KDGanttViewItem* item;
    if( typeString == "Task" )
        item = new KDGanttViewTaskItem( view, previous );
    else if( typeString == "Summary" )
        item = new KDGanttViewSummaryItem( view, previous );
    else if( typeString == "Event" )
        item = new KDGanttViewEventItem( view, previous );
    else {
        qDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" );
        return 0;

    item->loadFromDomElement( element );
    return item;

Generated by  Doxygen 1.6.0   Back to index