mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
-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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user