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:
@@ -23,6 +23,7 @@
|
||||
#include "elementscollectionitem.h"
|
||||
#include "fileelementscollection.h"
|
||||
#include "titleblocktemplate.h"
|
||||
#include "templateeditor.h"
|
||||
#include "qetproject.h"
|
||||
#include "qtextorientationspinboxwidget.h"
|
||||
#include "recentfiles.h"
|
||||
@@ -835,6 +836,23 @@ void QETApp::openElementLocations(const QList<ElementsLocation> &locations_list)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Launch a new title block template editor to edit the given template
|
||||
@param project Parent project of the template to edit
|
||||
@param template_name Name of the template to edit within its parent project
|
||||
If no template name is supplied, the method assumes the editor has to be
|
||||
launched for a template creation.
|
||||
*/
|
||||
void QETApp::openTitleBlockTemplate(QETProject *project, const QString &template_name) {
|
||||
TemplateEditor *editor = new TemplateEditor();
|
||||
bool can_edit = editor -> edit(project, template_name);
|
||||
if (can_edit) {
|
||||
editor -> showNormal();
|
||||
} else {
|
||||
QMessageBox::warning(0, tr("Erreur"), tr("Impossible d'\351diter le template demand\351"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Permet a l'utilisateur de configurer QET en lancant un dialogue approprie.
|
||||
@see ConfigDialog
|
||||
|
||||
Reference in New Issue
Block a user