An official website of the United States government
Here’s how you know
Official websites use .gov
A
.gov website belongs to an official government
organization in the United States.
Secure .gov websites use HTTPS
A
lock
( ) or https:// means you’ve safely connected to
the .gov website. Share sensitive information only on official,
secure websites.
Isis Developer Reference
|
#include <Template.h>
Public Slots | |
void | updateFileName (Project *project) |
Change the file name for this template to be where it now is with the given project. | |
Public Member Functions | |
Template (QString fileName, QString templateType, QString importName, QObject *parent=0) | |
Create a Template from template file's name. | |
Template (FileName templateFolder, QXmlStreamReader *xmlReader, QObject *parent=0) | |
Construct this template from XML. | |
~Template () | |
Destroys Template object. | |
QString | importName () const |
Get the name of the TemplateList this file was imported under. | |
QString | fileName () const |
Get the file name that this Template represents. | |
QString | templateType () const |
Get the type of template. | |
void | deleteFromDisk () |
Delete the template from disk. | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Method to write this Template object's member data to an XML stream. | |
|
explicit |
Create a Template from template file's name.
fileName | The name of the template file on disk |
templateType | The type of template being imported (Options are maps or registrations) |
importName | The name of the TemplateList this Template is imported in |
parent | The Qt-relationship parent |
References fileName(), importName(), and templateType().
Isis::Template::Template | ( | FileName | templateFolder, |
QXmlStreamReader * | xmlReader, | ||
QObject * | parent = 0 ) |
Construct this template from XML.
templateFolder | Location of template xml |
xmlReader | An XML reader that's up to an <template> tag. |
parent | The Qt-relationship parent |
Isis::Template::~Template | ( | ) |
Destroys Template object.
void Isis::Template::deleteFromDisk | ( | ) |
Delete the template from disk.
IException::Io | "Could not remove file." |
References _FILEINFO_, and Isis::IException::Io.
Referenced by Isis::TemplateList::deleteFromDisk().
QString Isis::Template::fileName | ( | ) | const |
Get the file name that this Template represents.
Referenced by Isis::Directory::addTemplateEditorView(), Isis::TemplateEditViewWorkOrder::isExecutable(), Isis::TemplateList::save(), Isis::ProjectItem::setTemplate(), Isis::TemplateEditViewWorkOrder::setupExecution(), and Template().
QString Isis::Template::importName | ( | ) | const |
Get the name of the TemplateList this file was imported under.
Referenced by Template().
void Isis::Template::save | ( | QXmlStreamWriter & | stream, |
const Project * | project, | ||
FileName | newProjectRoot ) const |
Method to write this Template object's member data to an XML stream.
stream | The stream to which the Template will be saved. |
project | The Project to which this Template will be added. |
newProjectRoot | The location of the project root directory. |
Referenced by Isis::TemplateList::save().
QString Isis::Template::templateType | ( | ) | const |
Get the type of template.
Referenced by Template().
|
slot |
Change the file name for this template to be where it now is with the given project.
project | The project that this file is stored in. |
References Isis::FileName::name(), and Isis::Project::templateRoot().