Revision 1850 trunk/client/gui_qt/WidgetConfigPAR2.cpp
| WidgetConfigPAR2.cpp (revision 1850) | ||
|---|---|---|
| 14 | 14 | 
                  connect(ui->chkEnablePAR2Repair, SIGNAL(toggled(bool)), SLOT(chkEnablePAR2Repair_toggled(bool)));  | 
              
| 15 | 15 | 
                  connect(ui->chkEnableIntelligentPar2Downloading, SIGNAL(toggled(bool)), SLOT(chkEnableIntelligentPAR2Downloading_toggled(bool)));  | 
              
| 16 | 16 | 
                  connect(ui->chkEnableAutoUnpack, SIGNAL(toggled(bool)), SLOT(chkEnableAutoUnpack_toggled(bool)));  | 
              
| 17 | 
                  connect(ui->chkRemoveFilesAfterRepairAndUnpack, SIGNAL(toggled(bool)), SLOT(chkRemoveFilesAfterRepairAndUnpack_toggled(bool)));  | 
              |
| 17 | 
                  connect(ui->chkRemoveFilesAfterRepair, SIGNAL(toggled(bool)), SLOT(chkRemoveFilesAfterRepair_toggled(bool)));  | 
              |
| 18 | 
                  connect(ui->chkRemoveFilesAfterUnpack, SIGNAL(toggled(bool)), SLOT(chkRemoveFilesAfterUnpack_toggled(bool)));  | 
              |
| 18 | 19 | 
                  connect(glue, SIGNAL(configChanged(void)), SLOT(onConfigChanged(void)));  | 
              
| 19 | 20 | 
                  }  | 
              
| 20 | 21 | 
                   | 
              
| ... | ... | |
| 41 | 42 | 
                  ui->chkEnablePAR2Repair->setChecked(opts.enable_par2_repair);  | 
              
| 42 | 43 | 
                  ui->chkEnableIntelligentPar2Downloading->setChecked(opts.enable_intelligent_par2_downloading);  | 
              
| 43 | 44 | 
                  ui->chkEnableAutoUnpack->setChecked(opts.enable_auto_unpack);  | 
              
| 44 | 
                  ui->chkRemoveFilesAfterRepairAndUnpack->setChecked(opts.auto_remove_files);  | 
              |
| 45 | 
                  ui->chkRemoveFilesAfterRepair->setChecked(opts.auto_remove_files_after_repair);  | 
              |
| 46 | 
                  ui->chkRemoveFilesAfterUnpack->setChecked(opts.auto_remove_files_after_unpack);  | 
              |
| 45 | 47 | 
                  }  | 
              
| 46 | 48 | 
                   | 
              
| 47 | 49 | 
                  void WidgetConfigPAR2::chkEnablePAR2Repair_toggled(bool toggled)  | 
              
| ... | ... | |
| 71 | 73 | 
                  glue->configSetOpts(opts);  | 
              
| 72 | 74 | 
                  }  | 
              
| 73 | 75 | 
                   | 
              
| 74 | 
                  void WidgetConfigPAR2::chkRemoveFilesAfterRepairAndUnpack_toggled(bool toggled)  | 
              |
| 76 | 
                  void WidgetConfigPAR2::chkRemoveFilesAfterRepair_toggled(bool toggled)  | 
              |
| 75 | 77 | 
                  {
                 | 
              
| 76 | 
                      qDebug("chkRemoveFilesAfterRepairAndUnpack_toggled: toggled = %i", toggled);
                 | 
              |
| 78 | 
                      qDebug("chkRemoveFilesAfterRepair_toggled: toggled = %i", toggled);
                 | 
              |
| 77 | 79 | 
                   | 
              
| 78 | 80 | 
                  QNNTPGrabGlue::ConfigOpts opts = glue->configGetOpts();  | 
              
| 79 | 
                  opts.auto_remove_files = toggled;  | 
              |
| 81 | 
                  opts.auto_remove_files_after_repair = toggled;  | 
              |
| 80 | 82 | 
                  glue->configSetOpts(opts);  | 
              
| 81 | 83 | 
                  }  | 
              
| 82 | 84 | 
                   | 
              
| 85 | 
                  void WidgetConfigPAR2::chkRemoveFilesAfterUnpack_toggled(bool toggled)  | 
              |
| 86 | 
                  {
                 | 
              |
| 87 | 
                      qDebug("chkRemoveFilesAfterUnpack_toggled: toggled = %i", toggled);
                 | 
              |
| 83 | 88 | 
                   | 
              
| 89 | 
                  QNNTPGrabGlue::ConfigOpts opts = glue->configGetOpts();  | 
              |
| 90 | 
                  opts.auto_remove_files_after_unpack = toggled;  | 
              |
| 91 | 
                  glue->configSetOpts(opts);  | 
              |
| 92 | 
                  }  | 
              |
Also available in: Unified diff
NNTPGrab

