File indexing completed on 2024-05-12 15:26:39
0001 /*************************************************************************** 0002 File : Folder.h 0003 Project : LabPlot 0004 Description : Folder in a project 0005 -------------------------------------------------------------------- 0006 Copyright : (C) 2010-2017 Alexander Semke (alexander.semke@web.de) 0007 Copyright : (C) 2007 Tilman Benkert (thzs@gmx.net) 0008 Copyright : (C) 2007 Knut Franke (knut.franke@gmx.de) 0009 0010 ***************************************************************************/ 0011 0012 /*************************************************************************** 0013 * * 0014 * This program is free software; you can redistribute it and/or modify * 0015 * it under the terms of the GNU General Public License as published by * 0016 * the Free Software Foundation; either version 2 of the License, or * 0017 * (at your option) any later version. * 0018 * * 0019 * This program is distributed in the hope that it will be useful, * 0020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0022 * GNU General Public License for more details. * 0023 * * 0024 * You should have received a copy of the GNU General Public License * 0025 * along with this program; if not, write to the Free Software * 0026 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0027 * Boston, MA 02110-1301 USA * 0028 * * 0029 ***************************************************************************/ 0030 #ifndef FOLDER_H 0031 #define FOLDER_H 0032 0033 #include "AbstractAspect.h" 0034 0035 class Folder : public AbstractAspect { 0036 Q_OBJECT 0037 0038 public: 0039 explicit Folder(const QString& name, AspectType type = AspectType::Folder); 0040 0041 QIcon icon() const override; 0042 QMenu* createContextMenu() override; 0043 0044 void save(QXmlStreamWriter*) const override; 0045 bool load(XmlStreamReader*, bool preview) override; 0046 void setPathesToLoad(const QStringList&); 0047 const QStringList& pathesToLoad() const; 0048 0049 bool isDraggable() const override; 0050 QVector<AspectType> dropableOn() const override; 0051 void processDropEvent(const QVector<quintptr>&) override; 0052 0053 private: 0054 QStringList m_pathesToLoad; 0055 0056 protected: 0057 bool readChildAspectElement(XmlStreamReader*, bool preview); 0058 }; 0059 0060 #endif // ifndef FOLDER_H