void MainTabs::askForRenaming(int index) { if (index != indexOf(logger)) { TextInputDialog * dia = guiHelper->getNameDialog(this, tabBarRef->tabText(index)); if (dia != nullptr) { int res = dia->exec(); QString newName = dia->getInputText(); if (res == QDialog::Accepted && !newName.isEmpty()) { static_cast<TabAbstract *>(widget(index))->setName(newName); } delete dia; } } }
void TransformsGui::onSaveToMemory() { if (transformWidgetList.size() == 1) { QMessageBox::critical(this,tr("Error"),tr("No transformation selected, nothing to register!"),QMessageBox::Ok); } else { TextInputDialog * dia = guiHelper->getNameDialog(this, name); if (dia != NULL) { int ret = dia->exec(); if (ret == QDialog::Accepted) { QString newName = dia->getInputText(); if (newName.isEmpty()) newName = name; setName(newName); transformFactory->registerChainConf(getCurrentTransformChain(),true); } delete dia; } } }