MCPcopy Create free account
hub / github.com/KDE/labplot / importFileDialog

Method importFileDialog

src/frontend/MainWin.cpp:2769–2781  ·  view source on GitHub ↗

! Opens the dialog to import data to the selected container */

Source from the content-addressed store, hash-verified

2767 Opens the dialog to import data to the selected container
2768*/
2769void MainWin::importFileDialog(const QString& fileName) {
2770 DEBUG(Q_FUNC_INFO << ", file name = " << fileName.toStdString());
2771 auto* dlg = new ImportFileDialog(this, false, fileName);
2772
2773 // select existing container
2774 if (m_currentAspect->type() == AspectType::Spreadsheet || m_currentAspect->type() == AspectType::Matrix || m_currentAspect->type() == AspectType::Workbook)
2775 dlg->setCurrentIndex(m_projectExplorer->currentIndex());
2776 else if (m_currentAspect->type() == AspectType::Column && m_currentAspect->parentAspect()->type() == AspectType::Spreadsheet)
2777 dlg->setCurrentIndex(m_aspectTreeModel->modelIndexOfAspect(m_currentAspect->parentAspect()));
2778
2779 dlg->exec();
2780 DEBUG(Q_FUNC_INFO << " DONE");
2781}
2782
2783void MainWin::importKaggleDatasetDialog() {
2784 DEBUG(Q_FUNC_INFO);

Callers

nothing calls this directly

Calls 7

toStdStringMethod · 0.80
parentAspectMethod · 0.80
modelIndexOfAspectMethod · 0.80
execMethod · 0.80
typeMethod · 0.45
setCurrentIndexMethod · 0.45
currentIndexMethod · 0.45

Tested by

no test coverage detected