File indexing completed on 2024-05-12 15:27:48
0001 /*************************************************************************** 0002 File : ImportDialog.h 0003 Project : LabPlot 0004 Description : import data dialog 0005 -------------------------------------------------------------------- 0006 Copyright : (C) 2016-2018 Alexander Semke (alexander.semke@web.de) 0007 0008 ***************************************************************************/ 0009 0010 /*************************************************************************** 0011 * * 0012 * This program is free software; you can redistribute it and/or modify * 0013 * it under the terms of the GNU General Public License as published by * 0014 * the Free Software Foundation; either version 2 of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 * This program is distributed in the hope that it will be useful, * 0018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0020 * GNU General Public License for more details. * 0021 * * 0022 * You should have received a copy of the GNU General Public License * 0023 * along with this program; if not, write to the Free Software * 0024 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0025 * Boston, MA 02110-1301 USA * 0026 * * 0027 ***************************************************************************/ 0028 0029 #ifndef IMPORTDIALOG_H 0030 #define IMPORTDIALOG_H 0031 0032 #include <QDialog> 0033 0034 class AbstractAspect; 0035 class AspectTreeModel; 0036 class MainWin; 0037 class TreeViewComboBox; 0038 0039 class QMenu; 0040 class QAbstractItemModel; 0041 class QLabel; 0042 class QModelIndex; 0043 class QVBoxLayout; 0044 class QComboBox; 0045 class QGroupBox; 0046 class QToolButton; 0047 class QStatusBar; 0048 0049 class ImportDialog : public QDialog { 0050 Q_OBJECT 0051 0052 public: 0053 explicit ImportDialog(MainWin*); 0054 ~ImportDialog() override; 0055 0056 virtual void importTo(QStatusBar*) const = 0; 0057 void setCurrentIndex(const QModelIndex&); 0058 virtual QString selectedObject() const = 0; 0059 0060 protected: 0061 void setModel(); 0062 0063 QVBoxLayout* vLayout; 0064 QPushButton* okButton{nullptr}; 0065 QLabel* lPosition{nullptr}; 0066 QComboBox* cbPosition{nullptr}; 0067 TreeViewComboBox* cbAddTo{nullptr}; 0068 MainWin* m_mainWin; 0069 QGroupBox* frameAddTo{nullptr}; 0070 QToolButton* tbNewDataContainer{nullptr}; 0071 QMenu* m_newDataContainerMenu{nullptr}; 0072 AspectTreeModel* m_aspectTreeModel; 0073 0074 protected slots: 0075 virtual void checkOkButton() = 0; 0076 0077 private slots: 0078 void newDataContainerMenu(); 0079 void newDataContainer(QAction*); 0080 }; 0081 0082 #endif //IMPORTDIALOG_H