@@ -622,7 +622,7 @@ QMenu* MainWindow::buildAvailableActions()
622622 for (auto mode : bassModes){
623623 QAction *newEntry = new QAction (mode);
624624 connect (newEntry,&QAction::triggered,this ,[=](){
625- ui->vbmode ->setValue (bassModes.indexOf (mode));
625+ ui->vbmode ->setCurrentIndex (bassModes.indexOf (mode));
626626 OnUpdate (true );
627627 });
628628 bassModeMenu->addAction (newEntry);
@@ -634,7 +634,7 @@ QMenu* MainWindow::buildAvailableActions()
634634 for (auto mode : clarityModes){
635635 QAction *newEntry = new QAction (mode);
636636 connect (newEntry,&QAction::triggered,this ,[=](){
637- ui->vcmode ->setValue (clarityModes.indexOf (mode));
637+ ui->vcmode ->setCurrentIndex (clarityModes.indexOf (mode));
638638 OnUpdate (true );
639639 });
640640 clarityModeMenu->addAction (newEntry);
@@ -842,10 +842,10 @@ void MainWindow::LoadConfig(Context ctx){
842842 ui->colmmidimg ->setValueA (conf->getInt (" colm_midimage" ));
843843 ui->colmwide ->setValueA (conf->getInt (" colm_widening" ));
844844 ui->clarity ->setChecked (conf->getBool (" vc_enable" ));
845- ui->vcmode ->setValue (conf->getInt (" vc_mode" ));
845+ ui->vcmode ->setCurrentIndex (conf->getInt (" vc_mode" ));
846846 ui->vclvl ->setValueA (conf->getInt (" vc_level" ));
847847 ui->vb ->setChecked (conf->getBool (" vb_enable" ));
848- ui->vbmode ->setValue (conf->getInt (" vb_mode" ));
848+ ui->vbmode ->setCurrentIndex (conf->getInt (" vb_mode" ));
849849 ui->vbgain ->setValueA (conf->getInt (" vb_gain" ));
850850 ui->vbfreq ->setValueA (conf->getInt (" vb_freq" ));
851851 ui->vhp ->setChecked (conf->getBool (" vhe_enable" ));
@@ -952,7 +952,7 @@ void MainWindow::ApplyConfig(bool restart){
952952 conf->setValue (" colm_depth" ,QVariant (ui->colmdepth ->valueA ()));
953953 conf->setValue (" colm_midimage" ,QVariant (ui->colmmidimg ->valueA ()));
954954 conf->setValue (" vc_enable" ,QVariant (ui->clarity ->isChecked ()));
955- conf->setValue (" vc_mode" ,QVariant (ui->vcmode ->value ()));
955+ conf->setValue (" vc_mode" ,QVariant (ui->vcmode ->currentIndex ()));
956956 conf->setValue (" vc_level" ,QVariant (ui->vclvl ->valueA ()));
957957 conf->setValue (" cure_enable" ,QVariant (ui->vcure ->isChecked ()));
958958 conf->setValue (" ax_enable" ,QVariant (ui->ax ->isChecked ()));
@@ -992,7 +992,7 @@ void MainWindow::ApplyConfig(bool restart){
992992 conf->setValue (" vb_enable" ,QVariant (ui->vb ->isChecked ()));
993993 conf->setValue (" vb_freq" ,QVariant (ui->vbfreq ->valueA ()));
994994 conf->setValue (" vb_gain" ,QVariant (ui->vbgain ->valueA ()));
995- conf->setValue (" vb_mode" ,QVariant (ui->vbmode ->value ()));
995+ conf->setValue (" vb_mode" ,QVariant (ui->vbmode ->currentIndex ()));
996996 conf->setValue (" fetcomp_enable" ,QVariant (ui->enable_comp ->isChecked ()));
997997 conf->setValue (" fetcomp_autoattack" ,QVariant (ui->m_attack ->isChecked ()));
998998 conf->setValue (" fetcomp_autogain" ,QVariant (ui->m_gain ->isChecked ()));
@@ -1091,7 +1091,7 @@ void MainWindow::UpdateUnitLabel(int d,QObject *alt){
10911091 QString post = " " ;
10921092 if (obj==ui->vbmode ){
10931093 // Bass
1094- if (d==0 ) UpdateTooltipLabelUnit (obj,tr (" Natural Bass " ),alt==nullptr );
1094+ if (d==0 ) UpdateTooltipLabelUnit (obj,tr (" Natural" ),alt==nullptr );
10951095 else if (d==1 ) UpdateTooltipLabelUnit (obj,tr (" Pure Bass+" ),alt==nullptr );
10961096 else if (d==2 ) UpdateTooltipLabelUnit (obj,tr (" Subwoofer" ),alt==nullptr );
10971097 else UpdateTooltipLabelUnit (obj,tr (" Mode %1" ).arg (QString::number ( d )),alt==nullptr );
@@ -1212,13 +1212,13 @@ void MainWindow::UpdateAllUnitLabels(){
12121212 ui->a_maxatk ,ui->a_maxrel ,ui->a_kneewidth ,ui->vcurelvl ,ui->axmode ,ui->barkcon ,ui->barkfreq ,ui->convcc ,
12131213 ui->dyn_xcoeff1 ,ui->dyn_xcoeff2 ,ui->dyn_ycoeff1 ,ui->dyn_ycoeff2 ,ui->dyn_sidegain1 ,ui->dyn_sidegain2 ,ui->dyn_bassgain });
12141214
1215- QList<QSpinBox *> spinboxesToBeUpdated ({ui->vcmode ,ui->vbmode });
1215+ QList<QComboBox *> comboboxesToBeUpdated ({ui->vcmode ,ui->vbmode });
12161216
12171217 foreach (auto w, slidersToBeUpdated)
12181218 UpdateUnitLabel (w->valueA (),w);
12191219
1220- foreach (auto w, spinboxesToBeUpdated )
1221- UpdateUnitLabel (w->value (),w);
1220+ foreach (auto w, comboboxesToBeUpdated )
1221+ UpdateUnitLabel (w->currentIndex (),w);
12221222}
12231223
12241224// ---Helper
@@ -1283,7 +1283,7 @@ AppConfigWrapper* MainWindow::getACWrapper(){
12831283
12841284// ---Connect UI-Signals
12851285void MainWindow::ConnectActions (){
1286- QList<QWidget *> registerValueChange ({ui->vbmode ,ui->vcmode });
1286+ QList<QComboBox *> registerCurrentIndexChange ({ui->vbmode ,ui->vcmode });
12871287
12881288 QList<QAnimatedSlider*> registerValueAChange (
12891289 {ui->convcc ,ui->vbfreq ,ui->vbgain ,ui->difflvl ,ui->vhplvl ,ui->roomsize ,ui->roomwidth ,ui->roomdamp ,
@@ -1306,8 +1306,8 @@ void MainWindow::ConnectActions(){
13061306 QList<QWidget*> registerDynsysUpdate (
13071307 {ui->dyn_xcoeff1 ,ui->dyn_xcoeff2 ,ui->dyn_ycoeff1 ,ui->dyn_ycoeff2 ,ui->dyn_sidegain1 ,ui->dyn_sidegain2 });
13081308
1309- foreach (QWidget* w, registerValueChange )
1310- connect (w, SIGNAL (valueChanged (int )), this , SLOT (UpdateUnitLabel (int )));
1309+ foreach (QWidget* w, registerCurrentIndexChange )
1310+ connect (w, SIGNAL (currentIndexChanged (int )), this , SLOT (UpdateUnitLabel (int )));
13111311
13121312 foreach (QWidget* w, registerValueAChange)
13131313 connect (w, SIGNAL (valueChangedA (int )), this , SLOT (UpdateUnitLabel (int )));
@@ -1332,6 +1332,6 @@ void MainWindow::ConnectActions(){
13321332 connect (ui->eq_widget , SIGNAL (mouseReleased ()), this , SLOT (UpdateEqStringFromWidget ()));
13331333 connect (ui->eqpreset , SIGNAL (currentIndexChanged (int )), this , SLOT (EqPresetSelectionUpdated ()));
13341334 connect (ui->dynsys_preset , SIGNAL (currentIndexChanged (int )), this , SLOT (DynsysPresetSelectionUpdated ()));
1335- connect (ui->vbmode , SIGNAL (valueChanged (int )), this , SLOT (OnRelease ()));
1336- connect (ui->vcmode , SIGNAL (valueChanged (int )), this , SLOT (OnRelease ()));
1335+ connect (ui->vbmode , SIGNAL (currentIndexChanged (int )), this , SLOT (OnRelease ()));
1336+ connect (ui->vcmode , SIGNAL (currentIndexChanged (int )), this , SLOT (OnRelease ()));
13371337}
0 commit comments