| 232 | } |
| 233 | |
| 234 | void PlotTemplateDialog::updateErrorMessage(const QString& message) { |
| 235 | if (message.isEmpty()) { |
| 236 | ui->teMessage->hide(); |
| 237 | m_worksheetView->show(); |
| 238 | auto* button = ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok); |
| 239 | assert(button); |
| 240 | button->setEnabled(true); |
| 241 | return; |
| 242 | } |
| 243 | |
| 244 | m_worksheetView->hide(); |
| 245 | ui->teMessage->setText(message); |
| 246 | ui->teMessage->show(); |
| 247 | auto* button = ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok); |
| 248 | assert(button); |
| 249 | button->setEnabled(false); |
| 250 | } |
| 251 | |
| 252 | QString PlotTemplateDialog::templatePath() const { |
| 253 | return ui->lvInstalledTemplates->model()->data(ui->lvInstalledTemplates->currentIndex(), TemplateListModel::Roles::FilePathRole).toString(); |
nothing calls this directly
no test coverage detected