Logo Search packages:      
Sourcecode: kdar version File versions  Download package

void KDarConfig::loadDirectoryFilters (  )  [protected]

Updates the directory listview with the current directory mask values and types.

Definition at line 1311 of file kdarConfig.cpp.

References directoryMaskList(), directoryMaskTypes(), and makeQStringList().

Referenced by fillInDialog(), and slotArchiveStorageDirectory().

{
    QStringList directoryList = directoryMaskList();
    QStringList maskTypes = directoryMaskTypes();
    //clear the listview, so we can fill it from scratch.
    directoryFiltersListView->clear();
    kdDebug() << "KDarConfig::loadDirectoryFilters(): maskTypes.count() = " << maskTypes.count() << endl;
    kdDebug() << "KDarConfig::loadDirectoryFilters(): directoryList.count() = " << directoryList.count() << endl;
    if ( !directoryList.empty() && !maskTypes.empty() && ( maskTypes.count() == directoryList.count() ) )
    {
        kdDebug() << "KDarConfig::loadDirectoryFilters(): Loading directory filters..." << endl;
        QStringList::Iterator typeIterator = maskTypes.begin();
        for ( QStringList::Iterator directoryIterator = directoryList.begin(); directoryIterator != directoryList.end(); ++directoryIterator )
        {
            QStringList tmpList = makeQStringList( directoryFiltersListView, 1 );
            if ( !tmpList.contains( *directoryIterator ) || ( *typeIterator == i18n( "automatic filter type", "Auto" ) ) )
            {
                QListViewItem* item = new QListViewItem( directoryFiltersListView, *typeIterator, *directoryIterator );
                if ( *typeIterator == i18n( "automatic filter type", "Auto" ) )
                {
                    item->setEnabled( false );
                }
            }
            ++typeIterator;
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index