QElectroTech  0.8-dev
folioautonumbering.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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 FOLIOAUTONUMBERING_H
19 #define FOLIOAUTONUMBERING_H
20 
21 #include <QWidget>
22 #include "numerotationcontext.h"
23 
24 class NumPartEditorW;
25 class QAbstractButton;
26 class QETProject;
27 
28 namespace Ui {
29  class FolioAutonumberingW;
30 }
31 
32 class FolioAutonumberingW : public QWidget
33 {
34  Q_OBJECT
35 
36  //METHODS
37  public:
38  explicit FolioAutonumberingW(QETProject *project, QWidget *parent = nullptr);
39  ~FolioAutonumberingW() override;
40 
41  void setContext (QList <QString> autonums);
43  QString autoNumSelected();
44  int newFoliosNumber();
45  bool newFolios;
46  int fromFolio();
47  int toFolio();
48 
49  // SIGNALS
50  signals:
51  void applyPressed();
53 
54  //SLOTS
55  private slots:
59  void on_buttonBox_clicked(QAbstractButton *);
61  void applyEnable (bool = true);
62 
63  //ATTRIBUTES
64  private:
66  Ui::FolioAutonumberingW *ui;
67  QList <NumPartEditorW *> num_part_list_;
69  void updateFolioList();
70 };
71 
72 #endif // FOLIOAUTONUMBERING_H
FolioAutonumberingW::num_part_list_
QList< NumPartEditorW * > num_part_list_
Definition: folioautonumbering.h:67
FolioAutonumberingW::newFolios
bool newFolios
Definition: folioautonumbering.h:45
FolioAutonumberingW::on_m_create_new_tabs_rb_clicked
void on_m_create_new_tabs_rb_clicked()
FolioAutonumberingW::on_m_create_new_tabs_rb_clicked Enable New Tabs SpinBox.
Definition: folioautonumbering.cpp:106
FolioAutonumberingW::project_
QETProject * project_
Definition: folioautonumbering.h:65
NumerotationContext
Definition: numerotationcontext.h:31
FolioAutonumberingW::setContext
void setContext(QList< QString > autonums)
FolioAutonumberingW::setContext construct autonums in the comboBox selected in the autonum_chooser Qc...
Definition: folioautonumbering.cpp:53
NumPartEditorW
Definition: numparteditorw.h:35
FolioAutonumberingW
Definition: folioautonumbering.h:33
FolioAutonumberingW::updateFolioList
void updateFolioList()
FolioAutonumberingW::updateFolioList update Folio List in From and To ComboBox.
Definition: folioautonumbering.cpp:92
folioautonumbering.h
FolioAutonumberingW::m_context
NumerotationContext m_context
Definition: folioautonumbering.h:68
Diagram
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
QETProject::diagrams
QList< Diagram * > diagrams() const
Definition: qetproject.cpp:217
FolioAutonumberingW::applyEnable
void applyEnable(bool=true)
SelectAutonumW::applyEnable enable/disable the apply button.
Definition: folioautonumbering.cpp:203
FolioAutonumberingW::FolioAutonumberingW
FolioAutonumberingW(QETProject *project, QWidget *parent=nullptr)
Definition: folioautonumbering.cpp:28
FolioAutonumberingW::applyPressed
void applyPressed()
FolioAutonumberingW::toFolio
int toFolio()
FolioAutonumberingW::toFolio returns the current "To Folio" index.
Definition: folioautonumbering.cpp:77
QET::QetMessageBox::information
QMessageBox::StandardButton information(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:38
numerotationcontext.h
FolioAutonumberingW::ui
Ui::FolioAutonumberingW * ui
Definition: folioautonumbering.h:66
FolioAutonumberingW::~FolioAutonumberingW
~FolioAutonumberingW() override
Definition: folioautonumbering.cpp:44
FolioAutonumberingW::on_buttonBox_clicked
void on_buttonBox_clicked(QAbstractButton *)
SelectAutonumW::on_buttonBox_clicked Action on buttonBox clicked.
Definition: folioautonumbering.cpp:165
qetproject.h
FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked
void on_m_autonumber_tabs_rb_clicked()
FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked Enable From ComboBox, fill From ComboBox.
Definition: folioautonumbering.cpp:118
Ui
Definition: autonumberingdockwidget.h:25
FolioAutonumberingW::newFoliosNumber
int newFoliosNumber()
FolioAutonumberingW::newFoliosNumber returns the number of folios to create.
Definition: folioautonumbering.cpp:85
QETProject
Definition: qetproject.h:51
FolioAutonumberingW::on_m_from_cb_currentIndexChanged
void on_m_from_cb_currentIndexChanged(int)
FolioAutonumberingW::on_m_from_cb_currentIndexChanged Enable To ComboBox.
Definition: folioautonumbering.cpp:146
Diagram::title
QString title() const
Diagram::title.
Definition: diagram.cpp:2023
FolioAutonumberingW::toNumContext
NumerotationContext toNumContext() const
FolioAutonumberingW::fromFolio
int fromFolio()
FolioAutonumberingW::fromFolio returns the current "From Folio" index.
Definition: folioautonumbering.cpp:69
FolioAutonumberingW::m_autonumber_tabs_rb_clicked
void m_autonumber_tabs_rb_clicked()
FolioAutonumberingW::autoNumSelected
QString autoNumSelected()
FolioAutonumberingW::autoNumSelected returns the current autonum selected.
Definition: folioautonumbering.cpp:61
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
FolioAutonumberingW::on_m_new_tabs_sb_valueChanged
void on_m_new_tabs_sb_valueChanged(int)
FolioAutonumberingW::on_m_new_tabs_sb_valueChanged Enable Apply if any new folio is to be created.
Definition: folioautonumbering.cpp:137
diagram.h