Ignore:
Timestamp:
02/28/14 13:53:11 (10 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
1b87cd2
Parents:
0130b27
Message:

Finish updating the main Life preserver GUI to reflect the new scheduling options in lpreserver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/lp-gui/LPWizard.cpp

    rf15ae5d r194a5d3  
    2626  if(enableReplication){ 
    2727    remotePort = ui->spinPort->value(); 
    28     if(ui->radioSYNC->isChecked()){  
    29       remoteTime = -1; 
    30     }else{ 
    31       remoteTime = ui->time_replicate->time().hour(); 
    32     } 
     28    int remoteTime = ui->combo_remote_freq->currentIndex(); 
     29    if(remoteTime==0){ remoteTime = -999; } //Sync 
     30    else if(remoteTime==1){ remoteTime =  ui->time_replicate->time().hour(); } //Daily @ 
     31    else if(remoteTime==2){ remoteTime = -60; } //hourly 
     32    else if(remoteTime==3){ remoteTime = -30; } //30min 
     33    else{ remoteTime = -10; } //10min 
    3334    remoteHost = ui->lineHostName->text(); 
    3435    remoteUser = ui->lineUserName->text(); 
     
    3738    LPBackend::setupSSHKey(remoteHost, remoteUser, remotePort); 
    3839  } 
     40  if(ui->radio_automatic->isChecked()){ localTime = -999; } 
    3941  if(ui->radioDaily->isChecked()){ localTime = ui->timeEdit->time().hour(); } 
    4042  else if( ui->radio10Min->isChecked()){ localTime = -10; } 
     
    8284  } 
    8385} 
     86 
     87void LPWizard::on_combo_remote_freq_itemChanged(int index){ 
     88  //Adjust the visibility of the replication time selector 
     89  ui->time_replicate->setVisible( (index == 1) ); 
     90} 
     91 
     92int LPWizard::nextId() const{ 
     93        int cpg = currentId(); 
     94        if(cpg == 1 && ui->radio_automatic->isChecked() ){ 
     95          //Automatic snapshot schedule - skip the snapshot pruning page (not needed) 
     96          return 3; 
     97        }else if(cpg==4){ //last page 
     98          return -1; 
     99        }else{ 
     100          return (cpg+1); //go to the next page 
     101        } 
     102} 
Note: See TracChangeset for help on using the changeset viewer.