Exemple #1
0
void KrCalcSpaceDialog::CalcThread::updateItems(KrView *view) const
{
    QMutexLocker locker(&m_mutex);
    for (QStringList::const_iterator it = m_items.constBegin(); it != m_items.constEnd(); ++it) {
        KrViewItem *viewItem = view->findItemByName(*it);
        if (viewItem) {
            viewItem->setSize(m_sizes[*it]);
            viewItem->redraw();
        }
    }
}
Exemple #2
0
void KrPreviewJob::slotGotPreview(const KFileItem & item, const QPixmap & preview)
{
    KrViewItem *vi = _hash[item];
    ASSERT(vi);

    _scheduled.removeOne(vi);

    const vfile *file = vi->getVfile();
    _parent->addPreview(file, preview);
    vi->redraw();

    setProcessedAmount(KJob::Files, processedAmount(KJob::Files) + 1);
    emitPercent(processedAmount(KJob::Files), totalAmount(KJob::Files));
}