-add class for store Xref properties

-add widget for edit it
-make link betwen QET -> QETproject -> Diagram, for transmit the xrefproperties
-xrefpropertie can save/load to xml and setting.
-XRefItem don't use the properties yet


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2983 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-04-11 09:51:21 +00:00
parent 457ecbc12c
commit c7aaf5b509
18 changed files with 498 additions and 64 deletions

View File

@@ -651,17 +651,20 @@ void QETDiagramEditor::saveCurrentDiagram() {
}
/**
Cree un nouveau projet vide
*/
* @brief QETDiagramEditor::newProject
* Create an empty project
* @return
*/
bool QETDiagramEditor::newProject() {
// cree un nouveau projet sans schema
// create new project without diagram
QETProject *new_project = new QETProject(0);
// transmet les proprietes par defaut des nouveaux schemas
new_project -> setDefaultBorderProperties(defaultBorderProperties());
new_project -> setDefaultConductorProperties(defaultConductorProperties());
new_project -> setDefaultTitleBlockProperties(defaultTitleBlockProperties());
new_project -> setDefaultReportProperties(defaultReportProperties());
// Set default properties for new diagram
new_project -> setDefaultBorderProperties (defaultBorderProperties());
new_project -> setDefaultConductorProperties (defaultConductorProperties());
new_project -> setDefaultTitleBlockProperties (defaultTitleBlockProperties());
new_project -> setDefaultReportProperties (defaultReportProperties());
new_project -> setDefaultXRefProperties (defaultXRefProperties());
// add new diagram
new_project -> addNewDiagram();
@@ -2084,3 +2087,13 @@ QString QETDiagramEditor::defaultReportProperties() {
QSettings &settings= QETApp::settings();
return(settings.value("diagrameditor/defaultreportlabel", "%f-%l%c").toString());
}
/**
* @brief QETDiagramEditor::defaultXRefProperties
* @return the default setting for Xref
*/
XRefProperties QETDiagramEditor::defaultXRefProperties() {
XRefProperties properties;
properties.fromSettings(QETApp::settings(), "diagrameditor/defaultxref");
return properties;
}