Isis Developer Reference
Template.h
Go to the documentation of this file.
1#ifndef Template_H
2#define Template_H
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12 #include <QObject>
13 #include <QString>
14 #include <QXmlStreamWriter>
15 #include <QXmlStreamReader>
16
17 #include "FileName.h"
18
19 namespace Isis {
20 class FileName;
21 class Project;
22
30 class Template : public QObject {
31 Q_OBJECT
32
33 public:
34 explicit Template(QString fileName, QString templateType, QString importName, QObject *parent = 0);
35 Template(FileName templateFolder, QXmlStreamReader *xmlReader, QObject *parent = 0);
36 ~Template();
37
38 QString importName() const;
39 QString fileName() const;
40 QString templateType() const;
41
42 void deleteFromDisk();
43 void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
44
45 public slots:
46 void updateFileName(Project * project);
47 private:
48 QString m_fileName; // File name of the template associated with this object
49 QString m_templateType; // Type of template (maps/registrations)
50 QString m_importName; // Name of TemplateList this was imported in
51
52 };
53 }
54
56
57 #endif
Q_DECLARE_METATYPE(Isis::Template *)
File name manipulation and expansion.
Definition FileName.h:100
The main project for ipce.
Definition Project.h:287
Definition Template.h:30
Template(QString fileName, QString templateType, QString importName, QObject *parent=0)
Create a Template from template file's name.
Definition Template.cpp:18
QString fileName() const
Get the file name that this Template represents.
Definition Template.cpp:49
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Method to write this Template object's member data to an XML stream.
Definition Template.cpp:104
QString templateType() const
Get the type of template.
Definition Template.cpp:58
void deleteFromDisk()
Delete the template from disk.
Definition Template.cpp:87
~Template()
Destroys Template object.
Definition Template.cpp:41
void updateFileName(Project *project)
Change the file name for this template to be where it now is with the given project.
Definition Template.cpp:77
QString importName() const
Get the name of the TemplateList this file was imported under.
Definition Template.cpp:67
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16