QElectroTech  0.70
folioautonumbering.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 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
NumerotationContext m_context
void setContext(QList< QString > autonums)
FolioAutonumberingW::setContext construct autonums in the comboBox selected in the QcomboBox...
void on_buttonBox_clicked(QAbstractButton *)
SelectAutonumW::on_buttonBox_clicked Action on clicked.
int newFoliosNumber()
FolioAutonumberingW::newFoliosNumber returns the number of folios to create.
void on_m_from_cb_currentIndexChanged(int)
FolioAutonumberingW::on_m_from_cb_currentIndexChanged Enable To ComboBox.
void updateFolioList()
FolioAutonumberingW::updateFolioList update Folio List in From and To ComboBox.
NumerotationContext toNumContext() const
void applyEnable(bool=true)
SelectAutonumW::applyEnable enable/disable the apply button.
Ui::FolioAutonumberingW * ui
QList< NumPartEditorW * > num_part_list_
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...
int toFolio()
FolioAutonumberingW::toFolio returns the current "To Folio" index.
int fromFolio()
FolioAutonumberingW::fromFolio returns the current "From Folio" index.
QString autoNumSelected()
FolioAutonumberingW::autoNumSelected returns the current autonum selected.
FolioAutonumberingW(QETProject *project, QWidget *parent=nullptr)
void 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...
void on_m_create_new_tabs_rb_clicked()
FolioAutonumberingW::on_m_create_new_tabs_rb_clicked Enable New Tabs SpinBox.