Isis 3 Programmer Reference
|
#include <Template.h>
Classes | |
class | XmlHandler |
More... | |
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... | |
Private Attributes | |
QString | m_fileName |
QString | m_templateType |
QString | m_importName |
Definition at line 44 of file Template.h.
|
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 |
Definition at line 19 of file Template.cpp.
References fileName(), importName(), and templateType().
Referenced by Isis::TemplateEditorWidget::saveAsText().
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 |
Definition at line 33 of file Template.cpp.
References Isis::XmlStackedHandlerReader::pushContentHandler().
Isis::Template::~Template | ( | ) |
Destroys Template object.
Definition at line 42 of file Template.cpp.
void Isis::Template::deleteFromDisk | ( | ) |
Delete the template from disk.
IException::Io | "Could not remove file." |
Definition at line 88 of file Template.cpp.
References _FILEINFO_, and Isis::IException::Io.
Referenced by Isis::TemplateList::deleteFromDisk().
QString Isis::Template::fileName | ( | ) | const |
Get the file name that this Template represents.
Definition at line 50 of file Template.cpp.
Referenced by Isis::Directory::addTemplateEditorView(), Isis::ControlPointEditWidget::createPointEditor(), Isis::TemplateEditViewWorkOrder::isExecutable(), Isis::ProjectItem::setTemplate(), Isis::TemplateEditViewWorkOrder::setupExecution(), Isis::Template::XmlHandler::startElement(), and Template().
QString Isis::Template::importName | ( | ) | const |
Get the name of the TemplateList this file was imported under.
Definition at line 68 of file Template.cpp.
Referenced by Isis::ControlPointEditWidget::createPointEditor(), Isis::Template::XmlHandler::startElement(), and 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. |
Definition at line 105 of file Template.cpp.
Referenced by Isis::TemplateEditorWidget::saveOption().
QString Isis::Template::templateType | ( | ) | const |
Get the type of template.
Definition at line 59 of file Template.cpp.
Referenced by Isis::Template::XmlHandler::startElement(), and 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. |
Definition at line 78 of file Template.cpp.
References Isis::FileName::name(), and Isis::Project::templateRoot().