mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 01:10:53 +01:00
Added hasFilePath() and filePath() methods to TitleBlockTemplatesCollection and its derived classes.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2021 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -269,6 +269,22 @@ TitleBlockTemplateLocation TitleBlockTemplatesProjectCollection::location(const
|
||||
return(TitleBlockTemplateLocation(template_name, this));
|
||||
}
|
||||
|
||||
/**
|
||||
@return always false since a project collection is not stored on any
|
||||
filesystem.
|
||||
*/
|
||||
bool TitleBlockTemplatesProjectCollection::hasFilePath() {
|
||||
return(false);
|
||||
}
|
||||
|
||||
/**
|
||||
@return always an empty string since a project collection is not stored on
|
||||
any filesystem.
|
||||
*/
|
||||
QString TitleBlockTemplatesProjectCollection::filePath() {
|
||||
return(QString());
|
||||
}
|
||||
|
||||
/**
|
||||
@param template_name Either an empty QString to know whether the collection
|
||||
itself is read only, or a specific template name.
|
||||
@@ -453,6 +469,21 @@ TitleBlockTemplateLocation TitleBlockTemplatesFilesCollection::location(const QS
|
||||
return(TitleBlockTemplateLocation(template_name, this));
|
||||
}
|
||||
|
||||
/**
|
||||
@return always true since a files collection is always stored on a
|
||||
filesystem.
|
||||
*/
|
||||
bool TitleBlockTemplatesFilesCollection::hasFilePath() {
|
||||
return(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@return The filesystem path where this files collection is actually stored.
|
||||
*/
|
||||
QString TitleBlockTemplatesFilesCollection::filePath() {
|
||||
return(dir_.canonicalPath());
|
||||
}
|
||||
|
||||
/**
|
||||
@param template_name Either an empty QString to know whether the collection
|
||||
itself is read only, or a specific template name.
|
||||
|
||||
@@ -48,6 +48,8 @@ class TitleBlockTemplatesCollection : public QObject {
|
||||
virtual bool setTemplateXmlDescription(const QString &, const QDomElement &) = 0;
|
||||
virtual void removeTemplate(const QString &) = 0;
|
||||
virtual TitleBlockTemplateLocation location(const QString & = QString()) = 0;
|
||||
virtual bool hasFilePath() = 0;
|
||||
virtual QString filePath() = 0;
|
||||
virtual bool isReadOnly(const QString & = QString()) const = 0;
|
||||
virtual QString title() const;
|
||||
virtual void setTitle(const QString &);
|
||||
@@ -95,6 +97,8 @@ class TitleBlockTemplatesProjectCollection : public TitleBlockTemplatesCollectio
|
||||
virtual bool setTemplateXmlDescription(const QString &, const QDomElement &);
|
||||
virtual void removeTemplate(const QString &);
|
||||
virtual TitleBlockTemplateLocation location(const QString & = QString());
|
||||
virtual bool hasFilePath();
|
||||
virtual QString filePath();
|
||||
virtual bool isReadOnly(const QString & = QString()) const;
|
||||
virtual void fromXml(const QDomElement &);
|
||||
virtual void deleteUnusedTitleBlocKTemplates();
|
||||
@@ -132,6 +136,8 @@ class TitleBlockTemplatesFilesCollection : public TitleBlockTemplatesCollection
|
||||
virtual bool setTemplateXmlDescription(const QString &, const QDomElement &);
|
||||
virtual void removeTemplate(const QString &);
|
||||
virtual TitleBlockTemplateLocation location(const QString & = QString());
|
||||
virtual bool hasFilePath();
|
||||
virtual QString filePath();
|
||||
virtual bool isReadOnly(const QString & = QString()) const;
|
||||
|
||||
static QString toTemplateName(const QString &);
|
||||
|
||||
Reference in New Issue
Block a user