void SearchDialog::updateListTab() { if (StelApp::getInstance().getLocaleMgr().getAppLanguage().startsWith("en")) { // hide "names in English" checkbox ui->searchInEnglishCheckBox->hide(); } else { ui->searchInEnglishCheckBox->show(); } ui->objectTypeComboBox->blockSignals(true); ui->objectTypeComboBox->clear(); QMap<QString, QString> modulesMap = objectMgr->objectModulesMap(); for (QMap<QString, QString>::const_iterator it = modulesMap.begin(); it != modulesMap.end(); ++it) { if (!objectMgr->listAllModuleObjects(it.key(), ui->searchInEnglishCheckBox->isChecked()).isEmpty()) { QString moduleName = (ui->searchInEnglishCheckBox->isChecked() ? it.value(): q_(it.value())); ui->objectTypeComboBox->addItem(moduleName, QVariant(it.key())); } } ui->objectTypeComboBox->model()->sort(0, Qt::AscendingOrder); ui->objectTypeComboBox->blockSignals(false); updateListWidget(ui->objectTypeComboBox->currentIndex()); }
//dugme za dodavanje lekara void SefLekara::on_sef_dodaj_button_clicked() { ui->listWidget_2->clear(); ui->listWidget->selectionModel()->reset(); dodavanje_lekara* d = new dodavanje_lekara(); d->show(); connect(d, SIGNAL(zatvoreno_dodavanje()), this, SLOT (updateListWidget())); }
SefLekara::SefLekara(QWidget *parent) : QWidget(parent), ui(new Ui::SefLekara) { ui->setupUi(this); this->sef = new sef_lekara_db(); updateListWidget(); }
//dugme za izmenu lekara void SefLekara::on_sef_izmeni_button_clicked() { if(ui->listWidget->currentRow() != -1) { izmeni_lekara* i = new izmeni_lekara(returnID()); i->show(); connect(i, SIGNAL(zatvoreno_izmena_lekara()), this, SLOT (updateListWidget())); } else QMessageBox::warning(this, "Infirmaria", "Morate oznaciti lekara!"); }
void QgsCptCityColorRampDialog::updateTreeView( QgsCptCityDataItem *item, bool resetRamp ) { if ( ! item ) { QgsDebugMsg( QStringLiteral( "invalid item" ) ); return; } if ( item->type() == QgsCptCityDataItem::Directory ) { if ( resetRamp ) { mRamp.setName( QString(), QString() ); QgsDebugMsg( QStringLiteral( "variant= %1 - %2 variants" ).arg( mRamp.variantName() ).arg( mRamp.variantList().count() ) ); lblSchemeName->clear(); populateVariants(); } updateListWidget( item ); lblSchemePath->setText( item->path() ); lblCollectionInfo->setText( QStringLiteral( "%1 (%2)" ).arg( item->info() ).arg( item->leafCount() ) ); updateCopyingInfo( mArchive->copyingInfo( mArchive->copyingFileName( item->path() ) ) ); } else if ( item->type() == QgsCptCityDataItem::Selection ) { lblSchemePath->clear(); clearCopyingInfo(); updateListWidget( item ); lblCollectionInfo->setText( QStringLiteral( "%1 (%2)" ).arg( item->info() ).arg( item->leafCount() ) ); } else if ( item->type() == QgsCptCityDataItem::AllRamps ) { lblSchemePath->clear(); clearCopyingInfo(); updateListWidget( item ); lblCollectionInfo->setText( tr( "All Ramps (%1)" ).arg( item->leafCount() ) ); } else { QgsDebugMsg( QStringLiteral( "item %1 has invalid type %2" ).arg( item->path() ).arg( static_cast<int>( item->type() ) ) ); } }
//dugme za brisanje lekara void SefLekara::on_sef_obrisi_button_clicked() { if(ui->listWidget->currentRow() != -1) { if (sef->obrisi_lekara(returnID()) && sef->obrisiradnovreme(returnID())) QMessageBox::information(this, "Infirmaria", "Uspešno ste izbrisali lekara."); else { QMessageBox::warning(this, "Infirmaria", "Nije uspelo brisanje lekara!"); return; } updateListWidget(); ui->listWidget_2->clear(); } else QMessageBox::warning(this, "Infirmaria", "Morate oznaciti lekara!"); }