QElectroTech  0.8-dev
selectautonumw.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 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
selectautonumw.h
SelectAutonumW::applyEnable
void applyEnable(bool=true)
SelectAutonumW::applyEnable enable/disable the apply button.
Definition: selectautonumw.cpp:249
SelectAutonumW::m_fcaw
FormulaAutonumberingW * m_fcaw
Definition: selectautonumw.h:72
NumerotationContextCommands::previous
NumerotationContext previous()
NumerotationContextCommands::previous.
Definition: numerotationcontextcommands.cpp:56
SelectAutonumW::on_add_button_clicked
void on_add_button_clicked()
SelectAutonumW::on_add_button_clicked Action on add_button, add a NumPartEditor.
Definition: selectautonumw.cpp:128
SelectAutonumW::on_m_remove_pb_clicked
void on_m_remove_pb_clicked()
Definition: selectautonumw.cpp:314
FormulaAutonumberingW::setContext
void setContext(const QString &)
FormulaAutonumberingW::setContext.
Definition: formulaautonumberingw.cpp:49
SelectAutonumW::SelectAutonumW
SelectAutonumW(int type, QWidget *parent=nullptr)
Definition: selectautonumw.cpp:30
SelectAutonumW::setContext
void setContext(const NumerotationContext &context)
SelectAutonumW::setContext build the context of current diagram selected in the diagram_chooser Qcomb...
Definition: selectautonumw.cpp:88
NumerotationContextCommands
The NumerotationContextCommands class this class provide methods to handle content of NumerotationCon...
Definition: numerotationcontextcommands.h:31
autonum::numerotationContextToFormula
QString numerotationContextToFormula(const NumerotationContext &nc)
numerotationContextToFormula
Definition: assignvariables.cpp:473
assignvariables.h
NumerotationContext
Definition: numerotationcontext.h:31
SelectAutonumW
Definition: selectautonumw.h:35
SelectAutonumW::m_context
NumerotationContext m_context
Definition: selectautonumw.h:70
NumPartEditorW
Definition: numparteditorw.h:35
NumerotationContext::size
int size() const
NumerotationContext::size.
Definition: numerotationcontext.cpp:93
numerotationcontextcommands.h
NumerotationContextCommands::next
NumerotationContext next()
NumerotationContextCommands::next.
Definition: numerotationcontextcommands.cpp:41
SelectAutonumW::on_m_next_pb_clicked
void on_m_next_pb_clicked()
SelectAutonumW::on_m_next_pb_clicked Increase NumerotationContext.
Definition: selectautonumw.cpp:290
numparteditorw.h
SelectAutonumW::contextToFormula
void contextToFormula()
SelectAutonumW::contextToFormula Apply formula to ElementAutonumbering Widget.
Definition: selectautonumw.cpp:271
SelectAutonumW::contextComboBox
QComboBox * contextComboBox() const
Definition: selectautonumw.cpp:169
SelectAutonumW::num_part_list_
QList< NumPartEditorW * > num_part_list_
Definition: selectautonumw.h:69
QET::QetMessageBox::information
QMessageBox::StandardButton information(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:38
FormulaAutonumberingW
Definition: formulaautonumberingw.h:36
numerotationcontext.h
SelectAutonumW::toNumContext
NumerotationContext toNumContext() const
SelectAutonumW::toNumContext.
Definition: selectautonumw.cpp:117
FormulaAutonumberingW::formula
QString formula()
FormulaAutonumberingW::formula.
Definition: formulaautonumberingw.cpp:65
SelectAutonumW::m_feaw
FormulaAutonumberingW * m_feaw
Definition: selectautonumw.h:71
SelectAutonumW::removeClicked
void removeClicked()
SelectAutonumW::on_m_previous_pb_clicked
void on_m_previous_pb_clicked()
SelectAutonumW::on_m_previous_pb_clicked Decrease NumerotationContext.
Definition: selectautonumw.cpp:301
SelectAutonumW::applyPressed
void applyPressed()
SelectAutonumW::~SelectAutonumW
~SelectAutonumW() override
Definition: selectautonumw.cpp:77
Ui
Definition: autonumberingdockwidget.h:25
SelectAutonumW::on_buttonBox_clicked
void on_buttonBox_clicked(QAbstractButton *)
SelectAutonumW::on_buttonBox_clicked Action on button clicked.
Definition: selectautonumw.cpp:179
SelectAutonumW::ui
Ui::SelectAutonumW * ui
Definition: selectautonumw.h:68
SelectAutonumW::on_remove_button_clicked
void on_remove_button_clicked()
SelectAutonumW::on_remove_button_clicked Action on remove button, remove the last NumPartEditor.
Definition: selectautonumw.cpp:142
formulaautonumberingw.h
FormulaAutonumberingW::clearContext
void clearContext()
FormulaAutonumberingW::clearContext.
Definition: formulaautonumberingw.cpp:57
SelectAutonumW::formula
QString formula()
SelectAutonumW::formula.
Definition: selectautonumw.cpp:159
SelectAutonumW::m_edited_type
int m_edited_type
Definition: selectautonumw.h:73
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
SelectAutonumW::on_m_comboBox_currentTextChanged
void on_m_comboBox_currentTextChanged(const QString &arg1)
Definition: selectautonumw.cpp:308
FormulaAutonumberingW::ui
Ui::FormulaAutonumberingW * ui
Definition: formulaautonumberingw.h:46