Isis Developer Reference
TemplateList.h
Go to the documentation of this file.
1#ifndef TemplateList_H
2#define TemplateList_H
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QDebug>
13#include <QList>
14#include <QMetaType>
15#include <QObject>
16
17#include "Project.h"
18#include "Template.h"
19
20
21 namespace Isis {
22
35 class TemplateList : public QObject, public QList<Template *> {
36 Q_OBJECT
37
38 public:
39 TemplateList(QString name, QString type, QString path, QObject *parent = NULL);
40 explicit TemplateList(QObject *parent = NULL);
43
44 QString name() const;
45 QString type() const;
46 QString path() const;
47
48 void setName(QString newName);
49 void setType(QString newType);
50 void setPath(QString newPath);
51
52 void deleteFromDisk(Project *project);
53 void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
54
55 private:
56 QString m_path;
57 QString m_name;
58 QString m_type;
59
60 };
61 }
62
63#endif
File name manipulation and expansion.
Definition FileName.h:100
The main project for ipce.
Definition Project.h:287
Definition TemplateList.h:35
void setPath(QString newPath)
Set the relative path (from the project root) to this TemplateList's folder.
Definition TemplateList.cpp:117
TemplateList(QString name, QString type, QString path, QObject *parent=NULL)
Create a template from a file name, type, and path.
Definition TemplateList.cpp:25
QString name() const
Get the human-readable name of this TemplateList.
Definition TemplateList.cpp:67
~TemplateList()
Destructor.
Definition TemplateList.cpp:57
void deleteFromDisk(Project *project)
Delete all of the contained Templates from disk.
Definition TemplateList.cpp:129
QString path() const
Get the path to these Templates in the TemplateList (relative to project root).
Definition TemplateList.cpp:87
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Convert this TemplateList into XML format for saving/restoring capabilities.
Definition TemplateList.cpp:166
void setName(QString newName)
Set the human-readable name of this TemplateList.
Definition TemplateList.cpp:97
QString type() const
Get the type of template in this TemplateList.
Definition TemplateList.cpp:77
void setType(QString newType)
Set the type of template for of this TemplateList.
Definition TemplateList.cpp:107
This is free and unencumbered software released into the public domain.
Definition BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16