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

void KDarConfig::newFileFilter (  )  [virtual, slot]

Sets a new file filter in the file filter listview.

Definition at line 1643 of file kdarConfig.cpp.

References makeQStringList().

Referenced by slotEditFileFilter(), and slotNewFileFilter().

{
    QString fileMask = m_fileDlg->fileFilterValueComboBox->currentText();
    if ( !fileMask.isEmpty() )
    {
        if (fileMask != QString( i18n( "select all filters from list", "All of the above" ) ) )
        {
            //Add the filter if it is not already in the list
            QStringList tmpList = makeQStringList( fileFiltersListView );
            if ( !tmpList.contains( fileMask ) )
            {
                (void) new QListViewItem( fileFiltersListView, fileMask);
            }
        }
        else
        {
            for (int i = 0; i<(m_fileDlg->fileFilterValueComboBox->count()-1);++i)
            {
                //Add the filter if it is not already in the list
                QStringList tmpList = makeQStringList( fileFiltersListView );
                fileMask = m_fileDlg->fileFilterValueComboBox->text(i);
                if ( !tmpList.contains( fileMask ) )
                {
                    (void) new QListViewItem(fileFiltersListView, fileMask );
                }
            }
        }
        emit fileMaskListChanged();
    }
}


Generated by  Doxygen 1.6.0   Back to index