Source Code (Use browser search to find items of interest.)

Class Index

caitoo'DlgAdvanced (./kdenetwork/caitoo/dlgAdvanced.h:43)

class DlgAdvanced : public QGroupBox {

  Q_OBJECT

public:

  DlgAdvanced( QWidget *parent );
  ~DlgAdvanced();

  void applyData();
  void setData();
     
private:

  QLabel       *lb_adding;
  QButtonGroup *bg_adding;
  QRadioButton *rb_queued;
  QRadioButton *rb_delayed;

  QCheckBox *cb_downloadwindows;
  QCheckBox *cb_iconify;
  QCheckBox *cb_partial;
  QCheckBox *cb_remove;
  QCheckBox *cb_getsizes;
  QCheckBox *cb_expertmode;

};

caitoo'DlgAdvanced::DlgAdvanced() (./kdenetwork/caitoo/dlgAdvanced.cpp:49)

DlgAdvanced::DlgAdvanced( QWidget *parent )
  : QGroupBox( parent ) {

  setTitle(i18n("Advanced Options"));

  QGridLayout *gridLayout = new QGridLayout( this, 6, 3, 20, KDialog::spacingHint() );

  gridLayout->setRowStretch(0,5);
  gridLayout->setRowStretch(1,5);
  gridLayout->setRowStretch(2,5);
  gridLayout->setRowStretch(3,5);
  gridLayout->setRowStretch(4,5);
  gridLayout->setRowStretch(5,5);
    
  gridLayout->setColStretch(0,5);
  gridLayout->setColStretch(1,5);
  gridLayout->setColStretch(2,5);

  // adding new transfers
  lb_adding = new QLabel(i18n("Add new transfers as :"), this);
  gridLayout->addWidget( lb_adding, 0, 0 );

  bg_adding = new QButtonGroup();

  rb_queued = new QRadioButton( i18n("Queued"), this );
  bg_adding->insert( rb_queued );
  gridLayout->addWidget( rb_queued, 0, 1 );

  rb_delayed = new QRadioButton( i18n("Delayed"), this );
  bg_adding->insert( rb_delayed );
  gridLayout->addWidget( rb_delayed, 0, 2 );

  //
  cb_downloadwindows = new QCheckBox( i18n("Show download windows"), this );
  gridLayout->addWidget( cb_downloadwindows, 1, 0 );

  cb_iconify = new QCheckBox( i18n("iconified"), this );
  gridLayout->addWidget( cb_iconify, 1, 1 );

  connect( cb_downloadwindows, SIGNAL(toggled(bool)),cb_iconify, SLOT(setEnabled(bool)) );

  //
  cb_partial = new QCheckBox( i18n("Mark partial downloads"), this );
  gridLayout->addMultiCellWidget( cb_partial, 2, 2, 0, 2 );

  //
  cb_remove = new QCheckBox( i18n("Remove files from a list after success"),
			     this );
  gridLayout->addMultiCellWidget( cb_remove, 3, 3, 0, 2 );

  //
  cb_getsizes = new QCheckBox( i18n("Get file sizes"), this );
  gridLayout->addMultiCellWidget( cb_getsizes, 4, 4, 0, 2 );

  //
  cb_expertmode = new QCheckBox(i18n("Expert mode ( don't prompt for cancel or delete )"),
			     this );
  gridLayout->addMultiCellWidget( cb_expertmode, 5, 5, 0, 2 );
}



caitoo'DlgAdvanced::~DlgAdvanced() (./kdenetwork/caitoo/dlgAdvanced.cpp:110)

DlgAdvanced::~DlgAdvanced() {
  delete bg_adding;
}



caitoo'DlgAdvanced::setData() (./kdenetwork/caitoo/dlgAdvanced.cpp:115)

void DlgAdvanced::setData() {
  rb_queued->setChecked( ksettings.b_addQueued );
  rb_delayed->setChecked( !ksettings.b_addQueued );

  cb_iconify->setEnabled( ksettings.b_showDownloadWindows );
  cb_downloadwindows->setChecked( ksettings.b_showDownloadWindows );

  cb_iconify->setChecked( ksettings.b_startIconified );
  cb_remove->setChecked( ksettings.b_removeOnSuccess );
  cb_getsizes->setChecked( ksettings.b_getSizes );
  cb_expertmode->setChecked( ksettings.b_expertMode );

  cb_partial->setChecked( KProtocolManager::self().markPartial() );
}



caitoo'DlgAdvanced::applyData() (./kdenetwork/caitoo/dlgAdvanced.cpp:131)

void DlgAdvanced::applyData() {

  ksettings.b_addQueued = rb_queued->isChecked();
  ksettings.b_showDownloadWindows = cb_downloadwindows->isChecked();
  ksettings.b_startIconified = cb_iconify->isChecked();
  ksettings.b_removeOnSuccess = cb_remove->isChecked();
  ksettings.b_getSizes = cb_getsizes->isChecked();

  if ( ksettings.b_expertMode != cb_expertmode->isChecked() ) {
    kmain->slotToggleExpertMode();
  }

  KProtocolManager::self().setMarkPartial( cb_partial->isChecked() );
}