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:
xavier
2010-12-24 21:00:11 +00:00
parent 616626cb1c
commit 649e3de3e6
20 changed files with 585 additions and 2 deletions

View File

@@ -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