9 setStyleSheet(
"font: 9pt");
11 connect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
20 if(previousIndex < 0){
24 disconnect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
28 setStyleSheet(
"font: 9pt");
29 connect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
36 if(previousIndex >= 0){
37 if(modified || v == currentIndex()){
42 disconnect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
45 connect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
49 void CustomComboBox::onCurrentIndexChanged(
int v)
52 if(previousIndex < 0){
57 if(v == count() -1 && itemData(count() - 1,
GAINAMPROLE).toInt() < 0){
58 removeItem(count() - 1);
59 disconnect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
62 connect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
63 }
else if(itemData(count() - 1,
GAINAMPROLE).toInt() < 0){
64 removeItem(count() - 1);
68 setStyleSheet(
"color: rgb(239, 41, 41);"
77 removeItem(count() - 1);
90 addItem(
"256,000",256);
92 addItem(
"128,000",128);
100 addItem(
"36,000",36);
102 addItem(
"24,000",24);
104 addItem(
"20,000",20);
106 addItem(
"16,000",16);
108 addItem(
"10,000",10);
127 disconnect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
150 setStyleSheet(
"color: rgb(239, 41, 41);"
153 setCurrentIndex(index);
154 previousIndex = index;
155 connect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
163 QString s = QString(
"%1").arg(val);
164 QString s1 = itemText(c - 1);
167 if(modified || s1 == s){
176 disconnect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
178 connect(
this,SIGNAL(currentIndexChanged(
int)),
this,SLOT(onCurrentIndexChanged(
int)));
void addCustomValue(float val)
CustomComboBox(QWidget *parent=nullptr)
void setIndexFromAmpGain(int g)