QElectroTech  0.70
selectautonumw.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 SELECTAUTONUMW_H
19 #define SELECTAUTONUMW_H
20 
21 #include <QWidget>
22 #include "numerotationcontext.h"
23 #include "formulaautonumberingw.h"
24 
25 class NumPartEditorW;
26 class QAbstractButton;
28 class QComboBox;
29 
30 namespace Ui {
31  class SelectAutonumW;
32 }
33 
34 class SelectAutonumW : public QWidget
35 {
36  Q_OBJECT
37 
38  //METHODS
39  public:
40  explicit SelectAutonumW(int type, QWidget *parent = nullptr);
41  explicit SelectAutonumW(const NumerotationContext &context, int type, QWidget *parent = nullptr);
42  ~SelectAutonumW() override;
43 
44  void setContext (const NumerotationContext &context);
46  void contextToFormula ();
47  QString formula();
48  QComboBox *contextComboBox() const;
49 
50  signals:
51  void applyPressed();
52  void removeClicked();
53 
54  //SLOT
55  private slots:
56  void on_add_button_clicked();
58  void on_buttonBox_clicked(QAbstractButton *);
59  void applyEnable (bool = true);
60  void on_m_next_pb_clicked();
62  void on_m_comboBox_currentTextChanged(const QString &arg1);
63 
64  //ATTRIBUTES
66 
67  private:
68  Ui::SelectAutonumW *ui;
69  QList <NumPartEditorW *> num_part_list_;
73  int m_edited_type = -1; //0 == element : 1 == conductor : 2 == folio
74 };
75 
76 #endif // SELECTAUTONUMW_H
FormulaAutonumberingW * m_fcaw
Ui::SelectAutonumW * ui
void on_add_button_clicked()
SelectAutonumW::on_add_button_clicked Action on add_button, add a .
void on_m_previous_pb_clicked()
SelectAutonumW::on_m_previous_pb_clicked Decrease NumerotationContext.
void removeClicked()
NumerotationContext m_context
FormulaAutonumberingW * m_feaw
void applyEnable(bool=true)
SelectAutonumW::applyEnable enable/disable the apply button.
void on_m_remove_pb_clicked()
void contextToFormula()
SelectAutonumW::contextToFormula Apply formula to ElementAutonumbering Widget.
QString formula()
SelectAutonumW::formula.
QComboBox * contextComboBox() const
void setContext(const NumerotationContext &context)
SelectAutonumW::setCurrentContext build the context of current diagram selected in the QcomboBox...
~SelectAutonumW() override
QList< NumPartEditorW * > num_part_list_
SelectAutonumW(int type, QWidget *parent=nullptr)
void applyPressed()
void on_m_next_pb_clicked()
SelectAutonumW::on_m_next_pb_clicked Increase NumerotationContext.
void on_remove_button_clicked()
SelectAutonumW::on_remove_button_clicked Action on remove button, remove the last ...
void on_m_comboBox_currentTextChanged(const QString &arg1)
NumerotationContext toNumContext() const
SelectAutonumW::toNumContext.
void on_buttonBox_clicked(QAbstractButton *)
SelectAutonumW::on_buttonBox_clicked Action on clicked.