QElectroTech  0.70
projectconfigpages.h
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 */
18 #ifndef PROJECTCONFIGPAGES_H
19 #define PROJECTCONFIGPAGES_H
20 #include "configpage.h"
21 
22 class QLabel;
23 class QLineEdit;
24 class QETProject;
30 class SelectAutonumW;
34 
39 class ProjectConfigPage : public ConfigPage {
40  Q_OBJECT
41  // Constructor, destructor
42  public:
43  ProjectConfigPage(QETProject *, QWidget * = nullptr);
44  ~ProjectConfigPage() override;
45  private:
47 
48  // methods
49  public:
50  virtual QETProject *project() const;
51  virtual QETProject *setProject(QETProject *project, bool = true);
52  void applyConf() override;
58  virtual void applyProjectConf() = 0;
59 
60  protected:
61  virtual void init();
65  virtual void initWidgets() = 0;
70  virtual void initLayout() = 0;
74  virtual void readValuesFromProject() = 0;
79  virtual void adjustReadOnly() = 0;
80 
81  // attributes
82  protected:
84 };
85 
90  Q_OBJECT
91  // Constructor, destructor
92  public:
93  ProjectMainConfigPage(QETProject *, QWidget * = nullptr);
94  ~ProjectMainConfigPage() override;
95  private:
97 
98  // methods
99  public:
100  QString title() const override;
101  QIcon icon() const override;
102  void applyProjectConf() override;
103  QString projectTitle() const;
104 
105  protected:
106  void initWidgets() override;
107  void initLayout() override;
108  void readValuesFromProject() override;
109  void adjustReadOnly() override;
110 
111  // attributes
112  protected:
113  QLabel *title_label_;
114  QLineEdit *title_value_;
118 };
119 
121  Q_OBJECT
122 
123  //Methods
124  public:
125  ProjectAutoNumConfigPage (QETProject *project, QWidget *parent = nullptr);
126 
127  QString title() const override;
128  QIcon icon() const override;
129  void applyProjectConf() override;
130  virtual void changeToTab(int);
131  protected:
132  void initWidgets() override;
133  void initLayout() override {}
134  void readValuesFromProject() override;
135  void adjustReadOnly() override;
136  private:
137  void buildConnections();
138  private slots:
139  void updateContextConductor(const QString&);//conductor
140  void saveContextConductor();
141  void removeContextConductor();
142  void updateContextFolio(const QString&);//folio
143  void saveContextFolio();
144  void removeContextFolio();
145  void updateContextElement(const QString&);//element
146  void saveContextElement();
147  void removeContextElement();
148 
149  void applyAutoNum();
150  void applyManagement();
151 
152  signals:
153  void setAutoNum(QString);
154  void setAutoNum(int,int);
155  void saveCurrentTbp();
156  void loadSavedTbp();
157 
158  //Attributes
159  private:
165 
166 };
167 
168 #endif
void saveContextFolio()
ProjectAutoNumConfigPage::saveContext_folio Save the current displayed folio context in project...
void applyProjectConf() override
SelectAutonumW * m_saw_conductor
void initWidgets() override
ProjectAutoNumConfigPage::initWidgets Init some widget of this page.
void saveContextConductor()
ProjectAutoNumConfigPage::saveContext_conductor Save the current displayed conductor context in proje...
The BorderPropertiesWidget class this widget edit the properties of a border.
SelectAutonumW * m_saw_element
void removeContextElement()
ProjectAutoNumConfigPage::removeContextElement Remove from project the current element numerotation c...
void adjustReadOnly() override
void applyAutoNum()
ProjectAutoNumConfigPage::applyAutoNum Apply auto folio numbering, New Folios or Selected Folios...
QString title() const override
void saveContextElement()
ProjectAutoNumConfigPage::saveContextElement Save the current displayed Element formula in project...
The XRefPropertiesWidget class This class provide a widget to edit the XRefProperties.
virtual void initWidgets()=0
virtual void changeToTab(int)
ProjectAutoNumConfigPage::changeToTab.
QETProject * m_project
Currently edited project.
QString title() const override
ProjectAutoNumConfigPage::title Title of this config page.
ProjectMainConfigPage(QETProject *, QWidget *=nullptr)
virtual void initLayout()=0
void adjustReadOnly() override
ProjectAutoNumConfigPage::adjustReadOnly set this config page disable if project is read only...
QIcon icon() const override
void updateContextFolio(const QString &)
ProjectAutoNumConfigPage::updateContext_folio Display the current selected context for folio...
void applyConf() override
void readValuesFromProject() override
void buildConnections()
ProjectAutoNumConfigPage::buildConnections setup some connections.
ProjectAutoNumConfigPage(QETProject *project, QWidget *parent=nullptr)
ProjectAutoNumConfigPage::ProjectAutoNumConfigPage Default constructor.
void applyManagement()
ProjectAutoNumConfigPage::applyAutoManagement Apply Management Options in Selected Folios...
void updateContextElement(const QString &)
ProjectAutoNumConfigPage::updateContextElement Display the current selected context for element...
AutoNumberingManagementW * m_amw
void removeContextConductor()
ProjectAutoNumConfigPage::removeContext Remove from project the current conductor numerotation contex...
void updateContextConductor(const QString &)
ProjectAutoNumConfigPage::updateContext_conductor Display the current selected context for conductor...
void readValuesFromProject() override
ProjectAutoNumConfigPage::readValuesFromProject Read value stored on project, and update display...
void removeContextFolio()
ProjectAutoNumConfigPage::removeContext_folio Remove from project the current folio numerotation cont...
void applyProjectConf() override
ProjectAutoNumConfigPage::applyProjectConf.
virtual QETProject * setProject(QETProject *project, bool=true)
DiagramContextWidget * project_variables_
virtual void readValuesFromProject()=0
virtual QETProject * project() const
QIcon icon() const override
ProjectAutoNumConfigPage::icon Icon of this config pafe.
void setAutoNum(QString)
virtual void adjustReadOnly()=0
FolioAutonumberingW * m_faw
ProjectConfigPage(QETProject *, QWidget *=nullptr)
virtual void applyProjectConf()=0