| 353 | } |
| 354 | |
| 355 | void ImportFileDialog::enableImportToMatrix(const bool enable) { |
| 356 | if (cbAddTo) { |
| 357 | QDEBUG("cbAddTo->currentModelIndex() = " << cbAddTo->currentModelIndex()); |
| 358 | AbstractAspect* aspect = static_cast<AbstractAspect*>(cbAddTo->currentModelIndex().internalPointer()); |
| 359 | if (!aspect) { |
| 360 | DEBUG("ERROR: no aspect available."); |
| 361 | return; |
| 362 | } |
| 363 | |
| 364 | if (aspect->inherits(AspectType::Matrix)) { |
| 365 | okButton->setEnabled(enable); |
| 366 | if (enable) |
| 367 | okButton->setToolTip(i18n("Close the dialog and import the data.")); |
| 368 | else |
| 369 | okButton->setToolTip(i18n("Cannot import into a matrix since the data contains non-numerical data.")); |
| 370 | } |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | void ImportFileDialog::checkOkButton() { |
| 375 | DEBUG(Q_FUNC_INFO); |
nothing calls this directly
no test coverage detected