QElectroTech  0.70
projectpropertiesdialog.cpp
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
19 #include "configdialog.h"
20 #include "projectconfigpages.h"
21 #include <QObject>
22 #include "configpages.h"
23 
31  NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this);
32  ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project);
33  m_properties_dialog = new ConfigDialog (parent);
34  m_properties_dialog -> setWindowTitle(QObject::tr("Propriétés du projet", "window title"));
35  m_properties_dialog -> addPage(new ProjectMainConfigPage (project));
36  m_properties_dialog -> addPage(newDiagramPage);
37  m_properties_dialog -> addPage(projectAutoNumConfigPage);
38  connect(projectAutoNumConfigPage,SIGNAL(setAutoNum(QString)),newDiagramPage,SLOT(setFolioAutonum(QString)));
39  connect(projectAutoNumConfigPage,SIGNAL(saveCurrentTbp()),newDiagramPage,SLOT(saveCurrentTbp()));
40  connect(projectAutoNumConfigPage,SIGNAL(loadSavedTbp()),newDiagramPage,SLOT(loadSavedTbp()));
41  m_properties_dialog->setMinimumHeight(690);
42 
43 }
44 
49  delete m_properties_dialog;
50 }
51 
57  m_properties_dialog->setWindowModality(Qt::WindowModal);
59 }
60 
67  m_properties_dialog -> setCurrentPage(static_cast <int> (p));
68 }
69 
75  ProjectAutoNumConfigPage *autoNumPage = static_cast <ProjectAutoNumConfigPage*>(m_properties_dialog->pages.at(2));
76  autoNumPage->changeToTab(3);
77 }
virtual void changeToTab(int)
ProjectAutoNumConfigPage::changeToTab.
~ProjectPropertiesDialog() override
ProjectPropertiesDialog::~ProjectPropertiesDialog.
ProjectPropertiesDialog(QETProject *project, QWidget *parent=nullptr)
ProjectPropertiesDialog::ProjectPropertiesDialog Default constructor.
void exec()
ProjectPropertiesDialog::exec execute this dialog.
QIcon tr
Definition: qeticons.cpp:204
QList< ConfigPage * > pages
Definition: configdialog.h:41
void setCurrentPage(ProjectPropertiesDialog::Page)
ProjectPropertiesDialog::setCurrentPage Change the current displayed page by p.
void changeToFolio()
ProjectPropertiesDialog::changeToFolio Change the current displayed tab to folio tab.