"Fossies" - the Fresh Open Source Software Archive

Member "labplot-2.8.2/src/kdefrontend/datasources/ImportProjectDialog.h" (24 Feb 2021, 3004 Bytes) of package /linux/privat/labplot-2.8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ImportProjectDialog.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.8.1_vs_2.8.2.

    1 /***************************************************************************
    2     File                 : ImportProjectDialog.h
    3     Project              : LabPlot
    4     Description          : import project dialog
    5     --------------------------------------------------------------------
    6     Copyright            : (C) 2017-2021 Alexander Semke (alexander.semke@web.de)
    7 
    8  ***************************************************************************/
    9 
   10 /***************************************************************************
   11  *                                                                         *
   12  *  This program is free software; you can redistribute it and/or modify   *
   13  *  it under the terms of the GNU General Public License as published by   *
   14  *  the Free Software Foundation; either version 2 of the License, or      *
   15  *  (at your option) any later version.                                    *
   16  *                                                                         *
   17  *  This program is distributed in the hope that it will be useful,        *
   18  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
   19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
   20  *  GNU General Public License for more details.                           *
   21  *                                                                         *
   22  *   You should have received a copy of the GNU General Public License     *
   23  *   along with this program; if not, write to the Free Software           *
   24  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
   25  *   Boston, MA  02110-1301  USA                                           *
   26  *                                                                         *
   27  ***************************************************************************/
   28 
   29 #ifndef IMPORTPROJECTDIALOG_H
   30 #define IMPORTPROJECTDIALOG_H
   31 
   32 #include <QDialog>
   33 #include "ui_importprojectwidget.h"
   34 
   35 class AbstractAspect;
   36 class AspectTreeModel;
   37 class Folder;
   38 class ProjectParser;
   39 class TreeViewComboBox;
   40 class MainWin;
   41 class QDialogButtonBox;
   42 class QStatusBar;
   43 class KUrlComboBox;
   44 
   45 class ImportProjectDialog : public QDialog {
   46     Q_OBJECT
   47 
   48 public:
   49     enum class ProjectType {LabPlot, Origin};
   50 
   51     explicit ImportProjectDialog(MainWin*, ProjectType);
   52     ~ImportProjectDialog() override;
   53 
   54     void setCurrentFolder(const Folder*);
   55     void importTo(QStatusBar*) const;
   56 
   57 private:
   58     Ui::ImportProjectWidget ui;
   59     MainWin* m_mainWin;
   60     KUrlComboBox* m_cbFileName;
   61     ProjectParser* m_projectParser{nullptr};
   62     ProjectType m_projectType;
   63     AspectTreeModel* m_aspectTreeModel;
   64     TreeViewComboBox* m_cbAddTo;
   65     QPushButton* m_bNewFolder;
   66     QDialogButtonBox* m_buttonBox;
   67 
   68     void showTopLevelOnly(const QModelIndex&);
   69     bool isTopLevel(const AbstractAspect*) const;
   70 
   71 private slots:
   72     void fileNameChanged(const QString&);
   73     void refreshPreview();
   74     void selectionChanged(const QItemSelection&, const QItemSelection&);
   75     void selectFile();
   76     void newFolder();
   77 };
   78 
   79 #endif //IMPORTPROJECTDIALOG_H