void Huggle::Preferences::on_listWidget_itemSelectionChanged() { int id = this->ui->listWidget->currentRow(); if (id < 0 || id >= HuggleQueueFilter::Filters.count()) { return; } if (!HuggleQueueFilter::Filters.at(id)->IsChangeable()) { this->Disable(); } else { this->EnableQueues(); } HuggleQueueFilter *f = HuggleQueueFilter::Filters.at(ui->listWidget->currentRow()); SetValue(f->getIgnoreBots(), this->ui->cbqBots); SetValue(f->getIgnoreNP(), this->ui->cbqNew); SetValue(f->getIgnoreWL(), this->ui->cbqWl); SetValue(f->getIgnore_UserSpace(), this->ui->cbqUserspace); SetValue(f->getIgnoreTalk(), this->ui->cbqTp); SetValue(f->getIgnoreFriends(), this->ui->cbqFrd); SetValue(f->getIgnoreReverts(), this->ui->cbqRevert); SetValue(f->getIgnoreSelf(), this->ui->cbqOwn); this->ui->lineEdit->setText(f->QueueName); }
void Huggle::Preferences::on_listWidget_itemSelectionChanged() { int id = this->ui->listWidget->currentRow(); if (id < 0 || id >= HuggleQueueFilter::Filters.count()) { return; } if (!HuggleQueueFilter::Filters.at(id)->IsChangeable()) { this->Disable(); } else { this->EnableQueues(); } HuggleQueueFilter *f = HuggleQueueFilter::Filters.at(ui->listWidget->currentRow()); this->ui->checkBox_7->setChecked(f->getIgnoreBots()); this->ui->checkBox_8->setChecked(f->getIgnoreNP()); this->ui->checkBox_9->setChecked(f->getIgnoreWL()); this->ui->checkBox_28->setChecked(f->getIgnore_UserSpace()); this->ui->checkBox_29->setChecked(f->getIgnoreTalk()); this->ui->checkBox_10->setChecked(f->getIgnoreFriends()); this->ui->checkBox_18->setChecked(f->getIgnoreReverts()); this->ui->checkBox_6->setChecked(f->getIgnoreSelf()); this->ui->lineEdit->setText(f->QueueName); }