示例#1
0
void TransferListView::updateParentsStats() {
    if(mGroupMode == None)
        return;

    int topit = 0;

    for(; topit < topLevelItemCount(); topit++) {
        TransferListItem * top = dynamic_cast<TransferListItem *>(topLevelItem(topit));
        if (top)
            top->updateStats();
    }
}
示例#2
0
void TransferListView::remove(const QString& _u, const QString& _p) {
    TransferListItem* item = findTransfer(_u, _p);
    if (! item )
        return;

    if(item->user() == _u && (mGroupMode != None || item->path() == _p)) {
        if(mGroupMode == None) {
            museeq->output("delete item");
            delete item;
        } else {
            delete item;
            TransferListItem* parent = findParent(_u);
            if(parent->childCount() == 0)
                delete parent;
            else
                parent->updateStats();
        }
        return;
    }

}