+ # get the template directory
+ templatedir = PyQt4.QtGui.QFileDialog.getExistingDirectory (self,
+ lang.OPEN_TEMPLATE_TITLE)
+ if templatedir == "":
+ return
+
+ # get the output file path
+ outputfile = PyQt4.QtGui.QFileDialog.getSaveFileName (self,
+ lang.EXPORT_TITLE)
+
+ if outputfile == "":
+ return
+
+ # create a new exporter object
+ exp = exporter.BiaCVExporter ()
+
+ # set the document data
+ exp.set_data (self.get_document_data ().data)
+
+ # set the template directory
+ exp.set_template_directory (unicode (templatedir.toUtf8(), "utf-8"))
+
+ # set the output file
+ exp.set_output (unicode (outputfile.toUtf8(), "utf-8"))
+
+ # carry out the export function
+ exp.export ()