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

void KarchiveurApp::slotSetOptions (  )  [slot]

allow user to set the options

Definition at line 824 of file karchiveur.cpp.

References CPreferences::getAlternateBackground(), CPreferences::getCheminAbsolu(), CPreferences::getCompressLevel(), CPreferences::getDefaultDropBehaviour(), CPreferences::getFont(), CPreferences::getKindOfDate(), CPreferences::getKindofExtractionDirectory(), CPreferences::getKindofOpeningDirectory(), CExtraction::getLastExtractPath(), CPreferences::getLitParFlot(), CPreferences::getOverwriteWhenExtracting(), CPreferences::getPreferedArchiveType(), CPreferences::getReadByDirs(), CPreferences::getRecursif(), CPreferences::getSelectionMode(), CPreferences::getSizeofIconListe(), CPreferences::getWholePath(), KarchiveurView::setAlternateBackground(), CArchive::setCompressRate(), CExtraction::setDefaultOptions(), CArchive::setDisplayIcons(), CArchive::setIconSize(), CArchive::setKindOfDate(), CArchiveChoice::setOptionOpening(), CArchive::setOverwriteFilesWhenExtracting(), CArchive::setRecursiveMode(), and view.

Referenced by initActions().

                                  {
  CPreferences prefs;
  
  if(prefs.exec())
  {
    recursive=prefs.getRecursif();
    CArchive::setRecursiveMode(recursive);
    cheminabsolu=prefs.getCheminAbsolu();
    overwrite=prefs.getOverwriteWhenExtracting();
    CArchive::setOverwriteFilesWhenExtracting(overwrite);
    includewholepath=prefs.getWholePath();
    compresslevel=prefs.getCompressLevel();
    optionOpening=prefs.getKindofOpeningDirectory();
    CArchive::setIconSize(prefs.getSizeofIconListe());
    archivechoice->setOptionOpening(optionOpening);
    int defaultextractdir=prefs.getKindofExtractionDirectory();
    CExtraction::setDefaultOptions( CExtraction::getLastExtractPath(),  defaultextractdir );
    view->setFont(prefs.getFont());
    CArchive::setKindOfDate(prefs.getKindOfDate());
    view->setAlternateBackground(prefs.getAlternateBackground());
    viewbydirectories=prefs.getReadByDirs();
    preferedArchiveType=prefs.getPreferedArchiveType();
    defaultdropbehaviour=prefs.getDefaultDropBehaviour();

            switch(prefs.getLitParFlot())
            {
                  case 0:
                        readarchivewithstream=true;
                        CArchive::setDisplayIcons(true);
                        break;
                  case 1:
                        readarchivewithstream=false;
                        CArchive::setDisplayIcons(true);
                        break;
                  case 2:
                        readarchivewithstream=false;
                        CArchive::setDisplayIcons(false);
                        break;
            }

            CArchive::setCompressRate(prefs.getCompressLevel());
            if(prefs.getSelectionMode()==0)
                  view->setSelectionMode(QListView::Multi);
            else
                  view->setSelectionMode(QListView::Extended);
      }
}


Generated by  Doxygen 1.6.0   Back to index