The panel now highlights unused title block templates.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1477 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-01-23 20:36:51 +00:00
parent 6d5570404a
commit 7f9d792368
8 changed files with 113 additions and 5 deletions

View File

@@ -761,6 +761,10 @@ void Diagram::setTitleBlockTemplate(const QString &template_name) {
QString current_name = border_and_titleblock.titleBlockTemplateName();
const TitleBlockTemplate *titleblock_template = project_ -> getTemplateByName(template_name);
border_and_titleblock.titleBlockTemplateRemoved(current_name, titleblock_template);
if (template_name != current_name) {
emit(usedTitleBlockTemplateChanged(template_name));
}
}
/**
@@ -900,6 +904,15 @@ bool Diagram::usesElement(const ElementsLocation &location) {
return(false);
}
/**
@param a title block template name
@return true if the provided template is used by this diagram, false
otherwise.
*/
bool Diagram::usesTitleBlockTemplate(const QString &name) {
return(name == border_and_titleblock.titleBlockTemplateName());
}
/**
Cette methode permet d'appliquer de nouvelles options de rendu tout en
accedant aux proprietes de rendu en cours.