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 */ 18 #ifndef CONFIG_PAGES_H 19 #define CONFIG_PAGES_H 20 #include <QtWidgets> 21 #include <QDialog> 22 #include "configpage.h" 23 #include "projectpropertiesdialog.h" 24 #include "titleblockpropertieswidget.h" 25 class BorderPropertiesWidget; 26 class ConductorPropertiesWidget; 27 class TitleBlockPropertiesWidget; 28 class ExportPropertiesWidget; 29 class ReportPropertieWidget; 30 class XRefPropertiesWidget; 31 class QETProject; 32 class TitleBlockProperties; 33 34 /** 35 This configuration page enables users to define the properties of new 36 diagrams to come. 37 */ 38 class NewDiagramPage : public ConfigPage { 39 Q_OBJECT 40 // constructors, destructor 41 public: 42 NewDiagramPage(QETProject *project = nullptr, QWidget * = nullptr, ProjectPropertiesDialog *teste = nullptr); 43 ~NewDiagramPage() override; 44 private: 45 NewDiagramPage(const NewDiagramPage &); 46 public slots: 47 void changeToAutoFolioTab(); 48 void setFolioAutonum(QString); 49 void saveCurrentTbp(); 50 void loadSavedTbp(); 51 52 53 // methods 54 public: 55 void applyConf() override; 56 QString title() const override; 57 QIcon icon() const override; 58 59 // attributes 60 private: 61 ProjectPropertiesDialog *ppd_; 62 QETProject *m_project; ///< Project to edit propertie 63 BorderPropertiesWidget *bpw; ///< Widget to edit default diagram dimensions 64 TitleBlockPropertiesWidget *ipw; ///< Widget to edit default title block properties 65 ConductorPropertiesWidget *m_cpw; ///< Widget to edit default conductor properties 66 ReportPropertieWidget *rpw; ///< Widget to edit default report label 67 XRefPropertiesWidget *xrefpw; ///< Widget to edit default xref properties 68 TitleBlockProperties savedTbp; ///< Used to save current TBP and retrieve later 69 70 }; 71 72 /** 73 This configuration page enables users to set default export options. 74 */ 75 class ExportConfigPage : public ConfigPage { 76 Q_OBJECT 77 // constructors, destructor 78 public: 79 ExportConfigPage(QWidget * = nullptr); 80 ~ExportConfigPage() override; 81 private: 82 ExportConfigPage(const ExportConfigPage &); 83 84 // methods 85 public: 86 void applyConf() override; 87 QString title() const override; 88 QIcon icon() const override; 89 90 // attributes 91 public: 92 ExportPropertiesWidget *epw; 93 }; 94 95 /** 96 This configuration page enables users to set default printing options. 97 */ 98 class PrintConfigPage : public ConfigPage { 99 Q_OBJECT 100 // constructors, destructor 101 public: 102 PrintConfigPage(QWidget * = nullptr); 103 ~PrintConfigPage() override; 104 private: 105 PrintConfigPage(const PrintConfigPage &); 106 107 // methods 108 public: 109 void applyConf() override; 110 QString title() const override; 111 QIcon icon() const override; 112 113 // attributes 114 public: 115 ExportPropertiesWidget *epw; 116 }; 117 #endif 118