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. More... | |
Public Member Functions | |
Template (QString fileName, QString templateType, QString importName, QObject *parent=0) | |
Create a Template from template file's name. More... | |
Template (FileName templateFolder, XmlStackedHandlerReader *xmlReader, QObject *parent=0) | |
Construct this template from XML. More... | |
~Template () | |
Destroys Template object. More... | |
QString | importName () const |
Get the name of the TemplateList this file was imported under. More... | |
QString | fileName () const |
Get the file name that this Template represents. More... | |
QString | templateType () const |
Get the type of template. More... | |
void | deleteFromDisk () |
Delete the template from disk. More... | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Method to write this Template object's member data to an XML stream. More... | |
|
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, |
XmlStackedHandlerReader * | 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 |
References Isis::XmlStackedHandlerReader::pushContentHandler().
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::TemplateEditorWidget::saveText(), Isis::ProjectItem::setTemplate(), Isis::TemplateEditViewWorkOrder::setupExecution(), Template(), and Isis::TemplateEditorWidget::TemplateEditorWidget().
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(), and Isis::TemplateEditorWidget::TemplateEditorWidget().
|
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().