! \class ImportDialog \brief Base class for other import dialogs. Provides the "Import to" section of those dialogs. \ingroup frontend */
| 41 | \ingroup frontend |
| 42 | */ |
| 43 | ImportDialog::ImportDialog(MainWin* parent) |
| 44 | : QDialog(parent) |
| 45 | , vLayout(new QVBoxLayout(this)) |
| 46 | , m_mainWin(parent) |
| 47 | , m_aspectTreeModel(new AspectTreeModel(parent->project())) { |
| 48 | setAttribute(Qt::WA_DeleteOnClose); |
| 49 | |
| 50 | // menu for new data container |
| 51 | m_newDataContainerMenu = new QMenu(this); |
| 52 | m_newDataContainerMenu->addAction(QIcon::fromTheme(QStringLiteral("labplot-workbook-new")), i18n("New Workbook")); |
| 53 | m_newDataContainerMenu->addAction(QIcon::fromTheme(QStringLiteral("labplot-spreadsheet-new")), i18n("New Spreadsheet")); |
| 54 | m_newDataContainerMenu->addAction(QIcon::fromTheme(QStringLiteral("labplot-matrix-new")), i18n("New Matrix")); |
| 55 | connect(m_newDataContainerMenu, &QMenu::triggered, this, &ImportDialog::newDataContainer); |
| 56 | } |
| 57 | |
| 58 | ImportDialog::~ImportDialog() { |
| 59 | if (m_aspectTreeModel) |