| 2814 | } |
| 2815 | |
| 2816 | void MainWin::importProjectDialog() { |
| 2817 | DEBUG(Q_FUNC_INFO); |
| 2818 | |
| 2819 | ImportProjectDialog::ProjectType type; |
| 2820 | if (QObject::sender() == m_importOpjAction) |
| 2821 | type = ImportProjectDialog::ProjectType::Origin; |
| 2822 | else |
| 2823 | type = ImportProjectDialog::ProjectType::LabPlot; |
| 2824 | |
| 2825 | auto* dlg = new ImportProjectDialog(this, type); |
| 2826 | |
| 2827 | // set current folder |
| 2828 | dlg->setCurrentFolder(m_currentFolder); |
| 2829 | |
| 2830 | if (dlg->exec() == QDialog::Accepted) { |
| 2831 | dlg->importTo(statusBar()); |
| 2832 | m_project->setChanged(true); |
| 2833 | } |
| 2834 | |
| 2835 | delete dlg; |
| 2836 | DEBUG(Q_FUNC_INFO << ", DONE"); |
| 2837 | } |
| 2838 | |
| 2839 | /*! |
| 2840 | * \brief opens a dialog to import datasets |
nothing calls this directly
no test coverage detected