labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Folder.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : Folder.h
3  Project : LabPlot
4  Description : Folder in a project
5  --------------------------------------------------------------------
6  Copyright : (C) 2010-2017 Alexander Semke (alexander.semke@web.de)
7  Copyright : (C) 2007 Tilman Benkert (thzs@gmx.net)
8  Copyright : (C) 2007 Knut Franke (knut.franke@gmx.de)
9 
10  ***************************************************************************/
11 
12 /***************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the Free Software *
26  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
27  * Boston, MA 02110-1301 USA *
28  * *
29  ***************************************************************************/
30 #ifndef FOLDER_H
31 #define FOLDER_H
32 
33 #include "AbstractAspect.h"
34 
35 class Folder : public AbstractAspect {
36 Q_OBJECT
37 
38 public:
39  explicit Folder(const QString& name, AspectType type = AspectType::Folder);
40 
41  QIcon icon() const override;
42  QMenu* createContextMenu() override;
43 
44  void save(QXmlStreamWriter*) const override;
45  bool load(XmlStreamReader*, bool preview) override;
46  void setPathesToLoad(const QStringList&);
47  const QStringList& pathesToLoad() const;
48 
49  bool isDraggable() const override;
50  QVector<AspectType> dropableOn() const override;
51  void processDropEvent(const QVector<quintptr>&) override;
52 
53 private:
54  QStringList m_pathesToLoad;
55 
56 protected:
57  bool readChildAspectElement(XmlStreamReader*, bool preview);
58 };
59 
60 #endif // ifndef FOLDER_H
AspectType
Base class of all persistent objects in a Project.
AspectType type() const
QString name() const
Folder in a project.
Definition: Folder.h:35
QStringList m_pathesToLoad
Definition: Folder.h:54
const QStringList & pathesToLoad() const
Definition: Folder.cpp:164
void save(QXmlStreamWriter *) const override
Save as XML.
Definition: Folder.cpp:117
bool isDraggable() const override
Definition: Folder.cpp:80
bool load(XmlStreamReader *, bool preview) override
Load from XML.
Definition: Folder.cpp:133
QMenu * createContextMenu() override
Return a new context menu.
Definition: Folder.cpp:70
Folder(const QString &name, AspectType type=AspectType::Folder)
Definition: Folder.cpp:58
bool readChildAspectElement(XmlStreamReader *, bool preview)
Read child aspect from XML.
Definition: Folder.cpp:171
QVector< AspectType > dropableOn() const override
Definition: Folder.cpp:87
QIcon icon() const override
Return an icon to be used for decorating my views.
Definition: Folder.cpp:61
void processDropEvent(const QVector< quintptr > &) override
Definition: Folder.cpp:91
void setPathesToLoad(const QStringList &)
Definition: Folder.cpp:160
XML stream parser that supports errors as well as warnings. This class also adds line and column numb...