コード例 #1
0
ファイル: Refresher.cpp プロジェクト: bossjones/qdirstat
FileInfoSet Refresher::parents( const FileInfoSet children )
{
    FileInfoSet parents;

    foreach ( FileInfo * child, children )
    {
	if ( child && child->parent() )
	    parents << child->parent();
    }

    return parents.normalized();
}
コード例 #2
0
ファイル: MainWindow.cpp プロジェクト: shundhammer/qdirstat
void MainWindow::showSummary()
{
    FileInfoSet sel = _selectionModel->selectedItems();
    int count = sel.size();

    if ( count <= 1 )
	showCurrent( _selectionModel->currentItem() );
    else
    {
	sel = sel.normalized();

	_ui->statusBar->showMessage( tr( "%1 items selected (%2 total)" )
				     .arg( count )
				     .arg( formatSize( sel.totalSize() ) ) );
    }
}