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

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

Sets a new compression filter in the compression listview.

Definition at line 1814 of file kdarConfig.cpp.

References makeQStringList().

Referenced by slotEditCompressionFilter(), and slotNewCompressionFilter().

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


Generated by  Doxygen 1.6.0   Back to index