mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
When editing a diagram, it is now possible to edit and/or duplicate a title block template from the title block properties dialog.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1479 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -313,6 +313,7 @@ void ProjectView::addDiagram(DiagramView *diagram) {
|
||||
connect(diagram, SIGNAL(titleChanged(DiagramView *, const QString &)), this, SLOT(updateTabTitle(DiagramView *, const QString &)));
|
||||
connect(diagram, SIGNAL(findElementRequired(const ElementsLocation &)), this, SIGNAL(findElementRequired(const ElementsLocation &)));
|
||||
connect(diagram, SIGNAL(editElementRequired(const ElementsLocation &)), this, SIGNAL(editElementRequired(const ElementsLocation &)));
|
||||
connect(diagram, SIGNAL(editTitleBlockTemplate(const QString &, bool)), this, SLOT(editTitleBlockTemplateRequired(const QString &, bool)));
|
||||
|
||||
// signale l'ajout du schema
|
||||
emit(diagramAdded(diagram));
|
||||
@@ -807,6 +808,22 @@ void ProjectView::tabMoved(int from, int to) {
|
||||
emit(diagramOrderChanged(this, from, to));
|
||||
}
|
||||
|
||||
/**
|
||||
Require the edition of the \a template_name title blocke template.
|
||||
@param template_name Name of the tempalte to be edited
|
||||
@param duplicate If true, this methd will ask the user for a template name
|
||||
in order to duplicate the \a template_name template
|
||||
*/
|
||||
void ProjectView::editTitleBlockTemplateRequired(const QString &template_name, bool duplicate) {
|
||||
if (!project_) return;
|
||||
emit(
|
||||
editTitleBlockTemplate(
|
||||
project_ -> embeddedTitleBlockTemplatesCollection() -> location(template_name),
|
||||
duplicate
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@param diagram Schema a trouver
|
||||
@return le DiagramView correspondant au schema passe en parametre, ou 0 si
|
||||
|
||||
Reference in New Issue
Block a user