File indexing completed on 2025-07-13 03:32:34
0001 /* 0002 File : ImportDialog.h 0003 Project : LabPlot 0004 Description : import data dialog 0005 -------------------------------------------------------------------- 0006 SPDX-FileCopyrightText: 2016-2023 Alexander Semke <alexander.semke@web.de> 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #ifndef IMPORTDIALOG_H 0011 #define IMPORTDIALOG_H 0012 0013 #include <QDialog> 0014 0015 class AbstractAspect; 0016 class AspectTreeModel; 0017 class MainWin; 0018 class TreeViewComboBox; 0019 0020 class KMessageWidget; 0021 class QMenu; 0022 class QAbstractItemModel; 0023 class QLabel; 0024 class QModelIndex; 0025 class QVBoxLayout; 0026 class QComboBox; 0027 class QGroupBox; 0028 class QToolButton; 0029 class QStatusBar; 0030 0031 class ImportDialog : public QDialog { 0032 Q_OBJECT 0033 0034 public: 0035 explicit ImportDialog(MainWin*); 0036 ~ImportDialog() override; 0037 0038 virtual void importTo(QStatusBar*) const = 0; 0039 void setCurrentIndex(const QModelIndex&); 0040 virtual QString selectedObject() const = 0; 0041 0042 protected: 0043 void setModel(); 0044 0045 QVBoxLayout* vLayout{nullptr}; 0046 QPushButton* okButton{nullptr}; 0047 QLabel* lPosition{nullptr}; 0048 QComboBox* cbPosition{nullptr}; 0049 TreeViewComboBox* cbAddTo{nullptr}; 0050 MainWin* m_mainWin; 0051 QGroupBox* frameAddTo{nullptr}; 0052 QToolButton* tbNewDataContainer{nullptr}; 0053 QMenu* m_newDataContainerMenu{nullptr}; 0054 AspectTreeModel* m_aspectTreeModel; 0055 KMessageWidget* m_messageWidget{nullptr}; 0056 0057 protected Q_SLOTS: 0058 virtual void checkOkButton() = 0; 0059 void showErrorMessage(const QString&); 0060 0061 private Q_SLOTS: 0062 void newDataContainerMenu(); 0063 void newDataContainer(QAction*); 0064 void currentModelIndexChanged(const QModelIndex&); 0065 0066 Q_SIGNALS: 0067 void dataContainerChanged(AbstractAspect*); 0068 }; 0069 0070 #endif // IMPORTDIALOG_H