| 1567 | } |
| 1568 | #ifdef HAVE_LIBORIGIN |
| 1569 | else if (OriginProjectParser::isOriginProject(fileName)) { |
| 1570 | OriginProjectParser parser; |
| 1571 | parser.setProjectFileName(fileName); |
| 1572 | |
| 1573 | // check if graphs have multiple layer |
| 1574 | bool hasUnusedObjects, hasMultiLayerGraphs; |
| 1575 | parser.checkContent(hasUnusedObjects, hasMultiLayerGraphs); |
| 1576 | DEBUG(Q_FUNC_INFO << ", project has multilayer graphs: " << hasMultiLayerGraphs) |
| 1577 | // ask how to import OPJ graph layers if graphs have multiple layer |
| 1578 | if (hasMultiLayerGraphs) { |
| 1579 | auto* dlg = new ImportOriginLayersDialog(this); |
| 1580 | bool graphLayersAsPlotArea = true; |
| 1581 | if (dlg->exec() == QDialog::Accepted) |
| 1582 | graphLayersAsPlotArea = dlg->graphLayersAsPlotArea(); |
| 1583 | delete dlg; |
| 1584 | |
| 1585 | parser.setGraphLayerAsPlotArea(graphLayersAsPlotArea); |
| 1586 | } |
| 1587 | |
| 1588 | WAIT_CURSOR; |
| 1589 | parser.importTo(m_project, QStringList()); // TODO: add return code |
| 1590 | RESET_CURSOR; |
| 1591 | rc = true; |
| 1592 | } |
| 1593 | #endif |
| 1594 | |
| 1595 | #ifdef HAVE_CANTOR_LIBS |
no test coverage detected