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

bool KDarConfig::readGlobalSettings (  ) 

Call this method to restore configuration settings from the global config file, or a profile file.

Definition at line 268 of file kdarConfig.cpp.

References logFile(), setAllowOverwrite(), setArchiveName(), setArchiveStorageDirectory(), setCompressionAlgorithm(), setCompressionLevel(), setCompressionMaskList(), setCompressionMaskType(), setCryptoAlgorithm(), setCryptoBlockSize(), setDifferentialBackup(), setDifferentialBackupArchiveName(), setDirectoryMaskList(), setDirectoryMaskTypes(), setDirectoryToBackup(), setDryRun(), setExecuteCommand(), setExecuteRef(), setExtractArchiveDirectory(), setFileBrowserFont(), setFileMaskList(), setFileMaskType(), setFirstSliceSizeStrings(), setFirstSliceSizeSuffices(), setFlatRestore(), setGeneralFont(), setHourShiftInt(), setIgnoreDump(), setIgnoreID(), setInputPipe(), setKeepPruned(), setLogFile(), setLogLevel(), setMedia(), setMessageWindowFont(), setMinimumCompressionSizeInt(), setNewArchiveName(), setNoDelete(), setOutputPipe(), setPasswordString(), setPauseBetweenSlices(), setRestoreRecent(), setShowKDarSplashScreen(), setSliceSizeString(), setSliceSizeSuffix(), setSplitArchive(), setStatusBarFont(), setStorePassword(), setSystemEA(), setUseCreateArchiveWizard(), setUserEA(), setVerbose(), and setWarnOnOverwrite().

Referenced by KDarConfig(), kdarView::readProperties(), kdarView::slotRestoreCreationProfile(), and kdarView::slotRestoreRestoreProfile().

{
    m_kc->setGroup("General");
        setUseCreateArchiveWizard( m_kc->readBoolEntry( "useCreateArchiveWizard", true) );
        setVerbose( m_kc->readBoolEntry( "verbose", true) );
        QString file = m_kc->readEntry( "logFile", "" );
        if ( file.isEmpty() )
        {
            file = KGlobal::dirs()->saveLocation( "data", "kdar/" ) + "kdar.log";
        }
        setLogFile( file );
        setLogLevel( m_kc->readNumEntry( "logLevel", KDar::LOG_BASIC ) );
        kdDebug() << "logFile is " << logFile() << endl;
        setDryRun( m_kc->readBoolEntry( "dryRun", false) );
        setShowKDarSplashScreen( m_kc->readBoolEntry( "showKDarSplashScreen", true ) );
        QString lastArchive = m_kc->readEntry( "lastArchive", "select archive");
        if (lastArchive[0] != '/')
        {
            lastArchive = "select archive";
        }
        setArchiveName( lastArchive );
        setArchiveStorageDirectory( m_kc->readEntry( "archiveStorageDir", "" ) );
        setNewArchiveName( m_kc->readEntry( "newArchiveName", "" ) );
        setDirectoryToBackup( m_kc->readEntry( "directoryToBackup", "" ) );
        setDifferentialBackup( m_kc->readBoolEntry( "differentialBackup", false ) );
        setDifferentialBackupArchiveName( m_kc->readEntry( "differentialBackupArchiveName", "" ) );
    m_kc->setGroup("Filesystem");
        setUserEA( m_kc->readBoolEntry( "userEA", true ) );
        setSystemEA( m_kc->readBoolEntry( "systemEA", true ) );
        setIgnoreID( m_kc->readBoolEntry( "ignoreID", false ) );
    m_kc->setGroup("Create / Isolate");
        setInputPipe( m_kc->readEntry( "inputPipe", "" ) );
        setOutputPipe( m_kc->readEntry( "outputPipe", "" ) );
        setExecuteCommand( m_kc->readEntry( "executeCommand", "" ) );
//        setPasswordString( m_kc->readEntry( "passwordString", "" ) );
        //the password string is a temporary holding string.
        setPasswordString( "" );
        setExecuteRef( m_kc->readEntry( "executeRef", "" ) );
        setPassRef( m_kc->readEntry( "passRef", "" ) );
        setSplitArchive( m_kc->readBoolEntry( "splitArchive", true ) );
        setPauseBetweenSlices( m_kc->readBoolEntry( "pauseBetweenSlices", true ) );
        setKeepPruned( m_kc->readBoolEntry( "keepPruned", true ) );
        setIgnoreDump( m_kc->readBoolEntry( "ignoreDump", false ) );
        setSliceSizeString( m_kc->readEntry( "sliceSizeString", "700" ) );
        setSliceSizeSuffix( m_kc->readNumEntry( "sliceSizeSuffix", KDar::MB ) );
        setFirstSliceSizeStrings( m_kc->readListEntry( "firstSliceSizeStrings" ) );
        setFirstSliceSizeSuffices( m_kc->readIntListEntry( "firstSliceSizeSuffices" ) );
        //Now that the various slice sizes are known, we can set the media type.
        setMedia( m_kc->readNumEntry( "media", KDar::CDR80 ) );
        setCompressionAlgorithm( m_kc->readNumEntry( "compressionAlgorithm", libdar::bzip2 ) );
        setCompressionLevel( m_kc->readNumEntry( "compressionLevel", 9 ) );
        setMinimumCompressionSizeInt( m_kc->readNumEntry( "minimumCompressionSizeInt", 150 ) );
        setCompressionMaskList(m_kc->readListEntry( "compressionMaskList" ) );
        setDirectoryMaskList( m_kc->readListEntry( "directoryMaskList" ) );
        setFileMaskList( m_kc->readListEntry( "fileMaskList" ) );
        setCompressionMaskType( m_kc->readNumEntry( "compressionMaskType", KDar::DO_NOT_INCLUDE ) );
        setDirectoryMaskTypes( m_kc->readListEntry( "directoryMaskTypes" ) );
        setFileMaskType( m_kc->readNumEntry( "fileMaskType", KDar::DO_NOT_INCLUDE ) );
    m_kc->setGroup("Extract");
        setExtractArchiveDirectory( m_kc->readEntry( "extractArchiveDirectory", "" ) );
        setNoDelete( m_kc->readBoolEntry( "noDelete", true ) );
        setRestoreRecent( m_kc->readBoolEntry( "restoreRecent", true ) );
        setFlatRestore( m_kc->readBoolEntry( "flatRestore", false ) );
        setAllowOverwrite( m_kc->readBoolEntry( "allowOverwrite", true ) );
        setWarnOnOverwrite( m_kc->readBoolEntry( "warnOnOverwrite", false ) );
    m_kc->setGroup( "Cryptography" );
        setCryptoAlgorithm( m_kc->readNumEntry( "cryptoAlgorithm", KDar::CRYPTO_NONE ) );
        setCryptoBlockSize( m_kc->readNumEntry( "cryptoBlockSize", 10240 ) );
        setStorePassword( m_kc->readBoolEntry( "storePassword", true ) );
    m_kc->setGroup("Diff");
        setHourShiftInt( m_kc->readNumEntry( "hourShiftInt", 0 ) );
    m_kc->setGroup("Fonts");
        QFont defaultFont = kapp->font();
        setGeneralFont( m_kc->readFontEntry( "generalFont", &defaultFont ) );
        setFileBrowserFont( m_kc->readFontEntry( "fileBrowserFont", &defaultFont ) );
        setMessageWindowFont( m_kc->readFontEntry( "messageWindowFont", &defaultFont ) );
        setStatusBarFont( m_kc->readFontEntry( "statusBarFont", &defaultFont ) );

    return true;
}


Generated by  Doxygen 1.6.0   Back to index