59 return m_templateType;
88 if (!QFile::remove(m_fileName)) {
90 tr(
"Could not remove file [%1]").arg(m_fileName),
106 stream.writeStartElement(
"template");
107 stream.writeAttribute(
"fileName",
FileName(m_fileName).name());
108 stream.writeAttribute(
"templateType", m_templateType);
109 stream.writeAttribute(
"importName", m_importName);
110 stream.writeEndElement();
File name manipulation and expansion.
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
@ Io
A type of error that occurred when performing an actual I/O operation.
The main project for ipce.
static QString templateRoot(QString projectRoot)
Appends the root directory name 'templates' to the project .
Template(QString fileName, QString templateType, QString importName, QObject *parent=0)
Create a Template from template file's name.
QString fileName() const
Get the file name that this Template represents.
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Method to write this Template object's member data to an XML stream.
QString templateType() const
Get the type of template.
void deleteFromDisk()
Delete the template from disk.
~Template()
Destroys Template object.
void updateFileName(Project *project)
Change the file name for this template to be where it now is with the given project.
QString importName() const
Get the name of the TemplateList this file was imported under.
This is free and unencumbered software released into the public domain.