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

KDarConfig::KDarConfig ( QWidget *  parent = 0,
const char *  name = 0,
KDarConfig kdarConfig = 0,
bool  addHelpButton = false 
)

Constructor

Definition at line 143 of file kdarConfig.cpp.

References allowOverwrite(), archiveName(), archiveStorageDirectory(), BZ2Compression(), compressionAlgorithm(), compressionLevel(), compressionMaskList(), compressionMaskType(), cryptoAlgorithm(), cryptoBlockSize(), differentialBackup(), differentialBackupArchiveName(), directoryMaskList(), directoryMaskTypes(), directoryToBackup(), dryRun(), executeCommand(), executeRef(), extractArchiveDirectory(), fileBrowserFont(), fileMaskList(), fileMaskType(), fillInDialog(), firstSliceSizeStrings(), firstSliceSizeSuffices(), flatRestore(), generalFont(), hourShiftInt(), ignoreDump(), ignoreID(), inputPipe(), isolationArchiveName(), keepPruned(), logFile(), logLevel(), m_BZ2Compression, m_strongCrypto, m_ZCompression, media(), messageWindowFont(), minimumCompressionSizeInt(), newArchiveName(), noDelete(), outputPipe(), passRef(), pauseBetweenSlices(), readGlobalSettings(), restoreRecent(), 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(), setIsolationArchiveName(), setKeepPruned(), setLogFile(), setLogLevel(), setMedia(), setMessageWindowFont(), setMinimumCompressionSizeInt(), setNewArchiveName(), setNoDelete(), setOutputPipe(), setPauseBetweenSlices(), setRestoreRecent(), setShowKDarSplashScreen(), setSliceSizeString(), setSliceSizeSuffix(), setSplitArchive(), setStatusBarFont(), setStorePassword(), setSystemEA(), setUseCreateArchiveWizard(), setUserEA(), setVerbose(), setWarnOnOverwrite(), showKDarSplashScreen(), sliceSizeString(), sliceSizeSuffix(), slotUpdateCompressionMaskList(), slotUpdateDirectoryMaskList(), slotUpdateFileMaskList(), splitArchive(), statusBarFont(), storePassword(), strongCrypto(), systemEA(), useCreateArchiveWizard(), userEA(), verbose(), warnOnOverwrite(), and ZCompression().

    : kdarConfigureDlg (parent, name), m_nodialog(false)
    , m_kc(0)
    , m_compressionDlg( new kdarCompressionFilterDialog )
    , m_directoryDlg( new kdarDirectoryFilterDialog )
    , m_fileDlg( new kdarFileFilterDialog )
    , m_ZCompression( true )
    , m_BZ2Compression( true )
    , m_strongCrypto ( true )
{
    //set up an integer validator on the slicesize lineEdits
    kdDebug() << "kdarView::kdarView(): integer validator for lineEdits" << endl;
    QRegExp rx("[1-9][0-9]*");
    QRegExpValidator * restrictToWholeNumbers = new QRegExpValidator(rx, this);
    sliceSizeLineEdit->setValidator( restrictToWholeNumbers );
    firstSliceSizeLineEdit->setValidator( restrictToWholeNumbers );
    //Default media types:
    mediaNames << i18n( "media name for custom", "Custom" ) << "DVD (4.7GB)" << "DVD (2GB)" << "CDR (99 min.)"       << "CDR (89 min.)" << "CDR (80 min.)" << "CDR (74 min.)" << "CDR (63 min.)" << "CDR (50 min.)" << "CDR (34 min.)" << "CDR (30 min.)" << "CDR (27 min.)" << "CDR (23 min.)" << "CDR (21 min.)" << "CDR (20 min.)" << "Floppy (1440 kB)" << "Zip (100 MB)";
    statusBarMediaNames << i18n( "statusbar name for custom", "custom" ) << "DVD (4.7GB)" << "DVD (2GB)" << "CDR (870 MB)"       << "CDR (782 MB)" << "CDR (700 MB)" << "CDR (650 MB)" << "CDR (553 MB)" << "CDR (439 MB)" << "CDR (298 MB)" << "CDR (263 MB)" << "CDR (237 MB)" << "CDR (202 MB)" << "CDR (184 MB)" << "CDR (175 MB)" << "Floppy (1440 kB)" << "Zip (100 MB)";
    mediaSizes << "700" << "4400" << "2" << "870" << "782" << "700" << "650" << "553" << "439" << "298" << "263" << "237" << "202" << "184" << "175" << "1440" << "100";
    mediaFirstSizes = mediaSizes;

    mediaSuffices << KDar::MB << KDar::MB << KDar::GB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::MB << KDar::KB << KDar::MB;
    mediaFirstSuffices = mediaSuffices;

    //Clear the default mediaType list
    mediaTypeKComboBox->clear();
    //Load the mediaTypeKComboBox with the enumerated types
    mediaTypeKComboBox->insertStringList( mediaNames );
    //Set the default media to "custom"
    mediaTypeKComboBox->setCurrentItem( KDar::CDR80 );

    //Set the archiveStorageDir KURL Requester mode and caption:
    archiveStorageDirKURLRequester->setMode(18);
    archiveStorageDirKURLRequester->setCaption( i18n( "Please choose (or create) a storage directory" ) );

    m_kc = KGlobal::config();

    connect( this, SIGNAL( compressionMaskListChanged() ), this, SLOT( slotUpdateCompressionMaskList() ) );
    connect( this, SIGNAL( fileMaskListChanged() ), this, SLOT( slotUpdateFileMaskList() ) );
    connect ( this, SIGNAL( directoryMaskListChanged() ), this, SLOT( slotUpdateDirectoryMaskList() ) );

    if( _kdc == 0 )
    {
        readGlobalSettings();
    }
    else
    {
        setArchiveName( _kdc->archiveName() );
        setArchiveStorageDirectory( _kdc->archiveStorageDirectory() );
        setNewArchiveName( _kdc->newArchiveName() );
        setDirectoryToBackup( _kdc->directoryToBackup() );
        setDifferentialBackup( _kdc->differentialBackup() );
        setDifferentialBackupArchiveName( _kdc->differentialBackupArchiveName() );
        setExtractArchiveDirectory( _kdc->extractArchiveDirectory() );
        setInputPipe( _kdc->inputPipe() );
        setOutputPipe( _kdc->outputPipe() );
        setExecuteCommand( _kdc->executeCommand() );
        setCryptoAlgorithm( _kdc->cryptoAlgorithm() );
        setCryptoBlockSize( _kdc->cryptoBlockSize() );
        setStorePassword( _kdc->storePassword() );
        setExecuteRef( _kdc->executeRef() );
        setPassRef( _kdc->passRef() );

        setVerbose( _kdc->verbose() );
        setAllowOverwrite( _kdc->allowOverwrite() );
        setWarnOnOverwrite( _kdc->warnOnOverwrite() );
        setUserEA( _kdc->userEA() );
        setSystemEA( _kdc->systemEA() );
        setIgnoreID( _kdc->ignoreID() );
        setNoDelete( _kdc->noDelete() );
        setRestoreRecent( _kdc->restoreRecent() );
        setFlatRestore( _kdc->flatRestore() );

        setUseCreateArchiveWizard( _kdc->useCreateArchiveWizard() );
        setSplitArchive( _kdc->splitArchive() );
        setPauseBetweenSlices( _kdc->pauseBetweenSlices() );
        setKeepPruned( _kdc->keepPruned() );
        setIgnoreDump( _kdc->ignoreDump() );
        setMedia( _kdc->media() );
        setSliceSizeString( _kdc->sliceSizeString() );
        setSliceSizeSuffix( _kdc->sliceSizeSuffix() );
        setFirstSliceSizeStrings( _kdc->firstSliceSizeStrings() );
        setFirstSliceSizeSuffices( _kdc->firstSliceSizeSuffices() );
        setCompressionAlgorithm( _kdc->compressionAlgorithm() );
        setCompressionLevel( _kdc->compressionLevel() );
        setMinimumCompressionSizeInt( _kdc->minimumCompressionSizeInt() );
        setHourShiftInt( _kdc->hourShiftInt() );

        setCompressionMaskList(_kdc->compressionMaskList() );
        setDirectoryMaskList( _kdc->directoryMaskList() );
        setFileMaskList( _kdc->fileMaskList() );
        setCompressionMaskType( _kdc->compressionMaskType() );
        setDirectoryMaskTypes( _kdc->directoryMaskTypes() );
        setFileMaskType( _kdc->fileMaskType() );

        setGeneralFont( _kdc->generalFont() );
        setFileBrowserFont( _kdc->fileBrowserFont() );
        setMessageWindowFont( _kdc->messageWindowFont() );
        setStatusBarFont( _kdc->statusBarFont() );

        setShowKDarSplashScreen( _kdc->showKDarSplashScreen() );
        setDryRun( _kdc->dryRun() );
        setIsolationArchiveName( _kdc->isolationArchiveName() );
        setLogFile( _kdc->logFile() );
        setLogLevel( _kdc->logLevel() );
        m_ZCompression = _kdc->ZCompression();
        m_BZ2Compression = _kdc->BZ2Compression();
        m_strongCrypto = _kdc->strongCrypto();
    }
    if( addHelpButton == true )
    {
//  QPushButton *pushButton = new KPushButton( KStdGuiItem::help(), this );
//  connect( pushButton, SIGNAL(clicked()), this, SLOT(sHelp()) );
//  glay->addWidget(pushButton, 5, 2);
    }

    fillInDialog();
}


Generated by  Doxygen 1.6.0   Back to index