mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Added context menu entries and a basic, non-WYSIWYG template editor to add, modify and delete title block templates embedded within a project.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1133 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -765,6 +765,36 @@ void Diagram::diagramTextChanged(DiagramTextItem *text_item, const QString &old_
|
||||
undo_stack -> push(new ChangeDiagramTextCommand(text_item, old_text, new_text));
|
||||
}
|
||||
|
||||
/**
|
||||
This slot may be used to inform the diagram object that the given title
|
||||
block template has changed. The diagram will thus flush its title
|
||||
block-dedicated rendering cache.
|
||||
@param template_name Name of the title block template that has changed
|
||||
*/
|
||||
void Diagram::titleBlockTemplateChanged(const QString &template_name) {
|
||||
if (titleblock_template_name_ == template_name) {
|
||||
border_and_titleblock.titleBlockTemplateChanged(template_name);
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
This slot has to be be used to inform this class that the given title block
|
||||
template is about to be removed and is no longer accessible. This class
|
||||
will either use the provided optional TitleBlockTemplate or the default
|
||||
title block provided by QETApp::defaultTitleBlockTemplate()
|
||||
@param template_name Name of the title block template that has changed
|
||||
@param new_template (Optional) Name of the title block template to use instead
|
||||
*/
|
||||
void Diagram::titleBlockTemplateRemoved(const QString &template_name, const QString &new_template) {
|
||||
if (titleblock_template_name_ == template_name) {
|
||||
const TitleBlockTemplate *final_template = project_ -> getTemplateByName(new_template);
|
||||
titleblock_template_name_ = final_template ? new_template : QString();
|
||||
border_and_titleblock.titleBlockTemplateRemoved(template_name, final_template);
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Selectionne tous les objets du schema
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user